MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Variable length records

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
Fin
Beginner


Joined: 19 Jan 2004
Posts: 27
Topics: 8

PostPosted: Mon Feb 28, 2005 10:38 am    Post subject: Variable length records Reply with quote

I have read that to define a variable length record we use the syntax -
RECORD IS VARYING IN SIZE FROM x TO y CHARACTERS
DEPENDING ON recordsize.

However in my shop I see variable length records declared like this:
FD IN-FILE
LABEL RECORDS ARE STANDARD
RECORDING MODE IS V
BLOCK CONTAINS 0 RECORDS.

01 IN-RECORD PIC X(106).
01 IN-RECORD PIC X(1507).

FD OUT-FILE
LABEL RECORDS ARE STANDARD
RECORDING MODE IS V
BLOCK CONTAINS 0 RECORDS.

01 OUT-RECORD PIC X(1507).

I know this works so it cannot be wrong but are there any pitfalls not using the RECORD IS VARYING syntax?
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Mon Feb 28, 2005 10:44 am    Post subject: Reply with quote

Fin,

Check this link

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IGY3PG10/1.10.2.5.2?SHELF=&DT=20020923143836&CASE=

Hope this helps...

Cheers

kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Fin
Beginner


Joined: 19 Jan 2004
Posts: 27
Topics: 8

PostPosted: Thu Mar 03, 2005 8:47 am    Post subject: Reply with quote

From this I am understanding that the way it is coded in my shop, the records are not truly variable in length, they will always just be output as 1507, regardless of input length. I would need to use RECORD IS VARYING to ensure that the original record length is preserved. Is this correct?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group