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
 

 

Changing a field in a file using SYNCSORT

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

New User


Joined: 26 Sep 2007
Posts: 25
Location: chennai

PostPosted: Fri Jan 18, 2008 6:14 pm    Post subject: Changing a field in a file using SYNCSORT
Reply with quote

Hi,

My file format is as follows.

RECFM=VB,LRECL=3000

09949493940.............NHDFJFK0916000098EPT4949489349.......

I want to copy the above file by changing EPT4(comes at position 580) to EPT2. Else is same.

Could anybody help me in this regard ?
Back to top
View user's profile Send private message

Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Fri Jan 18, 2008 6:58 pm    Post subject: Reply to: Changing a field in a file using SYNCSORT
Reply with quote

Krishna,

Quote:
I want to copy the above file by changing EPT4(comes at position 580) to EPT2. Else is same.


Use INREC and BUILD/OVERLAY for your requirement. As it is VB make sure to include 4 bytes for RDW.
Back to top
View user's profile Send private message
acevedo

Active User


Joined: 11 May 2005
Posts: 344
Location: Spain

PostPosted: Fri Jan 18, 2008 7:07 pm    Post subject:
Reply with quote

or use the CHANGE option in OUTREC.
Back to top
View user's profile Send private message
skrishnavijay

New User


Joined: 26 Sep 2007
Posts: 25
Location: chennai

PostPosted: Fri Jan 18, 2008 7:20 pm    Post subject:
Reply with quote

Hi,

I have the following problem

my SYSIN card

//SYSIN DD *
OPTION COPY
OUTREC FIELDS=(1,583,584,4,CHANGE=(4,C'EPT4',C'EPT2'),588,2413)
/*

I am getting error as

SORTIN : RECFM=VB ; LRECL= 3000; BLKSIZE= 27988
OUTREC RECORD LENGTH = 3000
SORTOUT : RECFM=VB ; LRECL= 3000; BLKSIZE= 27998
OUTREC - SHORT RECORD
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 500
Location: USA

PostPosted: Tue Jan 22, 2008 3:49 am    Post subject: Reply to: Changing a field in a file using SYNCSORT
Reply with quote

skrishnavijay,

If you do not have any records shorter than 588, then you can use the following:
Code:

OUTREC FIELDS=(1,583,584,4,CHANGE=(4,C'EPT4',C'EPT2'),588)

However, if you do not know the length of your shortest record, you can use HISTOGRM to determine this.
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 Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm
No new posts SSH - known_hosts file configuration vasanthz All Other Mainframe Topics 2 Wed Jul 26, 2017 2:10 am
No new posts BI,TO=ZD Changing Values Tyler Dunbar DFSORT/ICETOOL 4 Tue Jul 25, 2017 12:12 am
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am


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