Good stuff.  Honestly, I do appreciate when you, anyone, takes the time for me.

I thought that as long as I don't modify R13 without saving it first, that I 
could BAKR/PR without problem.  I think that's right.  To be honest, I started 
almost understanding the "old" STM + SAVEAREA when I ran across BAKR/PR and 
thought the latter was easier.

RTFM isn't easy!  Took me a long time today to figure out that 
GET/PUT/OPEN/CLOSE and all the QSAM stuff was hidden in another bookshelf 
called DFSMS.  I thought only SMS stuff was in there.  I wouldn't have linked 
SMS with I/O stuff like QSAM, etc.

Wasn't QSAM way before SMS?

-Lindy

-----Original Message-----
From: IBM Mainframe Assembler List [mailto:[email protected]] On 
Behalf Of Tom Marchant
Sent: Thursday, December 08, 2011 8:53 PM
To: [email protected]
Subject: Re: Assembler pgm to copy a file

On Thu, 8 Dec 2011 08:23:26 -0700, Paul Gilmartin wrote:

>On Dec 8, 2011, at 08:00, Bodoh John Robert wrote:
>
>> No save area?  GET and PUT need a save area.
>>
>Well, since he doesn't modify R13, they'll user his caller's save area.
>That shouldn't cause any problems.  Until he tries to return from his
>program.

As others have noted, he uses BAKR to save the registers and PR to restore 
them, so there will be no problem upon return either.  As Ed noted, he should 
still allocate a save area with the characters "F1SA" at offset 4 and put its 
address in register 13.  The code will work fine without doing that, since his 
program didn't use the save area whose address was passed in register 13.

Establishing the save area is important in the event of an abend if someone 
needs to follow the save area chain.  It is difficult to determine from a dump 
where he saved his registers without following the conventions as they are 
documented in the Assembler Services Guide.  This is especially true if there 
are multiple linkage stack entries used

If you are going to look up the save area conventions, make sure that you have 
the Assembler Services Guide for z/OS 1.12 or higher.  The linkage conventions 
chapter was extensively modified with that release to clarify the conventions.

--
Tom Marchant

Reply via email to