Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Inserting LOW VALUES in VB file using SORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Inserting LOW VALUES in VB file using SORT
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    Post subject: Reply to: Inserting low values in vb file using sort
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: 2150
Location: At my coffee table

PostPosted: Fri Jul 02, 2010 3:47 pm    Post subject:
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 Moderator


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

PostPosted: Fri Jul 02, 2010 9:11 pm    Post subject:
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    Post subject: Reply to: Inserting low values in vb file using sort
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 Moderator


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

PostPosted: Tue Jul 06, 2010 2:26 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Compare yesterday's date to the one o... migusd SYNCSORT 7 Fri Sep 22, 2017 11:35 pm
No new posts Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 4 Fri Sep 22, 2017 4:56 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts OC4 in SORT Mohan Kothakota DFSORT/ICETOOL 2 Tue Sep 12, 2017 6:30 pm
No new posts Working with hex values in Filemanage... Emile Straker IBM Tools 0 Tue Sep 12, 2017 1:42 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us