BPX1TGP (tcgetpgrp) example
The following code gets the foreground process group ID
associated with the controlling terminal. For this
example to work, STDIN must be associated with the controlling
terminal. For the callable service, see tcgetpgrp (BPX1TGP, BPX4TGP) — Get the foreground process group ID. AMODE 64 callers use BPX4TGP (tcgetpgrp) example.
CALL BPX1TGP, Get the foreground process grp ID +
(=A(STDIN_FILENO), Input: File descriptor +
RETVAL, Return value -1, fgrd proc grp ID +
RETCODE, Return code +
RSNCODE), Reason code +
VL,MF=(E,PLIST) ----------------------------------