For Programmers: Free Programming Magazines  


Home > Archive > Cobol > December 2006 > How To Code Variable Record File in the File Section









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author How To Code Variable Record File in the File Section
manubay@pacbell.net

2006-12-17, 9:55 pm

Hi, I'm wondering if you can help me. I'm trying to read a file in the
MVS environment. MVS says the format is VBS with a record length of
137. How should I code it in the File Section. I tried the following
unsuccessfully:

RECORDING MODE IS V
RECORD CONTAINS 133 CHARACTERS

Thank you.

Richard

2006-12-18, 3:55 am


manubay@pacbell.net wrote:
> Hi, I'm wondering if you can help me. I'm trying to read a file in the
> MVS environment. MVS says the format is VBS with a record length of
> 137. How should I code it in the File Section. I tried the following
> unsuccessfully:
>
> RECORDING MODE IS V
> RECORD CONTAINS 133 CHARACTERS


What was the error message that indicated 'unsuccess' ?

What was your 01 record definition just after this ?

William M. Klein

2006-12-19, 3:55 am

"VBS" is variable blocked AND spanned records.

Therefore, you should code something like

Record Varying in size from 10 to 100
Depending on WS-item
Block contains 50 characters

Put the minimum and maximum record size in the RECORD VARYING phrase
and
put the block size (which should be LESS than the maximum record size) in the
BLOCK CONTAINS phrase.

This is a "medium unusual" format for z/OS COBOL programs, but this is how you
do it. (Do NOT use a RECORD FORMAT phrase)

--
Bill Klein
wmklein <at> ix.netcom.com
<manubay@pacbell.net> wrote in message
news:1166408200.823277.167100@j72g2000cwa.googlegroups.com...
> Hi, I'm wondering if you can help me. I'm trying to read a file in the
> MVS environment. MVS says the format is VBS with a record length of
> 137. How should I code it in the File Section. I tried the following
> unsuccessfully:
>
> RECORDING MODE IS V
> RECORD CONTAINS 133 CHARACTERS
>
> Thank you.
>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com