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
 
JCL SORT copy

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

New User


Joined: 27 Mar 2006
Posts: 95
Location: India

PostPosted: Mon Dec 15, 2008 2:32 pm    Post subject: JCL SORT copy
Reply with quote

Hi

Follwoing ing the input file format :

Code:

000CDT01P00006443TCDS"CreditDefaultSwapShort       
000CDT01P000CDT02TCDS"CreditDefaultSwapShort       
000CDT01P000CDT02TCDS"CreditDefaultSwapShort       
000CDT01P00006442TCDS"CreditDefaultSwapShort       
000CDT01P00006443TCDS"CreditDefaultSwapShort       
000CDT01P00006443TCDS"CreditDefaultSwapShort       
000CDT01P00006443TCDS"CreditDefaultSwapShort       
000CDT01P00006442TCDS"CreditDefaultSwapShort       
000CDT01P00006442TCDS"CreditDefaultSwapShort       
000CDT01P000CDT02TCDT"CreditDefaultSwapIndexTranche
000CDT01P000CDT02TCDT"CreditDefaultSwapIndexTranche


i want the output as below

IF 19:3 = CDS THEN add 'PMS' at the end of the record

Code:

000CDT01P00006443TCDS"CreditDefaultSwapShort              'PMS'
000CDT01P000CDT02TCDS"CreditDefaultSwapShort              'PMS'
000CDT01P000CDT02TCDS"CreditDefaultSwapShort              'PMS'
000CDT01P00006442TCDS"CreditDefaultSwapShort              'PMS'
000CDT01P00006443TCDS"CreditDefaultSwapShort              'PMS'
000CDT01P00006443TCDS"CreditDefaultSwapShort              'PMS'
000CDT01P00006443TCDS"CreditDefaultSwapShort              'PMS'
000CDT01P00006442TCDS"CreditDefaultSwapShort              'PMS'
000CDT01P00006442TCDS"CreditDefaultSwapShort              'PMS'
000CDT01P000CDT02TCDT"CreditDefaultSwapIndexTranche
000CDT01P000CDT02TCDT"CreditDefaultSwapIndexTranche


please corrcet my syntax.
Code:

  SORT FIELDS=COPY                                     
  OUTREC IFTHEN=(WHEN=(19,3,CH,EQ,'CDT'),                               
                  BUILD=(42,3,C'PMS')),...
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Mon Dec 15, 2008 9:46 pm    Post subject:
Reply with quote

You didn't say what you mean by 'end of the record', so I assumed you meant you want 'PMS' in positions 59-63 in which case you can use this DFSORT OUTREC statement:

Code:

  OUTREC IFTHEN=(WHEN=(19,3,CH,EQ,C'CDS'),   
    OVERLAY=(59:C'''PMS'''))                 


If you want another starting position for 'PMS', change 59: to what you want.
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 Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
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 OC4 in SORT Mohan Kothakota DFSORT/ICETOOL 2 Tue Sep 12, 2017 6:30 pm

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