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

Replace 2 bytes value with 1 byte in a VB file


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
TS70363

New User


Joined: 07 Apr 2010
Posts: 94
Location: Bangalore, India

PostPosted: Mon Sep 03, 2012 10:22 pm
Reply with quote

Hi,

Using Syncsort, I am looking to replace '@@' (X'7C') which appears anywhere in my record with '#' (X'7D')

File information:
Record format . . . : VB
Record length . . . : 2040



Code:

//SYSIN    DD *                                           
 SORT FIELDS=COPY                                         
 INREC IFTHEN=(WHEN=(??,??,CH,EQ,X'7C7C'),OVERLAY=(??:X'7B'))
/*                                                       


Can anyone suggest the value of ??. or anyother SORT which can help me achieve?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Sep 03, 2012 10:25 pm
Reply with quote

if You want to substitute two chars with one , You will have to rebuild the record
overlaying one char will simply mess up things
Back to top
View user's profile Send private message
TS70363

New User


Joined: 07 Apr 2010
Posts: 94
Location: Bangalore, India

PostPosted: Mon Sep 03, 2012 10:29 pm
Reply with quote

But I dont know the position at which @@ will occur.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Sep 03, 2012 11:17 pm
Reply with quote

Look at FINDREP in your documentation. Search the forum.
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 4
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
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top