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: 1002
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: 992
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 How to pick only YYMMDD from DATE1P (... atulbaviskar SYNCSORT 1 Wed Mar 22, 2017 11:39 am
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm
No new posts Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm
No new posts Updating a VSAM file with DISP=OLD sheersh JCL & VSAM 8 Tue Mar 14, 2017 6:14 pm


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