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

Replace a string in a VB file and copy it to another


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

New User


Joined: 18 May 2022
Posts: 12
Location: India

PostPosted: Wed May 18, 2022 10:28 am
Reply with quote

Greetings everyone,

My requirement is to replace a string for eg: '920220517172508' with '120220517172508' in the input VB file.

I am using the below JCL

//RS28753B JOB 'SORT1','D SINGH X44962',
// SCHENV=ANYSYSTEM,
// CLASS=1,MSGLEVEL=(1,1),MSGCLASS=X,NOTIFY=&SYSUID
//STEP020 EXEC PGM=ICEMAN
//SORTIN DD DSN=RS1234.DM.D220518,DISP=SHR
//SORTOUT DD DSN=RS1234.DM.D220518.A,
// DISP=(NEW,KEEP,DELETE),
// SPACE=(CYL,(28,50),RLSE),
// UNIT=SYSDA,
// DCB=(RECFM=VB,LRECL=2007,BLKSIZE=0)
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
INREC IFTHEN=(WHEN=(41,15,CH,EQ,C'920220517172508'),
OVERLAY=(41:41,15,C'120220517172508'))
//*

Even though I am getting a max cc zero, the string is not getting replaced. Can you please advise?
Back to top
View user's profile Send private message
Rimjhim

New User


Joined: 18 May 2022
Posts: 12
Location: India

PostPosted: Wed May 18, 2022 11:14 am
Reply with quote

The issue got resolved. The issue was with missing RDW.
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1255
Location: Bamberg, Germany

PostPosted: Wed May 18, 2022 11:55 am
Reply with quote

You could have also used FINDREP in this case. Glad you figured your issue out by yourself.
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 Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Replace each space in cobol string wi... COBOL Programming 3
Search our Forums:

Back to Top