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 Innovations in Your Mainframe Sort Arun Raj PC Guides & IT News 4 Wed Mar 15, 2017 10:38 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts SORT requirement sjiraga COBOL Programming 6 Thu Mar 09, 2017 9:11 pm
No new posts SORT to append Month and YEAR in MMYY... tisamf DFSORT/ICETOOL 1 Wed Mar 08, 2017 4:46 pm
No new posts JCL sort Match and NoMatch rakeshsekar1987 SYNCSORT 2 Thu Feb 02, 2017 10:26 pm


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