On 9 Jun 2005 11:48:57 -0700, in bit.listserv.ibm-main you wrote:

>Caveat:  I get the digest but am also behind on my reading so this 
>might already have been hashed over or be too late...
>---------- 
>At June 6, 2005 11:38, concerning "COBOL short variable length 
>files????", Andy Robertson <[EMAIL PROTECTED]> wrote (to IBM-
>Main):  
>
>> [snip] COBOL programs to tolerate short Variable Length files. I mean
>> the case where the FILE SECTION is 
>>   RECORD VARYING FROM nnn TO mmm
>> And your JCL is
>>   //DDNAME DD LRECL=qqq,RECFM=VB, . . .
>> [snip] we get
>> IGZ0201W  A file attribute mismatch was detected. [snip]
>> We would really like it to tolerate the case where qqq > mmm+4 [snip]
>
>I think you should drop the "FROM nnn TO mmm" then add "DEPENDING ON 
>data-name-1".  From the Cobol for MVS & VM Language Reference (2nd 
>ed, 1995 - SC26-4769-01), "If integer-6 (nnn) is not specified, the 
>minimum number ... least number ... for a record in that file." and 
>"If integer-7 (mmm) is not specified, the maximum ... greatest ... 
>for a record in that file." plus "If data-name-1 is specified: after 
>successful execution of a READ ... data-name-1 indicate the number 
>.. just read.  The number ... placed into ... data-name-1 before any 
>.. WRITE is executed..."  (I paraphrased big-time to reduce the size 
>of the e-mail but you get the gist.)
>
>Perhaps this'll swing you in the right direction with your Cobol 
>utility program conversion.
>
>ps.  You probably already know 'bout the additional, "When running 
>under MVS, BLOCK CONTAINS 0 ... size is determined at object time 
>from the DD ..."  ('RECORD CONTAINS 0' is only for *fixed* length 
>QSAM input.)


Several comments.

1.  I thought that specifying RECORDING U meant that the block was
read as a single record and included the blocksize as the first two
bytes if the file in fact was VB (or VBS).  I think I took advantage
of this years ago.  Since the last time I did this was before VS COBOL
II I don't know if you can specify DEPENDING ON data-name-1 for
RECORDING U files although it would be helpful.

2. I also think that if RECORDING U is specified for an output file,
the record area is the same as the block and the length of the record
actually being written is determine by the description of the 01 being
written.

3. If you have a COBOL program with either BLOCK 0 QSAM file or a VSAM
file described with RECORD DEPENDING ON data-name, the file is assumed
variable with the maximum record size being determined by the largest
record described by an 01.  This size must match the record size
described in the VTOC/tape label adjusted by the Record descriptor
word.  This limitation was enraging when dealing with files containing
SMF records.  I am not certain whether you are allowed to ignore a
STATUS code 39 and proceed to use an input file.  11111  

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to