Preventing Use of TFRSECJOB
From: Kevin Doolittle To: All
I am trying to write an application that will prevent the user from accessing the Transfer to Secondary Job (TFRSECJOB) command. I want to prevent use of the command only during the time that the application will be running. I also do not want the other users on the system to be prevented from using the command. Does anyone have any suggestions as to how I can do this?
From: Ernie Malaga To: Kevin Doolittle
Create a dummy TFRSECJOB command that does nothing. 3 provides the command source.
Create a dummy TFRSECJOB command that does nothing. Figure 3 provides the command source.
Compile the command with:
CRTCMD CMD(xxx/TFRSECJOB) + PGM(xxx/TFRSECJOBC) + SRCFILE(xxx/QCMDSRC)
Compile the CPP (4) with:
Compile the CPP (Figure 4) with:
CRTCLPGM PGM(xxx/TFRSECJOBC) + SRCFILE(xxx/QCLSRC)
This command does nothing at all. It is placed in library xxx (any library you choose). Use a library that is not in the system portion in the library list, or in any other place in the library list.
Then, to prevent a job from accessing IBM's TFRSECJOB (the real thing), run the following command in a CL program (or from the keyboard):
CHGSYSLIBL LIB(xxx) OPTION(*ADD)
This places library xxx at the top of the system portion of the library list (therefore, above QSYS), only for this job (all other jobs on the system are not affected).
From then on, if the user runs TFRSECJOB from the keyboard or from option 1 of the SysRq menu, the system accesses your dummy copy and does nothing.
TechTalk: Preventing Use of TFRSECJOB
Figure 3 Dummy TFRSECJOB Command
TFRSECJOB: CMD PROMPT('Transfer to Secondary Job')
TechTalk: Preventing Use of TFRSECJOB
Figure 4 CPP for Dummy TFRSECJOB
TFRSECJOBC: PGM ENDPGM
LATEST COMMENTS
MC Press Online