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
 

 

Change of Char by using JCL.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Vineet

New User


Joined: 14 Sep 2005
Posts: 18

PostPosted: Wed Aug 30, 2006 3:08 pm    Post subject: Change of Char by using JCL.
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    Post subject: Details.
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    Post subject: Re: Change of Char by using JCL.
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 Moderator


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

PostPosted: Wed Aug 30, 2006 8:48 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Comparing Decimal and CHAR columns rakesh17684 DB2 7 Thu Oct 20, 2016 2:33 am
No new posts Change date (DD/MM/YY) in 2nd record ... uday kiran DFSORT/ICETOOL 12 Wed Sep 07, 2016 10:57 pm
No new posts How to change dataset attributes of m... ignich7 JCL & VSAM 3 Thu Jul 21, 2016 9:17 pm
No new posts GDG vsersion number change Raghu navaikulam JCL & VSAM 5 Fri May 27, 2016 4:49 pm
No new posts Change Data Capture Ron Klop DFSORT/ICETOOL 14 Fri Apr 15, 2016 2:56 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us