Focal Point
[SOLVED] How to debug the values from Command language in FOCUS for z/os.

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/2217028776

August 14, 2015, 02:08 AM
GNTH
[SOLVED] How to debug the values from Command language in FOCUS for z/os.
Hi,

I would like to know that how to debug command language statements in FOCUS for Mainframe. Below given the code snippet.

TABLE FILE SELDATA
PRINT
AAA
IF AAA EQ 'XX'
ON TABLE HOLD AS HOLD1
END
-RUN

The above code TABLE FILE is read the file SELDATA and if condition is satisfies, 'HOLD1' Fixed file will create. Please let me know how to see the records of HOLD1 file as i can able to get the record deceleration for HOLD1 using 'HOLDMASTER' DD in JCL. And how do we debug the process of TABLE FILE statement while executing the JCL that what record is reading as we can get NUMBER OF RECORDS read in SPOOL. i hope PRINT command is writing data into HOLD1 file and not showed any data in my SPOOL of Z/OS Environment.

And

How do we display the Virtual Fields values which are creating by DEFINE FILE statement for the below code.

DEFINE FILE SELDATA

HEAD1/A54 = IF AAAE EQ 'T1'
THEN BBB
ELSE ' ';

HEAD2/A54 = IF AAA EQ 'T2'
THEN BBB
ELSE ' ';

HEAD3/A54 = IF AAA EQ 'T3'
THEN BBB
ELSE ' ';
END

While executing the above code via JCL i would like to know the values of HEAD1, HEAD2 and HEAD3. Kindly help me to debug items of command language. Thanks.

-Nath

This message has been edited. Last edited by: <Kathryn Henning>,


WebFOCUS 8
Windows, All Outputs
August 14, 2015, 07:55 AM
GNTH
Hi,

I can able to get the debugging of TABLE FILE data while processing by using SET PRINT ONLINE.

Please let me know how can we display the values of virtual fields in SPOOL while executing.


WebFOCUS 8
Windows, All Outputs
August 14, 2015, 07:56 AM
George Patton
With respect, I think you should get some training on the basic aspects of WebFOCUS.

APP HOLD BASEAPP

TABLE FILE SELDATA 
PRINT 
AAA 
IF AAA EQ 'XX' 
ON TABLE HOLD AS HOLD1 FORMAT ALPHA
END  

will produce human-readable output in the baseapp folder.

I assume that in the following BBB is a database field.
DEFINE FILE SELDATA 

HEAD1/A54 = IF AAAE EQ 'T1' 
THEN BBB 
ELSE ' '; 

HEAD2/A54 = IF AAA EQ 'T2' 
THEN BBB 
ELSE ' '; 

HEAD3/A54 = IF AAA EQ 'T3' 
THEN BBB
ELSE ' '; 
END

TABLE FILE SELDATA
PRINT AAAE HEAD1 AAA HEAD2 HEAD3
END 



WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP
August 14, 2015, 08:04 AM
GNTH
Hi George,

Thanks for help. I have got the values as expected.

Yes. i am the new for 'FOCUS for Z/Os'. i am learning basics and coding by helping of available documents provided by Information Builders. This is my new project which i need to migrate the reports from FOCUS to EZYTRIEV. Thanks once again.
-Nath


WebFOCUS 8
Windows, All Outputs
August 14, 2015, 08:47 AM
Msondra
Hi GNTH,
I find it interesting that your organization is trying to convert FOCUS to EZTRIEVE. I've usually found the opposite.
Your submitting with JCL, so BASEAPP is folder probably not a factor. If you want to see the output, comment out the ON TABLE HOLD line and submit your job. A comment in FOCUS is -*.
-*ON TABLE HOLD AS HOLD1
This will show your output.
If you don't want to see all of the output use the WHERE STATEMENT:
WHERE READLIMIT EQ 100;
or
WHERE RECORDLIMIT EQ 100; If your source is A FOCUS database.
(100 being the amount of records.)

If you want to see what is in the newly created fields in the define, use the code that George provides.

Good luck


WebFOCUS 8.1.05
Windows, All Outputs
August 17, 2015, 01:47 AM
GNTH
Thanks Msondra !!

I will try and what you suggested and its very helpful for my task. I am very much interesting to learn FOCUS as it is very effective to create reports.

-Nath


WebFOCUS 8
Windows, All Outputs