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

regarding variable block file


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
karthik3883

New User


Joined: 19 Oct 2007
Posts: 37
Location: chennai

PostPosted: Thu Feb 07, 2008 10:29 am
Reply with quote

Hi,


Suppose i have a variable length file from 50 to 100 record size lenght and suppose i have inserted a record with 60 size and what will be the remaining 40 ,will it be filled up with empty spaces....

suppose if i want to use the 40 space again will it be possible


regards
Karthik
Back to top
View user's profile Send private message
muthuvel

Active User


Joined: 29 Nov 2005
Posts: 217
Location: Canada

PostPosted: Thu Feb 07, 2008 12:04 pm
Reply with quote

Quote:
Suppose i have a variable length file from 50 to 100 record size lenght

Ok.
Quote:
suppose i have inserted a record with 60 size and what will be the remaining 40 ,will it be filled up with empty spaces....

If the output record was initialized before write process ,it will have SPACES in the remaining 40.

Quote:
suppose if i want to use the 40 space again will it be possible



It is possible by opening the file in I-O mode and reading the record in which you want to write data which has 40 spaces by some programming logic and write the desired content.
Back to top
View user's profile Send private message
karthik3883

New User


Joined: 19 Oct 2007
Posts: 37
Location: chennai

PostPosted: Thu Feb 07, 2008 1:21 pm
Reply with quote

hi muthu


thanks for the reply i have one query wat it will be if we doesnt initialize the output record,will it still contains the spaces.


Regards
Karthik
Back to top
View user's profile Send private message
muthuvel

Active User


Joined: 29 Nov 2005
Posts: 217
Location: Canada

PostPosted: Thu Feb 07, 2008 1:36 pm
Reply with quote

Quote:
wat it will be if we doesnt initialize the output record,will it still contains the spaces.

It depends.It can have spaces,low/high values or the data of the previous record.
Initialize is must in order to maintain data integrity
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Feb 07, 2008 1:47 pm
Reply with quote

We better reach an agreement on the meaning of variable record...

from a data management point of view every record is prefixed with a four byte field
which in the first half contains the record length, called usually RDW ( record definition word )

the input area will contain only the data which is actually there,
the remainder of the buffer will contain garbage from the previous read

it the responsibility of the program to process for each record read only the relevant data

for PS ( Physical Sequentia )l datasets changing the record lenght ( adding or subtracting fields )
is not a problem ( you will only write to an output dataset )

for VSAM KSDS data managent takes care of all the buffer shifting and CI splits
in order to accommodate for inplace changes to the record length
as long the write statement takes care of telling the new lebth
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: Thu Feb 07, 2008 8:42 pm
Reply with quote

Hello,

Quote:

Quote:
suppose i have inserted a record with 60 size and what will be the remaining 40 ,will it be filled up with empty spaces....

If the output record was initialized before write process ,it will have SPACES in the remaining 40.


If the record was truly 60 bytes, there will be no remaining 40 (and nothing can be initialized to any value for those positoins). Variable means the length will change depending on the size of the record that was written.
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 0
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
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
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top