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 the Record Length of a record in File of VB Format

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
NIKHIL SHARMA

New User


Joined: 22 Jun 2010
Posts: 12
Location: Bangalore

PostPosted: Thu Dec 16, 2010 11:30 am    Post subject: Changing the Record Length of a record in File of VB Format
Reply with quote

Hi,

I am writing a REXX code which is reading a VB Format file record by record, editing & again writing/updating to the same place.

I cannot read the file into an array as the File is of 50000 records & editing is only required for few hundred records, so I will have to write the whole file again which will take a lot of time.Hence, I am reading & updating record by record.

Now, suppose I have read this record:

<(13,36)>"1234"

its record length is 16. I want to changr it to:

<(13,36)>"12345"

i.e record length 17, but it will write upto 16 characters only & will truncate the last one as shown below:

<(13,36)>"12345

Is there any command through which we can increase the Record Length of that particular record?

Please Suggest...
Back to top
View user's profile Send private message

prino

Senior Member


Joined: 07 Feb 2009
Posts: 1018
Location: Oostende, Belgium

PostPosted: Thu Dec 16, 2010 3:31 pm    Post subject:
Reply with quote

Plain and simple answer, you do not process files of 50,000 records with REXX.
Back to top
View user's profile Send private message
Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 994
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Thu Dec 16, 2010 3:34 pm    Post subject:
Reply with quote

You can't change the length 'in place'. Consider the structure of a VB dataset:

For each block : bytes 1-4 contain the length of the block
within that block, for each record :
bytes 1-4 contain the length of the record.

The 4 bytes following a record contain the length of the next record. If you were able to extend a record, you would overwrite (part of) the length field of the next record and the dataset would be corrupted.

The only way to change the length is to write a new VB dataset.

Garry.
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Thu Dec 16, 2010 9:15 pm    Post subject:
Reply with quote

Hello,

Quote:
Please Suggest...

Quote:
The only way to change the length is to write a new VB dataset.
Quote:
you do not process files of 50,000 records with REXX.


While creating the new file, suggest you implement using something other than rexx. . . If 50,000 records "hurts" imagine what will happen if the volume dramatically increases. . .
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 -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am


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