Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to find copybook info. with the help of DFSORT using IF

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Satish K Kumar

New User


Joined: 06 Oct 2008
Posts: 1
Location: Chennai

PostPosted: Mon Oct 06, 2008 10:39 am    Post subject: How to find copybook info. with the help of DFSORT using IF
Reply with quote

How i can extract the level information from copybook with the help of DFSORT.

The following levels are written in line number:

01 -> 14-15

03 -> 17-18

05 -> 20-21

07, 10 -> 23-24

My requrement is if the variable name is in 01 level then it will extract the level information as copybook name. variable name.
If it is in 03 level then it will extract the level information as copybook name.Level 01 level variable name. 03 level varIABLE.

Code:

  01 UXXX                     
       03 GENXXXX,  /* NOT RESET AT EACH MESSAGE */           
          05 ORIXXXXXX            CHAR(32),                     
          05 ENVXXXX,              CHAR(32),   
             10 GLOXXX              CHAR(32),   
          05 STRATXXXX,   
             07 CSS_XXXXX         CHAR(1),
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Oct 06, 2008 12:59 pm    Post subject:
Reply with quote

Hello and welcome to the forums,

To get useful replies, i believe you need to do a better job of describing what you want to do.

Quote:
The following levels are written in line number:
What does this quote and the list of "line numbers" represent?

Quote:
01 UXXX
03 GENXXXX, /* NOT RESET AT EACH MESSAGE */
05 ORIXXXXXX CHAR(32),
05 ENVXXXX, CHAR(32),
10 GLOXXX CHAR(32),
05 STRATXXXX,
07 CSS_XXXXX CHAR(1),
Is this input or output?

Please show some input and the output you want from that input. Use the "Code" tag to preserve alignment. Do not try to post screen captures but rather use copy/paste. Use Preview to see how your post will appear to the forum (rather than the wat it appears n the reply editor.
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Tue Oct 07, 2008 1:12 am    Post subject: Reply to: How to find copybook info. with the help of DFSORT
Reply with quote

Satish K Kumar,

The following DFSORT JCL will give you the desired results

Code:

//STEP0100 EXEC PGM=ICEMAN                                         
//SYSOUT   DD SYSOUT=*                                             
//SORTIN   DD *                                                   
             01 UXXX                                               
                03 GENXXXX,  /* NOT RESET AT EACH MESSAGE */       
                   05 ORIXXXXXX            CHAR(32),               
                   05 ENVXXXX,              CHAR(32),             
                      10 GLOXXX              CHAR(32),             
                   05 STRATXXXX,                                   
                      07 CSS_XXXXX         CHAR(1),               
//SORTOUT  DD SYSOUT=*                                             
//SYSIN    DD *                                                   
  INCLUDE COND=(14,2,ZD,EQ,1,OR,                                   
                17,2,ZD,EQ,3,OR,                                   
                20,2,ZD,EQ,5,OR,                                   
                23,2,ZD,EQ,7,OR,                                   
                23,2,ZD,EQ,10)                                     
                                                                   
  INREC IFTHEN=(WHEN=(14,2,ZD,EQ,1),BUILD=(16,64)),               
    IFTHEN=(WHEN=(17,2,ZD,EQ,3),BUILD=(19,61)),                     
    IFTHEN=(WHEN=(20,2,ZD,EQ,5),BUILD=(22,58)),                     
    IFTHEN=(WHEN=(23,2,ZD,GE,7),BUILD=(25,55))                       
                                                                   
  SORT FIELDS=COPY                                                 
/*                                                                 


The output from this job is

Code:

 UXXX                                       
 GENXXXX,  /* NOT RESET AT EACH MESSAGE */   
 ORIXXXXXX            CHAR(32),             
 ENVXXXX,              CHAR(32),             
 GLOXXX              CHAR(32),               
 STRATXXXX,                                 
 CSS_XXXXX         CHAR(1),                 


If you just need the variable names then add the OUTREC statement with parse as shown below.

Code:

//STEP0100 EXEC PGM=ICEMAN                                         
//SYSOUT   DD SYSOUT=*                                             
//SORTIN   DD *                                                   
             01 UXXX                                               
                03 GENXXXX,  /* NOT RESET AT EACH MESSAGE */       
                   05 ORIXXXXXX            CHAR(32),               
                   05 ENVXXXX,              CHAR(32),             
                      10 GLOXXX              CHAR(32),             
                   05 STRATXXXX,                                   
                      07 CSS_XXXXX         CHAR(1),               
//SORTOUT  DD SYSOUT=*                                             
//SYSIN    DD *                                                   
  INCLUDE COND=(14,2,ZD,EQ,1,OR,                                   
                17,2,ZD,EQ,3,OR,                                   
                20,2,ZD,EQ,5,OR,                                   
                23,2,ZD,EQ,7,OR,                                   
                23,2,ZD,EQ,10)                                     
                                                                   
  INREC IFTHEN=(WHEN=(14,2,ZD,EQ,1),BUILD=(16,64)),               
    IFTHEN=(WHEN=(17,2,ZD,EQ,3),BUILD=(19,61)),                     
    IFTHEN=(WHEN=(20,2,ZD,EQ,5),BUILD=(22,58)),                     
    IFTHEN=(WHEN=(23,2,ZD,GE,7),BUILD=(25,55))                       
                                                                   
  SORT FIELDS=COPY                                                 
                                                                   
  OUTREC PARSE(%00=(ABSPOS=2,ENDBEFR=C' ',ENDBEFR=C',',FIXLEN=80)),
    BUILD=(%00)                                                     
/*                                                                 


This will produce

Code:

UXXX       
GENXXXX   
ORIXXXXXX 
ENVXXXX   
GLOXXX     
STRATXXXX 
CSS_XXXXX 
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm
No new posts How to find the first monday of the w... abdulrafi COBOL Programming 10 Fri Nov 25, 2016 3:24 pm
No new posts IMS Database backup info ashek15 IMS DB/DC 14 Wed Nov 16, 2016 5:29 am
No new posts How to get the remainder and quotient... vnktrrd DFSORT/ICETOOL 2 Mon Oct 31, 2016 10:59 am
No new posts Find out a active PGM jpsager JCL & VSAM 10 Fri Oct 07, 2016 4:32 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us