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
 

 

Please help me in SORT

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

New User


Joined: 15 May 2008
Posts: 4
Location: Chennai

PostPosted: Tue Nov 03, 2009 5:07 pm    Post subject: Please help me in SORT
Reply with quote

Hi... My requirement is to create an output file in the following format.

Date : 11/03/2009
Count : XXXXXXXXX

Input file will have date at the very first record (position 60 to 67 - CCYYMMDD format).
i.e first record will be date record and remaining records are detail recs. I need the date and count of detail recs in the above format.
Back to top
View user's profile Send private message

Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Tue Nov 03, 2009 6:25 pm    Post subject:
Reply with quote

Hi ,
below step will give you desired output.
Assumed input and output LRECL=80.


Code:

//S1   EXEC  PGM=ICETOOL                                       
//TOOLMSG   DD  SYSOUT=*                                       
//DFSMSG    DD  SYSOUT=*                                       
//IN1  DD DSN=your input dataset
//OUT   DD  DSN=outputdatasetname,DISP=(MOD,CATLG,DELETE),   
//         LRECL=80                                           
//TOOLIN DD *                                                 
  SUBSET FROM(IN1) TO(OUT) KEEP INPUT FIRST USING(CTL1)       
  COUNT FROM(IN1) WRITE(OUT) TEXT('COUNT:') DIGITS(9) WIDTH(80) SUB(1)
/*                                                             
//CTL1CNTL DD *                                               
  OPTION COPY                                                 
  INREC BUILD=(C'DATE :',66,2,C'/',64,2,C'/',60,4,80:X)       
/*
Back to top
View user's profile Send private message
jvsamycts

New User


Joined: 15 May 2008
Posts: 4
Location: Chennai

PostPosted: Tue Nov 03, 2009 7:59 pm    Post subject:
Reply with quote

Thanks Sambhaji.... But i need to attain this using SORT....
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Nov 03, 2009 8:15 pm    Post subject:
Reply with quote

ICETOOL is part of the DFSORT product
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Tue Nov 03, 2009 10:40 pm    Post subject: Reply to: Please help me in SORT
Reply with quote

jvsamycts,

The following DFSORT JCL will give you the desired results

Code:

//STEP0100 EXEC PGM=SORT     
//SYSOUT   DD SYSOUT=*       
//SORTIN   DD DSN=Your input file,DISP=SHR
//SORTOUT  DD SYSOUT=*
//SYSIN    DD *                                 
  SORT FIELDS=COPY                               
  OUTFIL REMOVECC,NODETAIL,                     
  HEADER1=('DATE  : ',64,2,C'/',66,2,C'/',60,4),
  TRAILER1=('COUNT : ',COUNT)                   
//*
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 SORT to unpack a feild shr_amar DFSORT/ICETOOL 7 Fri Jul 07, 2017 4:32 am
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts Optimize sort inrec parse vishwakotin DFSORT/ICETOOL 6 Mon Jun 26, 2017 11:15 pm
No new posts Reduce CPU Times for Join Sort santoshn SYNCSORT 12 Sat Jun 10, 2017 1:40 pm
No new posts Db2 load job abending in SORT mistah kurtz DB2 4 Mon Jun 05, 2017 3:58 pm


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