Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
sort with selection and updating the trailer with new count

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

New User


Joined: 27 Sep 2006
Posts: 13
Location: India

PostPosted: Fri Feb 15, 2013 5:27 pm    Post subject: sort with selection and updating the trailer with new count
Reply with quote

Hi,

this is my input

Header - 15/02/2013
ABC 101 250
BCD 101 350
XQW 201 450
REW 201 550
Trailer-00004

i want output as (select only value '101' in position 5)

Header - 15/02/2013
ABC 101 250
BCD 101 350
Trailer-00002

kindly help to achieve this using Sort or ICETOOL
Back to top
View user's profile Send private message

Skolusu

Senior Member


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

PostPosted: Fri Feb 15, 2013 10:54 pm    Post subject:
Reply with quote

smileseenu,

Use the following DFSORT JCL which will give you the desired results
Code:

//STEP0100 EXEC PGM=SORT                               
//SYSOUT   DD SYSOUT=*                                 
//SORTIN   DD *                                         
HEADER - 15/02/2013                                     
ABC 101 250                                             
BCD 101 350                                             
XQW 201 450                                             
REW 201 550                                             
TRAILER-00004                                           
//SORTOUT  DD SYSOUT=*                                 
//SYSIN    DD *                                         
  INCLUDE COND=(5,3,CH,EQ,C'101',OR,                   
                1,7,SS,EQ,C'TRAILER,HEADER ')           
  OPTION COPY                                           
  OUTFIL IFTRAIL=(HD=YES,TRLID=(1,7,CH,EQ,C'TRAILER'), 
  TRLUPD=(09:COUNT=(M11,LENGTH=5)))                     
//*


For complete details on IFTRAIL and other 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
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 Skip records depends on count lakshmiibmmainframes DFSORT/ICETOOL 5 Sun Dec 24, 2017 9:51 pm
No new posts SORT BUT RETAIN HIGHEST VALUE ON NON-... leondan22 DFSORT/ICETOOL 2 Thu Dec 14, 2017 8:13 pm
No new posts ISMF Difference between volume count ... upendrasri IBM Tools 2 Tue Dec 05, 2017 12:40 pm
No new posts Extract record for change in combinat... Trinadh DFSORT/ICETOOL 6 Thu Nov 23, 2017 3:32 pm
No new posts JOINKEYS Paired and Unpaired Sort on ... MFwhiz DFSORT/ICETOOL 7 Tue Nov 07, 2017 2:46 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us