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
 

 

replacing a character using SYNCSORT.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
mf_user
Currently Banned

New User


Joined: 05 Jan 2006
Posts: 47

PostPosted: Fri Jan 13, 2006 12:15 pm    Post subject: replacing a character using SYNCSORT.
Reply with quote

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
View user's profile Send private message

Gautam512

Active User


Joined: 05 Oct 2005
Posts: 309
Location: Vizag / US

PostPosted: Fri Jan 13, 2006 12:22 pm    Post subject: Re: replacing a character using SYNCSORT.
Reply with quote

How many records do u have ?
Back to top
View user's profile Send private message
mf_user
Currently Banned

New User


Joined: 05 Jan 2006
Posts: 47

PostPosted: Fri Jan 13, 2006 12:28 pm    Post subject: Re: replacing a character using SYNCSORT.
Reply with quote

I kept 100 records in the input file.
Back to top
View user's profile Send private message
Gautam512

Active User


Joined: 05 Oct 2005
Posts: 309
Location: Vizag / US

PostPosted: Fri Jan 13, 2006 12:40 pm    Post subject: Re: replacing a character using SYNCSORT.
Reply with quote

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

Code:
C ALL '#' 'E'


This on of the simple way....

Thanks,
Gau
Back to top
View user's profile Send private message
mf_user
Currently Banned

New User


Joined: 05 Jan 2006
Posts: 47

PostPosted: Fri Jan 13, 2006 1:30 pm    Post subject: it is a prod job.
Reply with quote

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
View user's profile Send private message
suganthyprabha

New User


Joined: 28 Jul 2005
Posts: 58

PostPosted: Fri Jan 13, 2006 2:52 pm    Post subject: Re: replacing a character using SYNCSORT.
Reply with quote

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
View user's profile Send private message
mf_user
Currently Banned

New User


Joined: 05 Jan 2006
Posts: 47

PostPosted: Fri Jan 13, 2006 6:01 pm    Post subject: Re: replacing a character using SYNCSORT.
Reply with quote

Hi Suganthy,

It worked out very well........

Yeah.....the copying of remaining records can be handled by OMIT !?

Thanks a lot.
Back to top
View user's profile Send private message
mf_user
Currently Banned

New User


Joined: 05 Jan 2006
Posts: 47

PostPosted: Fri Jan 13, 2006 6:03 pm    Post subject: how to replace any charcter.
Reply with quote

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
View user's profile Send private message
ranga_subham

New User


Joined: 01 Jul 2005
Posts: 51

PostPosted: Wed Jan 18, 2006 6:16 pm    Post subject: Re: replacing a character using File-Aid
Reply with quote

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. icon_wink.gif

HTH
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 6 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