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 How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. SORT trick needed bshkris SYNCSORT 6 Tue May 02, 2017 4:35 am
No new posts copy SEQ to PDS and create stats steve-myers JCL & VSAM 5 Thu Apr 27, 2017 1:15 am
No new posts Copy load modules and alias vasanthz IBM Tools 5 Thu Apr 20, 2017 6:31 am


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