Frank,

Really good question. We initially call an Assembler routine to do a
getmain or 'storage obtain' for xxxxK's of storage.
The routine returns us the beginning storage address, where we place a
token. The storage we obtain is persistant, SP231 .

I didnt know you could call IEANTCR in Cobol..

Regards,
Scott

On Thu, Dec 22, 2016 at 7:02 PM, Frank Swarbrick <
frank.swarbr...@outlook.com> wrote:

> Do you really need this assembler routine in order for COBOL to call the
> IEANTCR callable routine?  I call it directly from COBOL:
>
> CALL 'IEANTCR' USING NTA-LEVEL NTA-NAME NTA-TOKEN
>                      NTA-NOPERSIST NTA-RC.
> with the following working storage:
>
> 05  NTA-LEVEL               COMP-5  PICTURE S9(8).
> 05  NTA-NAME                DISPLAY PICTURE X(16).
> 05  NTA-TOKEN               DISPLAY PICTURE X(16).
> 05                          REDEFINES NTA-TOKEN.
>     10  NTA-TOKEN-PTR       POINTER.
>     10                      DISPLAY PICTURE X(12).
> 05  NTA-NOPERSIST           COMP-5  PICTURE S9(8).
> 05  NTA-RC                  COMP-5  PICTURE S9(8).
>
>
> Frank
>
> ________________________________
> From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> on behalf
> of scott Ford <idfli...@gmail.com>
> Sent: Thursday, December 22, 2016 8:32 AM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: Do the Name/Token Pair callable services need R13 to point to
> save area?
>
> Peter:
>
> Heres what we do we call it from Cobol..
>
> We pass in the address of where storage begins and where we want to place
> the token
>
>         SAVE  (14,12),,SETTOKEN
>          LR    R12,R15            R12 IS BASE REG
>          USING SETTOKEN,R12
>          L     R4,0(R1)           1ST PARM = WORK AREA
>          ST    R4,8(R13)          SAVE AREA FORWARD LINK
>          ST    R13,4(R4)          SAVE AREA BACK LINK
>          LR    R13,R4             WORK AREA IS NOW SAVE AREA +
>          USING WORKAREA,R13       SAVEAREA AND LOCAL VARS
>
>          LA    R1,PARMS           POINT R1 -> PARMS
>          CALL  IEANTCR            CREATE NAME/TOKEN
>
> *-------------------------------------------------------------
>          L     R13,4(R13)          CALLER SAVE AREA
>          RETURN (14,12),RC=(15)
>
> WORKAREA DSECT
> SAVEAREA DS    18F
> *-------------------------------------------------------------
> PARMS    DS    5F
>
>
> HTH
>
> Regards,
> Scott
>
> On Thu, Dec 22, 2016 at 10:27 AM, scott Ford <idfli...@gmail.com> wrote:
>
> > Peter,
> >
> > We use tokens all the time, I will look
> >
> > Scott
> >
> > On Thu, Dec 22, 2016 at 9:58 AM, Greg Dyck <gregd...@pobox.com> wrote:
> >
> >> On 12/22/2016 1:47 AM, Peter Hunkeler wrote:
> >>
> >>> When I get control, R13 points to a save area, which my code will use,
> >>> but I do not yet have storage for another save area before calling
> IEANTRT,
> >>> so I cannot change R13.
> >>>
> >>
> >> The Name Token Retrieve service uses BAKR to save and restore the
> >> caller's registers.  You can do whatever you wish with the caller's save
> >> area pointed to by R13, including building the parameter list for the
> >> request in it.
> >>
> >> Regards,
> >> Greg
> >>
> >>
> >> ----------------------------------------------------------------------
> >> For IBM-MAIN subscribe / signoff / archive access instructions,
> >> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
> >>
> >
> >
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to