There are 2 ways to call CKGRACF:
If this program is in the linklist (and in the authorized command list in IKJTSOxx), you can just
address "TSO" "CKGRACF USER xx PWSET"
If SCKRLOAD is not part of linklist, you have to call CKGRACF
address "TSO" "CALL 'CKR.SCKRLOAD(CKGRACF)' 'USER xx PWSET' "
Note, output of CKGRACF is sent to DD name SYSTERM (when allocated to a data set) or to the terminal (when SYSTERM is allocated to DA(*)).
In some CKGRACF commands, you will find the output in SYSTERM to be different, depending on the presence of DD name CKGPRINT (where the debug information for CKGRACF is written). You need to figure out if your output is better when you add an
address "TSO" "FREE FILE(CKGPRINT)"
or an
address "TSO" "ALLOC FILE(CKGPRINT) DUMMY REUSE"
At a recent project I used this Rexx function to execute CKGRACF commands:
/* reset password */
call CKG_cmd "USER" target_id "PWSET PREVIOUS RESUME"
resetResult = result
exit
/* Call CKGRACF to execute a command. */
CKG_cmd: procedure expose g.
address "TSO"
g.!ckgracf1 || "CMD" arg(1) || g.!ckgracf2
CKG_rc = rc
address
return CKG_rc
In the header I would set the 2 global values:
/* Call via linklist: */
g.!ckgracf1 = "CKGRACF " /* blank is mandatory */
g.!ckgracf2 = ""
/* In case CKGRACF is not in the linklist: */
g.!ckgracf1 = "call 'ckr.sckrload(ckgracf)' '"
g.!ckgracf2 = "'"
------------------------------
Rob van Hoboken
------------------------------