IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Expanding occurrences in Fileaid Batch


IBM Mainframe Forums -> Compuware & Other Tools
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
maki_psg

New User


Joined: 28 Jan 2010
Posts: 47
Location: India

PostPosted: Tue Sep 03, 2013 10:49 am
Reply with quote

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 ********************************
Back to top
View user's profile Send private message
maki_psg

New User


Joined: 28 Jan 2010
Posts: 47
Location: India

PostPosted: Tue Sep 03, 2013 12:15 pm
Reply with quote

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                                         
/*                                                                     
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Compuware & Other Tools

 


Similar Topics
Topic Forum Replies
No new posts Search two or more word with FILEAID Compuware & Other Tools 15
No new posts How to get a stack trace on a looping... ABENDS & Debugging 5
No new posts Calling Java method from batch COBOL ... COBOL Programming 5
No new posts Exclude rows with > than x occurre... DFSORT/ICETOOL 6
No new posts Help in Automating Batch JCL jobs mon... JCL & VSAM 3
Search our Forums:

Back to Top