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

Inserting Bytes in middle of a record


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Nirav721

New User


Joined: 11 Feb 2008
Posts: 53
Location: NJ

PostPosted: Wed Feb 20, 2008 4:16 am
Reply with quote

Hi,

I am wondering if there is any way to insert 4 bytes in middle of a record. I want to shift everything over by 4 bytes without too much hassel. I do not want to get into moving blocks of record from one place to next and then attaching everything...?

Any suggestions are appreciated!!

Thanks!
Back to top
View user's profile Send private message
Nirav721

New User


Joined: 11 Feb 2008
Posts: 53
Location: NJ

PostPosted: Wed Feb 20, 2008 4:17 am
Reply with quote

I forgot to mention that this is in assembler...Thanks!
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Feb 20, 2008 4:24 am
Reply with quote

Hello Nirav and welcome to the forums,

Unless i misunderstand what you want to do, you could simply define a new area that has 3 "pieces" - the first is however many bytes are needed before the new 4 bytes, the second is the new 4 bytes, and the 3rd is the remainder of the bytes from the original record.

You could MVC (or MVCL if needed) the first and last parts of the record to the new areas and put whatever you want in the new 4 bytes.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Wed Feb 20, 2008 4:28 am
Reply with quote

Nirav721 wrote:
I am wondering if there is any way to insert 4 bytes in middle of a record.
Have you considered the extremely simple application of a sort copy reformat?
Back to top
View user's profile Send private message
Nirav721

New User


Joined: 11 Feb 2008
Posts: 53
Location: NJ

PostPosted: Wed Feb 20, 2008 4:54 am
Reply with quote

Hi, thanks for the suggestions...

The reason why I do not want to get into defining '3' blocks is because I could have a record where I might need to insert the 4 bytes multiple times. Basically, I am going through bunch of macros, and I need to update these records that have DATE field defined as PL4 CYYMMDD, to be CL8 MMDDYYYY. There are some macros that might have this 1 time, and some would have 10 or even 20 times. So, I am trying to find out if there is a 'seamless' way of doing this...?
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Wed Feb 20, 2008 5:13 am
Reply with quote

[quote="Nirav721I am going through bunch of macros, and I need to update these records that have DATE field defined as PL4 CYYMMDD, to be CL8 MMDDYYYY. There are some macros that might have this 1 time, and some would have 10 or even 20 times. So, I am trying to find out if there is a 'seamless' way of doing this...?[/quote]Seamless, I doubt it.....
You'll probably just have to bite the bullet and do it the long way.... icon_sad.gif
Back to top
View user's profile Send private message
Nirav721

New User


Joined: 11 Feb 2008
Posts: 53
Location: NJ

PostPosted: Wed Feb 20, 2008 6:13 am
Reply with quote

Ouch...there is a big hit in productivity for sure!! Time to become a robot and just repeat brainless work.....gotta love assembler for it!
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 -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts Validating record count of a file is ... DFSORT/ICETOOL 13
Search our Forums:

Back to Top