IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

JCL SORT copy


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rajesh_mbt

New User


Joined: 27 Mar 2006
Posts: 97
Location: India

PostPosted: Mon Dec 15, 2008 2:32 pm
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 Developer


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

PostPosted: Mon Dec 15, 2008 9:46 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts VB to VB copy - Full length reached SYNCSORT 8
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
Search our Forums:

Back to Top