Discussion:
QUSRJOBI - Determine if F3/F12 has been pressed after RUNQRY command
(too old to reply)
Rhona Gallogly
2004-06-10 15:36:54 UTC
Permalink
I call the following pgm to monitor for F3 or F12 command after a
RUNQRY command within a CL pgm, it seems however that this works
correctly when the CL pgm is called interactively through 'call qcmd'
however when I attempt to run this job from our application the values
are not as expected, the values seem to keep the previous value '10'
or '01' instead of resetting to 00 when I press enter.

IBM are of little help(As usual!) as they say it works for them, they
cannot provide me with information as to what this pgm does so that I
can check what it is in the job attributes(Or Other) that is affecting
things.

Please help.

CALL PGM(QUSRJOBI) PARM(&A_RCV &A_LEN 'JOBI0600' +
'*' ' ')

&A_RCV 103 1 should eq 1 on F3 key
&A_RCV 104 1 should eq 1 on F12 key
Brian
2004-06-10 20:21:54 UTC
Permalink
I think the problem is with the note related to the two fields in JOBI0600:

Note: The application or command that was called before this API determines
how the key is set.



The application in this case (RUNQRY command) does not set these fields when
Enter is pressed. It work from command entry becuase (apparently) QCMD does
sent he fields when you press Enter to call your program.

You can set these fields via QWCCCJOB API before running RUNQRY:

dcl &chgInfo *char 22
chgvar %bin( &chgInfo 1 4 ) 2 /* Two var-len records follow */

chgvar %bin( &chgInfo 5 4 ) 1 /* Exit key */
chgvar %bin( &chgInfo 9 4 ) 1 /* One byte */
chgvar %sst( &chgInfo 13 1 ) '0' /* Off */

chgvar %bin( &chgInfo 14 4 ) 2 /* Cancel key */
chgvar %bin( &chgInfo 18 4 ) 1 /* One byte */
chgvar %sst( &chgInfo 22 1 ) '0' /* Off */

call QWCCCJOB ( &chgInfo x'0000000000000000' )
runqry ...
Post by Rhona Gallogly
I call the following pgm to monitor for F3 or F12 command after a
RUNQRY command within a CL pgm, it seems however that this works
correctly when the CL pgm is called interactively through 'call qcmd'
however when I attempt to run this job from our application the values
are not as expected, the values seem to keep the previous value '10'
or '01' instead of resetting to 00 when I press enter.
IBM are of little help(As usual!) as they say it works for them, they
cannot provide me with information as to what this pgm does so that I
can check what it is in the job attributes(Or Other) that is affecting
things.
Please help.
CALL PGM(QUSRJOBI) PARM(&A_RCV &A_LEN 'JOBI0600' +
'*' ' ')
&A_RCV 103 1 should eq 1 on F3 key
&A_RCV 104 1 should eq 1 on F12 key
Ken
2004-06-10 20:28:59 UTC
Permalink
Hi Rhona -
Post by Rhona Gallogly
I call the following pgm to monitor for F3 or F12 command after a
RUNQRY command within a CL pgm, it seems however that this works
correctly when the CL pgm is called interactively through 'call qcmd'
however when I attempt to run this job from our application the values
are not as expected, the values seem to keep the previous value '10'
or '01' instead of resetting to 00 when I press enter.
You need to use the QWCCCJOB API to reset the exit and cancel key
flags before running RUNQRY.

http://publib.boulder.ibm.com/iseries/v5r1/ic2924/index.htm?info/apis/qwcccjob.htm
--
Ken
http://www.ke9nr.net/
Opinions expressed are my own and do not necessarily represent the views of my employer or anyone in their right mind.
Loading...