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 How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. SORT trick needed bshkris SYNCSORT 6 Tue May 02, 2017 4:35 am
No new posts SORT JSON type of data maxsubrat DFSORT/ICETOOL 8 Wed Apr 19, 2017 6:01 pm
No new posts Sort Large record length cmsmoon DFSORT/ICETOOL 14 Tue Apr 11, 2017 5:49 pm


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