View previous topic :: View next topic
|
Author |
Message |
levaku Warnings : 1 New User
Joined: 03 Jul 2008 Posts: 5 Location: chennai
|
|
|
|
Hi
can anybody suggest me how to change a particular column value in a file.
ex: starting position in 10, length 2,alphanumeric.
As the file is huge i am not able to use C ALL 'SS' 'VV' 10.
please suggest me a general sort using OUTREC concept instead of ICETOOL. |
|
Back to top |
|
|
ParagChouguley
Active User
Joined: 03 Feb 2007 Posts: 175 Location: PUNE(INDIA)
|
|
|
|
Use this sortcard
Code: |
//SYSIN DD *
OPTION COPY
OUTREC IFTHEN=(WHEN=(10,2,CH,EQ,C'SS'),
OVERLAY=(10:C'VV'))
/*
|
|
|
Back to top |
|
|
Vasukip Currently Banned New User
Joined: 17 Jun 2008 Posts: 48 Location: Chennai
|
|
|
|
Hi,
Try ds code !
Code: |
//R010 EXEC PGM=SORT
//SORTIN DD *
123 AAAA SS
222 BBBB X2
444 DDDD SS
/*
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
OUTREC OVERLAY=(10:10,2,CHANGE=(2,C'SS',C'VV'),
NOMATCH=(C'OO'))
/*
//SYSOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=A
//* |
Code: |
Output
123 AAAA VV
222 BBBB OO
444 DDDD VV
|
|
|
Back to top |
|
|
levaku Warnings : 1 New User
Joined: 03 Jul 2008 Posts: 5 Location: chennai
|
|
|
|
its working! |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi Vaas,
i didn't see anywhere where nomatch was to be changed as well.
Gerry |
|
Back to top |
|
|
Vasukip Currently Banned New User
Joined: 17 Jun 2008 Posts: 48 Location: Chennai
|
|
|
|
gcicchet wrote: |
Hi Vaas,
i didn't see anywhere where nomatch was to be changed as well.
|
Hi Gerry,
Could you plz check "X2" on behalf of "SS" in second Record. |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
I maybe missing something but all I can see is a request to change SS to VV in col 10, nothing about X2 to OO
Gerry |
|
Back to top |
|
|
Vasukip Currently Banned New User
Joined: 17 Jun 2008 Posts: 48 Location: Chennai
|
|
|
|
Just for info, I ve given "NOMATCH" condition also ! |
|
Back to top |
|
|
|