View previous topic :: View next topic |
Author |
Message |
Fin Beginner
Joined: 19 Jan 2004 Posts: 27 Topics: 8
|
Posted: Mon Feb 28, 2005 10:38 am Post subject: Variable length records |
|
|
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 |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
|
Back to top |
|
 |
Fin Beginner
Joined: 19 Jan 2004 Posts: 27 Topics: 8
|
Posted: Thu Mar 03, 2005 8:47 am Post subject: |
|
|
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 |
|
 |
|
|