On Jun 6, 2005, at 12:38 PM, Andy Robertson wrote:
I seem to remember a discussion here about a PTF, trick or Compiler
option
that would allow the latest flavours of 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, . . .
Now, it seems that qqq must equal mmm+4 or we get
IGZ0201W A file attribute mismatch was detected. File DDNAME in
program
xxxxxxx had a record length of mmm+4 and the file specified in the
ASSIGN
clause had a record length of qqq.
We would really like it to tolerate the case where qqq > mmm+4
I am sure I remember a discussion of this here and I think I remember
some
one suggesting a bypass, trick or fix, but numerous searchges have not
turned it up.
Am I deraming, or can any one remember or give me some sort of hint???
TIA
I recall searching for a way to do something similar to this a few
years ago.
My specific problem was that I wanted to describe a record as the set
of all possible variable records:
RECORD VARYING FROM 5 TO 32761
And then to be able to open any variable blocked file.
I ran afoul the same IGZ0201W message telling me that a
LRECL=x,RECFM=VB file did not fit that description. My solution was a
simple assembler program which makes this trivial problem go away. I
never found a way to finagle the Cobol compiler into acknowledging that
all records of a VB file would fit within a larger variable file. It
insisted on cross checking the JCL on the OPEN.
Just another case of the system showing its age in the 21st century...
If you want the JCL to be greater than the FD your only option is to
open it in unformatted mode and unblock it yourself -- but IIRC the
compiler will scream at you if the JCL does not contain a RECFM=U. So
that might not be any help as you would still need to change 2000+ JCL
decks.
You could write a LE abend handler to trap that specific message and
resume -- that is easy enough, but is hardly a Cobolesse solution.
You might try a FILE-STATUS clause, in some cases, if it is specified
for a file you can receive control back after a failed OPEN.
I think though, the best solution is a simple assembler subprogram.
[EMAIL PROTECTED]
Q: How many Marxist revolutionaries does it take to change a
proletarian lightbulb?
A: None.� A proletarian lightbulb contains the seeds of its own
revolution.
----------------------------------------------------------------------
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