SDSF ISFUSER EXIT



All about SAF, RACF, encryption, Firewall, Risk assessment and integrity concepts

SDSF ISFUSER EXIT

Postby roccop » Wed May 26, 2010 12:26 am

We are migrating from Z/OS V1.9 to Z/OS V1/11. We run ISFUSER exit via ACF2 SVC calls. We use userjct and jobjct. Thje jobjct was formerly pointed to by a field in userparm dsect UPRJCT@. This field pointed to job's JCT in the exit , since 1.10 or 1.11 now invalid. We need to establish addreesability to Job's JCT. Anyone have a sample of how one would do that with SSi interface?
roccop
 
Posts: 1
Joined: Wed May 26, 2010 12:17 am
Has thanked: 0 time
Been thanked: 0 time

Re: SDSF ISFUSER EXIT

Postby timhenness » Fri Jun 04, 2010 6:36 am

I've run into the same situation. The closest I have is a program I wrote several years ago that uses SSI 80 to get job information. Reading the doc on the SSI 71 Read Spool function, it looks like you need to MTTR of the record. I'm guessing the UPRJCTMT has the MTTR of the JCT we're looking for. At least there's something in that field in the dump I have. if not I guess I'll have to borrow a bit more of my SSI80 code to get the MTTR for the JCT of the job involved.

This is now high on my priority list, so I'll probably start coding next week, if not tomorrow. Would still be nice to see some sample code to make sure I'm taking the right path.
timhenness
 
Posts: 2
Joined: Fri Jun 04, 2010 5:29 am
Has thanked: 0 time
Been thanked: 0 time

Re: SDSF ISFUSER EXIT

Postby timhenness » Thu Jun 17, 2010 9:29 am

Here is what I came up with. You'll have to add your own housekeeping. And of course, the usual disclaimers apply... Use at your own risk. This has not been thoroughly tested. Etc...

         TITLE 'SDSF User Exit - Get JES $JCT'
***********************************************************************
*                                                                     *
*   Get JES $JCT                                                      *
*                                                                     *
***********************************************************************
*
         USING WKSTG,R13               Address WKSTG
         USING SSOB,WK_SSOB            Address SSOB
         USING SSJI,WK_SSJI            Address SSJI
         USING SPLIO,WK_SPLIO          Address SPLIO
*
*   Initialize SSOB Pointer
*
         LA    R2,WK_SSOB              Initialize SSOB Pointer
         O     R2,=X'80000000'
         ST    R2,WK_SSOBP
*
*   Initialize SSOB
*
         MVC   SSOBID,=C'SSOB'         Set control block ID
*
         LHI   R2,SSOBHSIZ             Set SSOB Header length
         STH   R2,SSOBLEN
*
         LHI   R2,SSOBSSJI             Set Function Code
         STH   R2,SSOBFUNC
*
         LA    R2,WK_SSJI              Set SSJI Address
         ST    R2,SSOBINDV
*
*   Initialize SSJI
*
         MVC   SSJIID,=C'SSJI'         Set control block ID
*
         LHI   R2,SSJISIZE             Set SSJI length
         STH   R2,SSJILEN
*
         LHI   R2,SSJISVR#             Set SSJI version
         STH   R2,SSJISVRN
*
         MVI   SSJIFREQ,SSJISIOM       Set function to Spool Read
*
         LA    R2,WK_SPLIO             Set SPLIO Address
         ST    R2,SSJIUSER
*
*   Initialize SPLIO
*
         MVC   SPIOSSID,=C'SPIO'       Set control block ID
*
         LHI   R2,SPIOSZE              Set SPLIO length
         STH   R2,SPIOLEN
*
         LHI   R2,SPLIOVR#             Set SPLIO version
         STH   R2,SPLIOVRN
*
         XC    SPIOSPAD,SPIOSPAD       Set MTTR for JCT
         MVC   SPIOSPAD(L'UPRJCTMT),UPRJCTMT
*
         MVC   SPIOCTYP,=CL4'JCT'      Set CB type
*
         MVC   SPIOJNAM,UPRJNAME       Set job name/ID
         MVC   SPIOJID,UPRJID
*
*   Issue SSREQ
*
         LA    R1,WK_SSOBP             Get address of SSOB parameter
*
         IEFSSREQ ,                    Issue IEFSSREQ
*
*  Check return codes
*
         LTR   R15,R15                 Check SSREQ return code
         JNE   SSREQERR
*
         CLC   SSOBRETN,=F'0'          Check SSOB return code
         JNE   SSREQERR
*
         CLC   SSJIRETN,=F'0'          Check SSJI return code
         JNE   SSREQERR
*
*   Get $JCT address
*
         L     R10,SPIOOUTA            Get $JCT address
         USING JCTSTART,R10
*
         LTR   R10,R10                 Check for $JCT returned
         JZ    NOJCT
*
         TITLE 'SDSF User Exit - Do Your Own Thing'
***********************************************************************
*                                                                     *
*   Do Your Own Thing                                                 *
*                                                                     *
***********************************************************************
*
         ???
*
         TITLE 'SDSF User Exit - Release Resources'
***********************************************************************
*                                                                     *
*   Release Resources                                                 *
*                                                                     *
***********************************************************************
*
         DROP  R10
*
*   Release JES Spool Read Storage
*
         MVI   SSJIFREQ,SSJISIRS       Set function to Release Storage
*
         XC    SSOBRETN,SSOBRETN       Clear previous return codes
         XC    SSJIRETN,SSJIRETN
*
         LA    R1,WK_SSOBP             Get address of SSOB parameter
*
         IEFSSREQ ,                    Issue IEFSSREQ
*
         LTR   R15,R15                 Check return codes
         JNZ   SSREQERR
         CLC   SSOBRETN,=F'0'
         JNE   SSREQERR
         CLC   SSJIRETN,=F'0'
         JNE   SSREQERR
*
         TITLE 'SDSF User Exit - Working Storage Area'
***********************************************************************
*                                                                     *
*   Working Storage Area                                              *
*                                                                     *
***********************************************************************
*
WKSTG    DSECT ,
*
WK_SAVEAREA      DS  18F               Program Save Area
*
*   SSI Control Block Areas
*
WK_SSOBP DS    A                       SSOB Pointer
*
         DS    0D
WK_SSOB  DS    XL(SSOBHSIZ)            SSOB
*
         DS    0D
WK_SSJI  DS    XL(SSJISIZE)            SSJI
*
         DS    0D
WK_SPLIO DS    XL(SPIOSZE)             SPLIO
*
         TITLE 'SDSF User Exit - Bit Equates'
***********************************************************************
*                                                                     *
*   Bit Equates                                                       *
*                                                                     *
***********************************************************************
*
         IEZBITS ,
*
         TITLE 'SDSF User Exit - ISFWORK - SDSF User Exit Parameters Ar*
               ea'
***********************************************************************
*                                                                     *
*   SDSF User Exit Parameters Area                                    *
*                                                                     *
***********************************************************************
*
PARMAREA DSECT ,
*
         ISFUPRM ,
*
         TITLE 'SDSF User Exit - CVT DSECT'
***********************************************************************
*                                                                     *
*   Communications Vector Table (CVT) DSECT                           *
*                                                                     *
***********************************************************************
*
         CVT   DSECT=YES
*
         TITLE 'SDSF User Exit - JESCT DSECT'
***********************************************************************
*                                                                     *
*   JES Communication Table (JESCT) DSECT                             *
*                                                                     *
***********************************************************************
*
         IEFJESCT ,
*
         TITLE 'SDSF User Exit - SSOB DSECT'
***********************************************************************
*                                                                     *
*   Subsystem Options Block (SSOB) DSECT                              *
*                                                                     *
***********************************************************************
*
         IEFSSOBH ,
*
         TITLE 'SDSF User Exit - SSJI DSECT'
***********************************************************************
*                                                                     *
*   JES Job Information Services (SSJI) DSECT                         *
*                                                                     *
***********************************************************************
*
SSJI     DSECT ,
*
         IAZSSJI ,
*
         TITLE 'SDSF User Exit - SPLIO DSECT'
***********************************************************************
*                                                                     *
*   JES Spool Read Service (SPLIO) DSECT                              *
*                                                                     *
***********************************************************************
*
         IAZSPLIO ,
*
timhenness
 
Posts: 2
Joined: Fri Jun 04, 2010 5:29 am
Has thanked: 0 time
Been thanked: 0 time


Return to Mainframe Security

 


  • Related topics
    Replies
    Views
    Last post