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
 

 

regarding variable block file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: regarding variable block file
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: Chennai

PostPosted: Thu Feb 07, 2008 12:04 pm    Post subject: Reply to: regarding variable block file
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    Post subject:
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: Chennai

PostPosted: Thu Feb 07, 2008 1:36 pm    Post subject: Reply to: regarding variable block file
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Thu Feb 07, 2008 1:47 pm    Post subject: Reply to: regarding variable block file
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

Site Director


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

PostPosted: Thu Feb 07, 2008 8:42 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM 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 Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am
No new posts Occurrence of various strings within ... TS70363 JCL & VSAM 1 Thu Apr 27, 2017 8:18 pm


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