Oppolzer - Informatik / Blog


Blog-Hauptseite      Neuester Artikel      Älterer Artikel      Neuerer Artikel      Älterer gleiche Kategorie      Neuerer gleiche Kategorie

IBM-MAIN - Ermitteln eines DS-Namens zu gegebenem DD-Namen

Subject:

Re: RDJFCB

From:

Bernd Oppolzer <bernd.oppolzer@T-ONLINE.DE>

Reply-To:

IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU>

Date:

2015.03.20 00:07:41


I have just found the piece of code;
it is in fact C for the most part.

The lookup of the TIOT entry for the corresponding DDNAME is done using C, and
then at DDNAME_TIOT + 8, there is a SWA-Token that points at the JFCB (which
starts with the 44 byte DSNAME). The access to the JCFB etc. is done using C,
too. Only SWAREQ is done using a small ASSEMBLER subprogram.

This is the SWAREQ subprogram, callable from C:


CSWAREQ  CSECT
*
*-----------------------------------------------------------
*
*        int cswareq (char *psva, char **ppjfcb);
*
*        PSVA IST DER ZEIGER AUF EIN SVA-HANDLE
*        (Z.B. DER JFBC-POINTER AUS DER TIOT).
*
*        ZU DIESEM SVA-HANDLE LIEFERT SWAREQ
*        DIE ECHTE ADRESSE (DER JFCB LIEGT IN DER SWA -
*        SCHEDULER WORK AREA -, DESHALB IST DAS ETWAS
*        KOMPLIZIERTER).
*
*        DIE ADRESSE DES JFCB WIRD IM ERFOLGSFALL AN
*        DEN AUFRUFER ALS 2. PARAMETER ZURUECKGEGEBEN.
*
*-----------------------------------------------------------
*
         STM   14,12,12(13)
         LR    11,15
         USING CSWAREQ,11
         LA    15,SAVEAREA
         ST    15,8(13)
         ST    13,4(15)
         LR    13,15
*
         L     4,0(1)                  ADRESSE SVA
         L     5,4(1)                  ADRESSE DES JFCB-POINTERS
*
         LA    6,EPA                   ADRESSE EPA NACH AEPA
         ST    6,AEPA
         USING ZB505,6
         XC    SWAEPAX,SWAEPAX         EPA INITIALISIEREN
*
         MVC   SWVA,0(4)
         SWAREQ FCODE=RL,EPA=AEPA,UNAUTH=YES,MF=(E,SWAPARMS)
*
         LTR   15,15
         BZ    RETOK
*
         XC    0(4,5),0(5)
         B     RET
*
RETOK    DS    0H
         MVC   0(4,5),SWBLKPTR
*
RET      DS    0H
         L     13,4(13)
         L     14,12(13)
         LM    0,12,20(13)
         BR    14
*
*-----------------------------------------------------------
*
SAVEAREA DS    18F
*
AEPA     DS    A
EPA      DS    CL28
*
SWAPARMS SWAREQ MF=L
*
         CVT   DSECT=YES
*
         IEFJESCT
*
         IEFZB505 LOCEPAX=YES
*
         END


You could do the other things, using ASSEMBLER.
But I could send you the C functions, too, if you prefer C.

Kind regards

Bernd




Am 19.03.2015 um 23:55 schrieb S.F.:
> Thanks Bernd, S., I am looking at the SVC99() call you in C
>
> On Thursday, March 19, 2015, Bernd Oppolzer <bernd.oppolzer@t-online.de>
> wrote:
>
>> I have a piece of ASSEMBLER code somewhere that does this;
>> if you wish, you could send me offline mail, so I could search my archives
>> and see if I find it. I recall that it was no big deal, when I did it ca.
>> 15 or 20 years ago. After locating the DDNAME in the TIOT,
>> it used SWAREQ, IIRC, to find the corresponding DSNAME.
>>
>> Kind regards
>>
>> Bernd
>>
>>
>>
>> Am 19.03.2015 um 21:56 schrieb S.F.:
>>
>>> All:
>>>
>>> I have a need to find the current dataset name of a ddname of a STC
>>> running. The STC is in Cobol and I would like to write the ddname query in
>>> Assembler. Could I do the following ....
>>>
>>> Call xyz passing ddname
>>> ... Either with EXTRACT or RDJFCB find the dataset name and pass it back
>>>
>>> ?
>>>
>>> Regards,
>>> S.
>>>
>>> ----------------------------------------------------------------------
>>> For IBM-MAIN subscribe / signoff / archive access instructions,
>>> send email to listserv@listserv.ua.edu with the message: INFO IBM-MAIN
>>>
>>>
>> ----------------------------------------------------------------------
>> For IBM-MAIN subscribe / signoff / archive access instructions,
>> send email to listserv@listserv.ua.edu with the message: INFO IBM-MAIN
>>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to listserv@listserv.ua.edu with the message: INFO IBM-MAIN
>

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

Blog-Hauptseite      Neuester Artikel      Älterer Artikel      Neuerer Artikel      Älterer gleiche Kategorie      Neuerer gleiche Kategorie