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 remove spaces between variable... Selvarajars DFSORT/ICETOOL 7 Fri Jul 27, 2018 3:58 pm
No new posts finding anydata between positions of ... ram_vizag SYNCSORT 13 Tue Jul 17, 2018 9:14 pm
No new posts To remove spaces from a VB file using... Selvarajars DFSORT/ICETOOL 5 Thu Jun 21, 2018 6:57 pm
No new posts CA SYSVIEW - MQTHRESH updating dynami... Anilkumarmq CA Products 2 Fri Jun 08, 2018 2:06 pm
No new posts Dynamically updating the MQ monitorin... Anilkumarmq Java & MQSeries 0 Fri Jun 08, 2018 2:05 pm

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