Session O426 - JES2: User Modifications

SHARE 71
August 15-19, 1988

A couple of people ran through their recent contributions to the SHARE JES2 mods tape. Only the first person was very interesting; he told us how he got his code to work, not what it did.

He implemented a homegrown JECL statement (/*JOBPARM and /*ROUTE are JECL). This by itself was no great shakes, but he created and saved a control block on the HASP checkpoint dataset, slaved to the JCT. When JES2 processes your job, it reads a JCT (Job Control Table) from the SPOOL. The JCT is updated and written back to the SPOOL when JES2 is no longer immediately interested in your job. The speaker at this session arranged it so that his new control block was read/written along with the JCT.

The technique involved a user modification to HASPSSSM so that he could call the SPOOL I/O subroutine (HCBRD) from outside HASPSSSM. While I normally abhor mods to any IBM code, this particular change is a low-impact one.

He uses exit #4 to actually process his JECL statement. It does this:

  1. $GETBUF a workarea to contain the JECL parameters
  2. Initializes the workarea
  3. Saves its address in a user field in the JCT (JCTUSER2)
  4. Moves the JECL parameters to the workarea
Exits #7 and #8 get control whenever JES2 reads or writes a JCT. His exit #7 does the following:
  1. $TRACK allocates a SPOOL track
  2. Saves the address of the track in the job's JCT
  3. Restores the IOEWF field in the PCE control block (destroyed by $TRACK)
  4. Gets the address of the workarea created by exit #4 out of JCTUSER2
  5. Uses $EXCP to write the control block to the SPOOL
  6. $FREEBUF deletes the workarea
  7. Restores the IOEWF, BUFAD and SEEK fields of the PCE, which were destroyed by $EXCP
Exit #8 reads the information saved on the SPOOL by exit #7:
  1. Locate the SJB control block and save the contents of SJBSAVE
  2. Get into 24-bit addressing mode (if XA) and key zero
  3. Call HCBGM, the "getmain" routine in HASPSSSM, which allocates space for the user control block in memory
  4. Save the address returned by HCBGM into JCTUSER2
  5. Retrieve the track address of the user control block from the JCT
  6. Call HCBRD to actually read the control block into memory
  7. Restore the original addressing mode and key

Back to session index
Back to index of SHARE meetings
Read the disclaimer