IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Change of Char by using JCL.


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Vineet

New User


Joined: 14 Sep 2005
Posts: 20

PostPosted: Wed Aug 30, 2006 3:08 pm
Reply with quote

Hi All,
I have a sequential file. I want to repalce char. appearing at 5th, 20th & 30th position by 'N', 'Y', 'A'. I DONT want to do this by writing COBOL Pgm. want to do by JCL only. Please suggest how to go for it.

Thanx
Rgds

Vineet
Back to top
View user's profile Send private message
Dariusz
Warnings : 1

New User


Joined: 11 Aug 2005
Posts: 27
Location: POLAND

PostPosted: Wed Aug 30, 2006 4:09 pm
Reply with quote

Hi.
The simple solution it is change command,but I don't know very many questions:
How this file is big ?
Is it FB or VB file ?
Depend on above we can use ISPF EDITOR or CLIST or IEBUPDATE program.
Regards.
Back to top
View user's profile Send private message
IQofaGerbil

Active User


Joined: 05 May 2006
Posts: 183
Location: Scotland

PostPosted: Wed Aug 30, 2006 4:40 pm
Reply with quote

Will this do it? (assuming 80 char file here)

Code:

//S1ASORT  EXEC PGM=SORT                                     
//SYSOUT   DD  SYSOUT=X                                       
//SORTIN   DD DSN=MYFILE.SORT1,DISP=SHR                     
//SORTOUT  DD DSN=MYFILE.SORT1,DISP=SHR                     
//SYSIN    DD *                                               
     SORT FIELDS=(COPY)                                 
     OUTREC FIELDS=(1,4,C'Y',6,14,C'N',21,9,C'A',31,50)
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Aug 30, 2006 8:48 pm
Reply with quote

Vineet,

If you want to replace position 5 with 'N', position 20 with 'Y' and position 30 with 'A', you can use the following DFSORT job:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file
//SORTOUT DD DSN=...  output file
//SYSIN    DD    *
  OPTION COPY
  INREC OVERLAY=(5:C'N',20:C'Y',30:C'A')
/*
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Exclude rows with > than x occurre... DFSORT/ICETOOL 6
No new posts 3270 personal communications. Can't c... TSO/ISPF 2
No new posts SELECT from data change table DB2 5
No new posts Trying to change copybook in online c... CICS 4
Search our Forums:

Back to Top