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

Inserting LOW VALUES in VB file using SORT


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

New User


Joined: 03 Jul 2006
Posts: 11

PostPosted: Fri Jul 02, 2010 11:31 am
Reply with quote

Hi,
I have a VB file length have 500 bytes
I want insert low values at 100 position for length of 200 bytes.

your suggestions are appreciated.

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

Active User


Joined: 02 Sep 2005
Posts: 189
Location: Noida

PostPosted: Fri Jul 02, 2010 1:51 pm
Reply with quote

By inserting 200 bytes of low values, do you want to increase the length of file by 200 bytes or you want to replace the 200 bytes starting from position 100 ?

You may try the below code:

Code:

   OPTION COPY
   INREC BUILD=(5,99,200X'00',105,401)


O/P file length will increase by 200 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: Fri Jul 02, 2010 3:47 pm
Reply with quote

Or use OVERLAY: Reformat each record by specifying just the items that overlay specific columns. Overlay lets you change specific existing columns without affecting the entire record.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Fri Jul 02, 2010 9:11 pm
Reply with quote

hikaps14,

Your control statements would NOT work. Please don't post untested code.

Trumpcards,

You could use these DFSORT control statements if you want to insert 200 binary zeros:

Code:

  OPTION COPY                     
  INREC BUILD=(1,99,200X'00',100) 


You could use these DFSORT control statements if you want to overlay 200 binary zeros:

Code:

   OPTION COPY
   INREC OVERLAY=(100:200X'00')


I'm assuming when you give positions, you're counting the RDW in positions 1-4.
Back to top
View user's profile Send private message
hikaps14

Active User


Joined: 02 Sep 2005
Posts: 189
Location: Noida

PostPosted: Sat Jul 03, 2010 12:45 pm
Reply with quote

Apologies for posting an untested job.

Code:

  OPTION COPY                     
  INREC BUILD=(1,99,200X'00',100) 


Though I learnt something new about build.

If we give the starting position(100) at end of our build statement. It itself copies data till end of record(500).

Thanks
icon_smile.gif
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Tue Jul 06, 2010 2:26 am
Reply with quote

Since it's a variable length file (VB), the records can vary in length. They will not necessarily all be 500 bytes - that's the maximum length. Specifying the position (p) without the length (m) at the end of the BUILD operand ensures that records are copied from that position to the end of the record, whatever the size of the record is.
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 2
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
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
Search our Forums:

Back to Top