Steve,
  I think the original poster was using assembler subroutines because they
did NOT want to be limited on LRECL (or BLKSIZE).  The COBOL dynamic
allocation facility works for "identically DCB-ed files" - not for files
with "arbitrary" DCB attributes.  (One could use the ISPF file services for
that, but those get a little trickier to use IMHO)

CALL "assembler-sub" Using FD-name

provides an "easy" way to pass a DCB address to an assembler subprogram for
it to modify to its "hearts content".  (The subprogram could even be in
COBOL, but playing with DCB attributes in a COBOL program is NOT something
that I would ever recommend)

"Steve Comstock" <[EMAIL PROTECTED]> wrote in message
news:<[EMAIL PROTECTED]>...
> Bill Klein wrote:
> > Changing that stuff works very well if you use the technique that I
> > described.  You put in an "arbitrary" Record Contains and/or Block
Contains
> > in the COBOL FD - and then "modify" the DCB info in the Assembler
program
> > that you call - passing it the DCB.
> > 
> > <[EMAIL PROTECTED]> wrote in message
> > news:<[EMAIL PROTECTED]>...
> > 
> >>Hi Bill
> >>Thanks for your good suggestion. But my client require that he could
> >>decide an output dataset's record length and block size dynamically,
> >>and the file format must be FB.
> >>
> >
> 
> I didn't see the original post (since the OP did not post
> it to the list), so I'm not sure of the exact requirement.
> But if the file to be dynamically allocated is an input
> file, you can do the whole thing in COBOL! (Well, you have
> to call a C function - but _not_ a C program; just call
> the 'putenv' function, which is part of LE, so everyone
> has it).
> 
> [Actually, you can do this for output files, too, but
> it's a little more work.]
> 
> Discussed (with a hands-on lab) in our two-day course
> "Enterprise COBOL Update I: Essentials". Details on
> the course at:
> 
> http://www.trainersfriend.com/COBOL_Courses/d704descr.htm
> 
> Kind regards,

----------------------------------------------------------------------
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