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
 

 

Count on in a file where we have 4 input files

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

New User


Joined: 11 Dec 2007
Posts: 82
Location: hyderabad

PostPosted: Wed Nov 04, 2009 4:26 pm    Post subject: Count on in a file where we have 4 input files
Reply with quote

Hi All,

Once again a typical senario, Can you please assist. I am using DFSORT

1) file 1 is a 80byte FB file which is having 80 records
2) File 2 is having 100 records, which is also 80 byte FB
3) File 3 is having 150 records which is also 80 byte FB
4) File 4 is having 200 records which is also 80 byte FB

Can i get this count in a file of FB 80 with ths counts

like this
80 100 150 200
Back to top
View user's profile Send private message

vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1506
Location: Chennai

PostPosted: Wed Nov 04, 2009 8:03 pm    Post subject:
Reply with quote

Hi,

Are there only 4 files all the time? Or is it variable?

Regards,
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Wed Nov 04, 2009 10:00 pm    Post subject: Reply to: Count on in a file where we have 4 input files
Reply with quote

Mazahar,

Use the following DFSORT JCL. concatenate a 1 line $$ record before each file so that it can be used an identifier to each file.

Code:

//STEP0100 EXEC PGM=SORT     
//SYSOUT   DD SYSOUT=*       
//SORTIN   DD *             
$$               
//         DD DSN=Your fb 80 byte file1,DISP=SHR 
//         DD * 
$$               
//         DD DSN=Your fb 80 byte file2,DISP=SHR 
//         DD * 
$$               
//         DD DSN=Your fb 80 byte file3,DISP=SHR   
//         DD * 
$$               
//         DD DSN=Your fb 80 byte file4,DISP=SHR
//SORTOUT  DD SYSOUT=*                                               
//SYSIN    DD *                                                     
  SORT FIELDS=COPY                                                   
  INREC IFTHEN=(WHEN=INIT,OVERLAY=(82:4C'0')),                       
  IFTHEN=(WHEN=GROUP,BEGIN=(1,2,CH,EQ,C'$$'),PUSH=(81:ID=1)),       
  IFTHEN=(WHEN=(81,1,ZD,EQ,1,AND,1,2,CH,NE,C'$$'),OVERLAY=(82:C'1')),
  IFTHEN=(WHEN=(81,1,ZD,EQ,2,AND,1,2,CH,NE,C'$$'),OVERLAY=(83:C'1')),
  IFTHEN=(WHEN=(81,1,ZD,EQ,3,AND,1,2,CH,NE,C'$$'),OVERLAY=(84:C'1')),
  IFTHEN=(WHEN=(81,1,ZD,EQ,4,AND,1,2,CH,NE,C'$$'),OVERLAY=(85:C'1'))
                                                                     
  OUTFIL REMOVECC,NODETAIL,BUILD=(80X),                             
  TRAILER1=(TOT=(82,1,ZD,M11,LENGTH=8),X,                           
            TOT=(83,1,ZD,M11,LENGTH=8),X,                           
            TOT=(84,1,ZD,M11,LENGTH=8),X,                           
            TOT=(85,1,ZD,M11,LENGTH=8))                             
//*
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1506
Location: Chennai

PostPosted: Wed Nov 04, 2009 10:38 pm    Post subject:
Reply with quote

icon_eek.gif

Regards,
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 SSH - known_hosts file configuration vasanthz All Other Mainframe Topics 2 Wed Jul 26, 2017 2:10 am
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm


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