> -----Original Message-----
> From: IBM Mainframe Discussion List [mailto:ibm-m...@bama.ua.edu] On
> Behalf Of Frank Swarbrick
> Sent: Wednesday, January 06, 2010 5:24 PM
> To: IBM-MAIN@bama.ua.edu
> Subject: Re: Cobol rewrite variable length record
> 
> >>> On 1/6/2010 at 1:47 PM, in message
> <4b44f6c6.1010...@trainersfriend.com>, Steve
> Comstock <st...@trainersfriend.com> wrote:
> > Frank Swarbrick wrote:
> >>>>> On 1/6/2010 at 12:52 PM, in message
> <4b44ea14.4010...@trainersfriend.com>,
> >> Steve Comstock <st...@trainersfriend.com> wrote:
> >>>> My question is, why does it work when the file is VSAM, even
without
> the
> >>> RECORD IS VARYING?
> >>> Question: are you running your tests under VSE or z/OS?
> >>
> >> I tested sequential on both, but only tested VSAM on VSE.  I guess
I
> just
> > assumed that VSAM would behave the same on z/OS.
> >>
> >> Frank
> >>
> >
> > I would guess not. My notes from "VSAM for COBOL Programmers" say
> > ESDS supports update in place but no change in record length.
> >
> > But I guess the only real proof is in the doing.
> 
> It's not changing the record length.  That is what is so odd.  It
reads a
> 17 byte VSAM record and then does the rewrite that seems to imply the
69
> byte record, but it in fact rewrites just the 17.  Which is what is
> wanted, but I can't explain why it is working.
> 
> But I have spent enough time on this when I already have my solution
that
> will work both for VSAM and regular SAM, on both z/OS and VSE.  I was
just
> wondering why something that apparently shouldn't work was working.
> 
> Thanks!

COBOL (RE)WRITE is *supposed* use the length of the (fixed) 01-level
record name to control the length of the record that is written.  VSE
COBOL for the VSAM case *may* be saving the length from the read and
specifying it on the rewrite.  In any case, as I replied earlier, there
is no need to use RECORD IS VARYING, just use the internal record
indicators in your data to select which 01-level record name to use in
the rewrite.

HTH

Peter


This message and any attachments are intended only for the use of the addressee 
and
may contain information that is privileged and confidential. If the reader of 
the 
message is not the intended recipient or an authorized representative of the
intended recipient, you are hereby notified that any dissemination of this
communication is strictly prohibited. If you have received this communication in
error, please notify us immediately by e-mail and delete the message and any
attachments from your system.


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

Reply via email to