When writing JES2 exits that:
- run outside the JES2 main task and
- need to access or update checkpoint control blocks
you need to follow the specific coding recommendations in this section
as well as those specific "Programming Considerations" described for the JES2
exit that you are implementing.
Before you can access the JQE or CAT control blocks, you need to obtain
a checkpoint version (copy of the checkpoint data set) by invoking the $DSERV
macro. Non-main task exits can access checkpoint control blocks like JQEs,
CATs in read mode only. You can also access other control blocks such as the
BERT, JOE, and WSC.
Consider the following series of calls to obtain the CAT (class attribute
table) in read mode and then return it:
- Use the following $DSERV call to obtain the checkpoint version:
$DSERV FUNC=GET,DSERV=addr-x
- When JES2 returns the DSERV, issue a $DOGCAT call to obtain the $CAT from
the checkpoint version.(addr-x is the version address from the first $DSERV
call). Specify JOBCLASS= to obtain a specific CAT.
$DOGCAT ACTION=(FETCH,READ),CAT=addr-z,DSERV=addr-x,JOBCLASS=y
- When you are finished extracting information from the CAT, use the following
action to return the CAT obtained (addr-z is the address from the first $DOGCAT
call):
$DOGCAT ACTION=RETURN,CAT=addr-z,DSERV=addr-x
- 4. Now issue a second $DSERV to return the checkpoint version (addr-x
is the address of the DSERV obtained from the first $DSERV call):
$DSERV FUNC=FREE,DSERV=addr-x