Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 0 Mon Jan 02, 2017 11:16 am
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us