View previous topic :: View next topic
|
Author |
Message |
mf_user Currently Banned New User
Joined: 05 Jan 2006 Posts: 47
|
|
|
|
Syncsort experts,
I have the following data in a file:
ABCD#FGHIJKLMNOPQRSTUVWXYZ
wherever I find # then that should be replaced with 'E'.
How to achieve this in SYNCSORT? Any help please.
Thanks in advance. |
|
Back to top |
|
|
Gautam512
Active User
Joined: 05 Oct 2005 Posts: 308 Location: Vizag / US
|
|
|
|
How many records do u have ? |
|
Back to top |
|
|
mf_user Currently Banned New User
Joined: 05 Jan 2006 Posts: 47
|
|
|
|
I kept 100 records in the input file. |
|
Back to top |
|
|
Gautam512
Active User
Joined: 05 Oct 2005 Posts: 308 Location: Vizag / US
|
|
|
|
Hi,
Do u want that to be done in syncsort or any other way is also ok.
The other way is open the file in edit mode and type on the command line
This on of the simple way....
Thanks,
Gau |
|
Back to top |
|
|
mf_user Currently Banned New User
Joined: 05 Jan 2006 Posts: 47
|
|
|
|
Thanks for the idea !!
We need to implement this in a job that runs in PROD region. I can't edit the PROD files with my id. We are looking towards a solution that works for some time (as long as data comes in like that).
Any help? |
|
Back to top |
|
|
suganthyprabha
New User
Joined: 28 Jul 2005 Posts: 58
|
|
|
|
Hi,
Try this Job, this Job will change the Char '#' in the 5 th Position to 'E',
If the match is not found then it will copy the Record as it is. Please let
me know if any concerns.
//JobA JOB (U,1091),'aaaa',CLASS=0,MSGCLASS=J,MSGLEVEL=(1,1),
// NOTIFY=&SYSUID
//S1 EXEC PGM=SORT
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=A.B.PS,DISP=SHR
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
INREC FIELDS=(1,4,5,1,
CHANGE=(1,C'#',C'E'),NOMATCH=(5,1),
6,74)
/*
Thanks and Regards,
Suganthy. |
|
Back to top |
|
|
mf_user Currently Banned New User
Joined: 05 Jan 2006 Posts: 47
|
|
|
|
Hi Suganthy,
It worked out very well........
Yeah.....the copying of remaining records can be handled by OMIT !?
Thanks a lot. |
|
Back to top |
|
|
mf_user Currently Banned New User
Joined: 05 Jan 2006 Posts: 47
|
|
|
|
Hi Suganthy,
By the way, what can be changed to suit to replace any character in the 5th position?
Please suggest.
Thanks once again. |
|
Back to top |
|
|
ranga_subham
New User
Joined: 01 Jul 2005 Posts: 51
|
|
|
|
We can also use the following File-aid batch job to replace the character.
//*
//STEP01 EXEC PGM=FILEAID
//*
//SYSUDUMP DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//SYSTOTAL DD SYSOUT=*
//*
//DD01 DD DSN=INPUT.FILE,DISP=SHR
//DD01O DD DSN=OUTPUT.FILE,DISP=OLD
//*
//SYSIN DD *
$$DD01 COPY RA=(5,5,C'#',C'E')
//*
Provided if File-Aid is there in their shop. Just another way of doing it.
HTH |
|
Back to top |
|
|
|