maki_psg
New User
Joined: 28 Jan 2010 Posts: 47 Location: India
|
|
|
|
Hi,
When I use the below jcl to see the layout of COBOL copybook, the output is always expanding the occurrences (OCCURS clause).
In Fileaid (Option - 8), we can choose Y or N (Expand Occurrences ===>) to view the expanded layout or not. Similarly, in Fileaid batch, is there a parameter which I can use with ($$DD01 RLPRINT) so that the output layout will NOT be expanding the occurrences.
Content of cobol copybook ds ==> UID.USER.TEST.CPY1
Code: |
********************************* Top of Data **********************************
01 WS-GROUP-REC. 00000100
05 WS-ID PIC 9(10). 00000110
05 WS-FNAME PIC X(10). 00000200
05 WS-LNAME PIC X(20). 00000400
05 WS-DEPARTMENT OCCURS 02 TIMES. 00000500
10 WS-DEP-ID PIC 9(05). 00000600
10 WS-DEP-NAME PIC X(10). 00000700
******************************** Bottom of Data ********************************
|
Content of Fileaid batch JCL to print the report layout
Code: |
//UIDJ JOB MSGCLASS=X,CLASS=X,MSGLEVEL=1,
// NOTIFY=&SYSUID
//**********************************************************************
//* FILEAID PROGRAM TO PRINT THE RECORD LAYOUT
//**********************************************************************
//STEP0010 EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//DD01 DD DSN=UID.USER.TEST.CPY1,DISP=SHR
//DD01RL DD SYSOUT=*
//DD01O DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
$$DD01 RLPRINT
/*
|
Output of above JCL
Code: |
------- FIELD LEVEL/NAME ---------- --PICTURE-- FLD START END LENGTH
WS-GROUP-REC 1 70 70
5 WS-ID 9(10) 1 1 10 10
5 WS-FNAME X(10) 2 11 20 10
5 WS-LNAME X(20) 3 21 40 20
5 WS-DEPARTMENT(1) OCCURS 2 TIMES
GROUP 4 41 55 15
10 WS-DEP-ID(1) 9(5) 5 41 45 5
10 WS-DEP-NAME(1) X(10) 6 46 55 10
5 WS-DEPARTMENT(2) GROUP 4 56 70 15
10 WS-DEP-ID(2) 9(5) 5 56 60 5
10 WS-DEP-NAME(2) X(10) 6 61 70 10
*** END OF LAYOUT REPORT ***
|
Expected output of Fileaid batch
Code: |
FIELD
--------- FIELD LEVEL/NAME ---------- -PICTURE- -NUMBER START END LENGTH
WS-GROUP-REC 1 70 70
5 WS-ID 9(10) 1 1 10 10
5 WS-FNAME X(10) 2 11 20 10
5 WS-LNAME X(20) 3 21 40 20
5 WS-DEPARTMENT(1) OCCURS 2 TIMES
GROUP 4 41 55 15
10 WS-DEP-ID(1) 9(5) 5 41 45 5
10 WS-DEP-NAME(1) X(10) 6 46 55 10
******************************* Bottom of data ********************************
|
|
|
maki_psg
New User
Joined: 28 Jan 2010 Posts: 47 Location: India
|
|
|
|
I found the parm, which needs to be included with $$DD01 RLPRINT.
If we include EXPAND_OCCURS=N, then we will get ONLY the 1st occurrence in the report layout output.
Code: |
//**********************************************************************
//* FILEAID PROGRAM TO PRINT THE RECORD LAYOUT
//**********************************************************************
//STEP0010 EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//DD01 DD DSN=UID.USER.TEST.CPY1,DISP=SHR
//DD01RL DD SYSOUT=*
//DD01O DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
$$DD01 RLPRINT, EXPAND_OCCURS=N
/*
|
|
|