Friday, March 15, 2024

How to transfer a set of text files to a PDS as individual members in the IBM PCOM session

To transfer a set of text files to a PDS as individual members, we need to create a batch file. Let us transfer two text files to PDS USERID.DDF.TOOL. So, put the below two lines in a file and save the batch file with “srl” extension. 

C:\Downloads\ASMEXIT.JCL text~'USERID.DDF.TOOL(ASMEXIT)'
C:\Downloads\BUCKETS.JCL text~'USERID.DDF.TOOL(BUCKETS)'
 
In the Mainframe IBM PCOM session, Select option “6  Command Enter TSO or Workstation commands” form ISPF main menu. From the IBM PCOM Menu, click on “Action” and then click on “Send File to Host”. You will get the below screen. In the below screen, click on “Options” and then you will get “File Transfer Settings” window.
 

 
In the “File Transfer Settings” window, click on “MVS/TSO” tab and select “text” under “Transfer type” drop down box.  Then make sure “ascii” and “crlf” options are ticked in the “File options” and then select “Default” under “Record Format” drop down box.



Now go back to the “Send File to Host” window, click on “Open List” button and select the “srl” batch file that we already created and then click on “Send” button. This will transfer text files one by one to PDS as members.
 
 
 

Tuesday, March 5, 2024

Generating a report of dynamically called COBOL programs

IBM Enterprise COBOL V6R4 allows you to produce a report of all subroutines called by dynamic call. Use ddname IGZPROUT at the run step of your JCL to generate a report of all dynamically called programs that are compiled with Enterprise COBOL 5 or later.

The report details include the Program Name, Compiler Version, and Time and Date of compilation of the programs. Only programs that are compiled with COBOL 5 or later will be listed. Details of cancelled programs are printed at the end.

Note: If a program is cancelled multiple times, then the report prints it only once.

Recommended attributes for the IGZPROUT ddname are as follows:
DSORG = PS   RECFM = FB   78 = LRECL = 80

Here are the examples of setting the IGZPROUT ddname:
//IGZPROUT DD SYSOUT=*

or
//IGZPROUT DD DSN=dynamic.call.report.dsname,DISP=SHR

or
//IGZPROUT DD DSN=dynamic.call.report.dsname,
// UNIT=SYSDA,SPACE=(TRK,(5,10),RLSE),
// DCB=(DSORG=PS,LRECL=80,RECFM=FB,BLKSIZE=0),
// DISP=(NEW,CATLG,DELETE)

You can get an output report as follows:

*********************** DYNAMICALLY CALLED PROGRAM REPORT ********************
************************* FOR COBOL 5 AND LATER RELEASES *********************

NAME       COMPILER VER.       DATE/TIME COMPILED
-----------------------------------------------------------------------------
PROG1      V06 R02 M00         2021/01/01 15:30:02
PROG2      V06 R02 M00         2021/01/01 15:30:12

The following programs are marked as cancelled at termination:
PROG3      V06 R03 M00         2022/02/13 17:36:29
*************************** END OF PROGRAM REPORT ****************************

Note: For dynamic calls, the program-name in the PROGRAM-ID paragraph or ENTRY statement must be identical to the corresponding program object name or program object alias of the program object that contains the program. If the PROGRAM-ID paragraph or the ENTRY statement is not identical to the corresponding program object (PDSE member) name or program object alias of the program object that contains the program, then the report will list the program-name in the PROGRAM-ID paragraph or the ENTRY statement, as opposed to listing the program object (PDSE member) name or the program object alias name.

A Very good youtube from "Dinosaur Parkour" about this feature can be found in the below link.