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
 

 

help needed in SYNCSORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: help needed in SYNCSORT
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SYNCSORT SEQNUM and FI fields. nartcr SYNCSORT 7 Sat Jan 21, 2017 4:02 am
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am
No new posts Syncsort - NULL in Integer field chec... nartcr SYNCSORT 4 Thu Oct 06, 2016 6:47 am


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