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 How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts JOINKEYS Paired and Unpaired Sort MFwhiz DFSORT/ICETOOL 4 Fri Sep 29, 2017 1:48 am
No new posts Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 5 Fri Sep 22, 2017 4:56 pm
No new posts column with count of rows within dist... ronald wouterson DB2 4 Sun Sep 17, 2017 9:48 pm

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