🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: bit.listserv.asm370
Article #373

Re: IEANTRT troubles

#373
From: Steve Comstock
Date: Tue, 20 Sep 2005 18:21
114 lines
5823 bytes
Ing user wrote:
> Chris,
>
> when you say "if you're going to be reentrant, you also have to make the
> CALL macro reentrant" -  do you mean like this :
>
> call ieantrt,(level,name,token,retcode),mf=l
>
> getmain and copy this over and later invoke as:
>
> call ieantrt,mf=(e,<address>)
>
> If so, for my future reference where is this documented? I didn't see this
> in the auth assembler guide

Reentrancy is not just for authorized programs. The [limited]
documentation I could find was in the general Assembler
Services Guide, Chapter 11, beginning on page 10 (for the
z/OS V1.7 doc, anyway).

Kind regards,

-Steve Comstock


>
> Thanks
>
> Ing
>
>
> On Tue, 20 Sep 2005 09:47:56 -0500, Craddock, Chris <Chris_Craddock@bmc.com>
> wrote:
>
>
>>>I have a service provider that places some data in SP 227
>>>and later puts the address of the above location in a N/T
>>>pair:
>>>
>>>CALL  IEANTCR,(LLEVEL,LNAME,LTOKEN,LPERSOPT,LRETCODE)
>>>
>>> LLEVEL         DC    A(IEANT_SYSTEM_LEVEL)
>>> LPERSOPT       DC    A(IEANT_NOPERSIST)
>>> LNAME          DC    CL16'SP00001'
>>> LRETCODE       DS    F
>>> LTOKEN         DS    0XL16
>>> DS1ADDR        DS    A
>>>                DS    XL12
>>
>>Are you sure? This would be a non-reentrant call. That may work, but it
>>can also fail in surprising ways.
>>
>>
>>>In the client I am trying to obtain the address through:
>>>CALL IEANTRT,(LLEVEL,LNAME,TOKEN,RETCODE)
>>
>>                            ^^^^^
>>
>>>Initially I defined all parms in absolute storage. But I got an
>>
>>0C4-11.
>>
>>Did the IEANTRT call get the S0C4, or did you get it in your own code?
>>S0C4-11 is a reference to an invalid address. Presumably you specified
>>an invalid address in a parameter. Based on the DC's above, I would
>>guess you meant to specify LTOKEN, not TOKEN. Maybe TOKEN was a valid
>>symbol in your program, but just not the thing you wanted.
>>
>>If you had got a S0C4-4 that would mean the storage address could not be
>>fetched or stored into and I might suspect a different problem. Or not.
>>Chances are you're just passing a bad address and the system is getting
>>a program check when it tries to reference it.
>>
>>
>>>later I placed just LLEVEL & LNAME in absolute storage while token &
>>>retcode
>>>are defined through a DSECT mapping to a storage obtained as follows:
>>>GETMAIN  R,LV=LOCMLEN,SP=0
>>
>>Making your program reentrant is a good idea, but it's probably not the
>>root cause of your problem in this case. Anyway, using the "R" form of
>>GETMAIN is a bad idea because it expands as an SVC 10 - which only gets
>>you 24-bit storage no matter what AMODE you are in. It's probably no big
>>deal, but I would use "RU" instead of "R". That way you get SVC 120.
>>
>>
>>>But the assembly fails with:
>>>
>>>000080 00000000                      67+         DC    A(TOKEN)
>>>PR
>>>** ASMA032E Relocatable value found when absolute value required -
>>
>>TOKEN
>>
>>>** ASMA435I Record 176 in SYS1.MACLIB(IHBOPLTX)
>>
>>You're suffering the initial pains of getting comfortable with reentrant
>>coding. Reentrancy, like pregnancy, is an all or nothing deal. You have
>>to put the data into the working storage by using instructions like;
>>
>>               LA      R0,TOKEN                -> TOKEN
>>               ST      R0,PARMAREA             Save in parm area
>>
>>Also, if you're going to be reentrant, you also have to make the CALL
>>macro reentrant. That means using the MF=L form to reserve storage for
>>the parameter list and then using the MF=(E,...) form to point to the
>>storage you reserved for the parameters and complete the parmlist and
>>make the call. You can read about it in the assembly language services
>>guide. But back to the problem at hand... why are you calling the symbol
>>"LTOKEN" in one place and "TOKEN" in another?
>>
>>CC
>
>
Technical Details
Message-ID: <4330532A.1060306@trainersfriend.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeed.news2me.com!newsfeed2.easynews.com!newsfeed1.easynews.com!easynews.com!easynews!sn-xit-03!sn-xit-12!sn-xit-09!sn-xit-08!sn-xit-14!supernews.com!149.173.6.116.MISMATCH!foggy!vm.sas.com!trainersfriend.com!steve
References: <200509201740.j8KGHOvb029564@malibu.cc.uga.edu>

Show Full Headers
Complete Article Headers
X-Google-Thread: fcdcb,72645f6509f487f6
X-Google-Attributes: gidfcdcb,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeed.news2me.com!newsfeed2.easynews.com!newsfeed1.easynews.com!easynews.com!easynews!sn-xit-03!sn-xit-12!sn-xit-09!sn-xit-08!sn-xit-14!supernews.com!149.173.6.116.MISMATCH!foggy!vm.sas.com!trainersfriend.com!steve
From: Steve Comstock <steve@trainersfriend.com>
Newsgroups: bit.listserv.asm370
Subject: Re: IEANTRT troubles
Date: Tue, 20 Sep 2005 12:21:30 -0600
Organization: SAS Inc.
Lines: 114
Sender: IBM Mainframe Assembler List <ASSEMBLER-LIST@LISTSERV.UGA.EDU>
Message-ID: <4330532A.1060306@trainersfriend.com>
References: <200509201740.j8KGHOvb029564@malibu.cc.uga.edu>
Reply-To: IBM Mainframe Assembler List <ASSEMBLER-LIST@listserv.uga.edu>
NNTP-Posting-Host: mozart.unx.sas.com
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: foggy.unx.sas.com 1127240762 32333 10.19.150.41 (20 Sep 2005 18:26:02 GMT)
X-Complaints-To: usenet@unx.sas.com
NNTP-Posting-Date: Tue, 20 Sep 2005 18:26:02 +0000 (UTC)
Comments: Gated by NETNEWS@VM.SAS.COM
Return-Path: <owner-assembler-list@LISTSERV.UGA.EDU>
User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
X-Accept-Language: en-us, en
X-Spam: [F=0.0960869565; heur=0.500(-25400); stat=0.010;
        spamtraq-heur=0.913(2005092010)]
X-MAIL-FROM: <steve@trainersfriend.com>
X-SOURCE-IP: [209.238.255.225]
X-Loop-Detect: 1
X-DistLoop-Detect: 1
Approved-By: Steve Comstock <steve@TRAINERSFRIEND.COM>
In-Reply-To: <200509201740.j8KGHOvb029564@malibu.cc.uga.edu>
Return-Path: owner-assembler-list@LISTSERV.UGA.EDU
X-OriginalArrivalTime: 20 Sep 2005 18:25:59.0583 (UTC)
                       FILETIME=[BFC1CAF0:01C5BE10]
Originator: daemon@mozart.unx.sas.com