MVSFORUMS.com A Community of and for MVS Professionals
View previous topic :: View next topic
Author
Message
sivafdms Intermediate Joined: 29 May 2007 Posts: 165 Topics: 77
Posted: Sat Jan 10, 2009 10:07 am Post subject: Want to replace values in output file
Hi All,
I have following data and i need to change whenever i find NE06 change to NE61, same with NE07,NE08(i.e NE07 to NE71 & NE08 to NE81). Data starts from column from 1.Could anybody provide me a jcl using SYNCSORT.
Code: MD1033012315761475160110200900000000082
NE0635012314772079190109200900000000003
NE0635012315761999420110200900000000004
NE0735412314772036380109200900000000001
NE0735412314772076400109200900000000002
NE0735412315761494260110200900000000001
NE0835712314772047600109200900000000096
NE0835712314772047620109200900000000002
NE0835712314772047640109200900000000003
NY0734712315676378920110200900000000005
NY0734712315676508970110200900000000064
Thanks,
Siva
Back to top
mf_user Intermediate Joined: 01 Jun 2003 Posts: 372 Topics: 105
Posted: Mon Jan 12, 2009 4:23 am Post subject: Is this what you want?
Hi,
Is this what you want to achieve?
Code:
//STEP0001 EXEC PGM=SORT
//SORTIN DD *
MD1033012315761475160110200900000000082
NE0635012314772079190109200900000000003
NE0635012315761999420110200900000000004
NE0735412314772036380109200900000000001
NE0735412314772076400109200900000000002
NE0735412315761494260110200900000000001
NE0835712314772047600109200900000000096
NE0835712314772047620109200900000000002
NE0835712314772047640109200900000000003
NY0734712315676378920110200900000000005
NY0734712315676508970110200900000000064
//SYSOUT DD SYSOUT=*
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
INREC IFTHEN=(WHEN=(1,4,SS,EQ,C'NE06'),OVERLAY=(1:C'NE61')),
IFTHEN=(WHEN=(1,4,SS,EQ,C'NE07'),OVERLAY=(1:C'NE71')),
IFTHEN=(WHEN=(1,4,SS,EQ,C'NE08'),OVERLAY=(1:C'NE81'))
/*
//*
Output:
Code:
MD1033012315761475160110200900000000082
NE6135012314772079190109200900000000003
NE6135012315761999420110200900000000004
NE7135412314772036380109200900000000001
NE7135412314772076400109200900000000002
NE7135412315761494260110200900000000001
NE8135712314772047600109200900000000096
NE8135712314772047620109200900000000002
NE8135712314772047640109200900000000003
NY0734712315676378920110200900000000005
NY0734712315676508970110200900000000064
HTH. _________________ MF
==
Any training that does not include the emotions, mind and body is incomplete; knowledge fades without feeling.
==
Back to top
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum