Ray Mullins wrote:
-----Original Message-----
From: IBM Mainframe Discussion List
[mailto:[EMAIL PROTECTED] On Behalf Of Steve Comstock
Sent: Saturday 17 March 2007 08:55
To: [email protected]
Subject: Re: Need help with Assembler accessing VSAM file in
reentrant LE-conforming program
But not totally for OPEN. Frankly, I think the execute
form of OPEN should set the end-of-list bit just as the
execute form of CALL, for example, does. Took me three
days and some help to find that piece of information.
I actually did an OI instead of an MVI, but that was
what made the code work. I don't think it's a "very
bad idea" at all. It made the code work in a way that
is unlikely to ever fail even if IBM were to change the
macro expansions in the future.
I have to quibble with this, Steve.
MF=E is designed to change -> only <- those parameters that you specified in
your invocation.
For grins, change your OPEN expansion to MODE=24 and watch the gyrations for
setting the parameters. I have seen code (disclaiming authorship statement
goes here) that does this (non-reentrant on purpose because I don't want to
type too much today *g* ):
OPEN (USER_SPECIFIED_DDNAME),MF=(E,@OPEN)
@OPEN OPEN (,INPUT,SYSPRINT,OUTPUT),MF=L
It's Saturday so no work access, and I can't fire up my MVS/SP 3.8j
environment right now due to disk space issues (stupid sudden interest in
French music CD ripping), so I can't cut/paste the assembler output. If you
assemble the above, you'll see all sorts of ORing going on to preserve the
high order byte where the options are stored when the first parameter is
specified. And if the MF=E expansion set the HOB on as you suggest, then
SYSPRINT would not be opened.
25+ years of working with MF=L/E have taught me this, and I still, every
once in a while, forget to initialize something in the MF=L expansion (weird
Sx2A abends, anyone?)
Later,
Ray
OK, OK, you guys. I've changed the code in the course
to use the conventional, standard approach.
Still, I'm pleased to have a working, LE-conforming,
reentrant Assembler program running under the shell
as a CGI and doing VSAM access; I also have a DB2
version of the same CGI.
Onwards and upwards.
Kind regards,
-Steve Comstock
The Trainer's Friend, Inc.
303-393-8716
http://www.trainersfriend.com
-- to be included in our opt-in list of announcements of
-- new courses and other products and services from The
-- Trainer's Friend, send an email to [EMAIL PROTECTED]
----------------------------------------------------------------------
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