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

help needed in SYNCSORT


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vishal.iitr2003
Currently Banned

New User


Joined: 25 Jan 2008
Posts: 18
Location: India

PostPosted: Mon Mar 17, 2008 5:07 pm
Reply with quote

my input is something like this

aaaa1bbbb
aaaa1bbbb
aaaa2bbbb
aaaa2bbbb

whereever the fifth byte is 1 i need to change b's to c
but i dont want to touch records having 2 at fifth byte n copy them as they are.

I am able to achieve the first target by using following sort card

sort fields =copy
include cond = (5,a,ch,eq,'1')
outrec fields =(1:1,5,6:c'cccc)

but other records are getting filtered out....
what should i add in this sort card so that records having fifth byte =2 are copied without any change.
Back to top
View user's profile Send private message
ParagChouguley

Active User


Joined: 03 Feb 2007
Posts: 175
Location: PUNE(INDIA)

PostPosted: Mon Mar 17, 2008 6:57 pm
Reply with quote

Code:

//S1      EXEC PGM=ICETOOL                           
//TOOLMSG DD SYSOUT=*                               
//DFSMSG  DD SYSOUT=*                               
//IN1     DD *                                       
AAAA1BBBB                                           
AAAA1BBBB                                           
AAAA2BBBB                                           
AAAA2BBBB                                           
/*                                                   
//OUT1    DD DSN=OUTPUT-FILE-NAME,                   
//      DSORG=PS,RECFM=FB,                           
//      DISP=(NEW,CATLG,DELETE)                     
//TOOLIN  DD *                               
    COPY FROM(IN1) TO(OUT1) USING(SRT1)     
/*                                           
//SRT1CNTL DD *                             
    OPTION COPY                             
    OUTREC IFTHEN=(WHEN=(5,1,CH,EQ,C'1'),   
                   BUILD=(1,5,C'CCCC')),     
           IFTHEN=(WHEN=NONE,               
                   BUILD=(1,9))             
/*                                           


Output:
Code:

AAAA1CCCC
AAAA1CCCC
AAAA2BBBB
AAAA2BBBB


--Parag
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Mainframe Programmer with CICS Skill... Mainframe Jobs 0
No new posts Help needed to assemble IMS sample co... ABENDS & Debugging 4
No new posts RABBIT HOLE NEEDED - "Live"... All Other Mainframe Topics 0
No new posts Count Records with a crietaria in a f... DFSORT/ICETOOL 5
Search our Forums:

Back to Top