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
 

 

Record count in a seperate file using SORT

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

Active User


Joined: 17 May 2006
Posts: 310

PostPosted: Mon Dec 06, 2010 5:37 pm    Post subject: Record count in a seperate file using SORT
Reply with quote

Below is my job to concatenate the 2 files and then o write them onto another output file ensuring that there are no duplicates.

In the same step, I like to create another file whose contents are as follows:
filename: PROD.CONTROL.FILE
Contents:
PROD.DATA.OUTPUT1 000012345 DATE

Like this, the file conatins the name of the output file (which contains the merged data records) and the record count it and the current date.

Please let me know Whether I can achieve this using the single sort card ?

Code:
//STEP11   EXEC PGM=SORT                                     
//SYSOUT   DD SYSOUT=A                                           
//SORTIN   DD DSN=PROD.DATA.SOURCE1,DISP=SHR
//         DD DSN=PROD.DATA.SOURCE2,DISP=SHR
//SORTOUT  DD  DSN=PROD.DATA.OUTPUT1,
//         DISP=(NEW,CATLG,DELETE),...
//SYSIN DD *
  SORT FIELDS=(1,20,CH,A)
  SUM FIELDS=NONE       
/*
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Tue Dec 07, 2010 6:02 am    Post subject:
Reply with quote

With z/OS DFSORT V1R10 PTF UK90025 or z/OS DFSORT V1R12 PTF UK90026 (Oct, 2010), you can now use DFSORT's new SET Symbols in control statements (JPn) function to do what you asked for like this:

Code:

// SET DSNOUT='PROD.DATA.OUTPUT1'
//STEP11   EXEC PGM=SORT,
// PARM='JP1"&DSNOUT"'
//SYSOUT   DD SYSOUT=*
//SORTIN   DD DSN=PROD.DATA.SOURCE1,DISP=SHR
//         DD DSN=PROD.DATA.SOURCE2,DISP=SHR
//SORTOUT  DD  DSN=&DSNOUT,
//         DISP=(NEW,CATLG,DELETE),UNIT=SYSDA,
//         SPACE=(TRK,(5,5))
//TRL  DD  DSN=PROD.CONTROL.FILE,...
//SYSIN DD *
  SORT FIELDS=(1,20,CH,A)
  SUM FIELDS=NONE
  OUTFIL FNAMES=SORTOUT
  OUTFIL FNAMES=TRL,
   REMOVECC,NODETAIL,
   TRAILER1=(JP1,X,COUNT=(M11,LENGTH=9),X,DATENS=(4MD))
/*


For complete details on the new functions for DFSORT and DFSORT's ICETOOL available with the Oct, 2010 PTF, see:

http://www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000242

If you don't have the Oct, 2010 PTF installed, ask your System Programmer to install it (it's free).
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 Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 2 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 3 Fri Mar 24, 2017 11:51 am
No new posts Record Not found in AlX but record re... mukun264 COBOL Programming 5 Fri Mar 24, 2017 9:28 am
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm


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