Trace Job (TRCJOB)

35 pts.
Tags:
AS/400 Control Language
CL
CL Commands
Exit Program
EXTPGM
Maximum Storage Allowed
MAXSTG
Trace Job
TRCJOB
One of my old CL Prog uses this cmd TRCJOB MAXSTG(1024) EXITPGM(LIB/MYPGM) after migrating to V5R4 it is not working can anybody tell me how to use in V5R4.
ASKED: February 9, 2009  7:40 AM
UPDATED: February 18, 2009  3:38 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

Dear bruce

actually this was a small utility to view user’s active screen the code of ExitPgm is ;

PGM PARM(&TRCOPTSET &RESERVED &OUTPUT &COMPDATA)
DCL VAR(&TRCOPTSET) TYPE(*CHAR) LEN(10)
DCL VAR(&RESERVED) TYPE(*CHAR) LEN(10)
DCL VAR(&OUTPUT) TYPE(*CHAR) LEN(10)
DCL VAR(&COMPDATA) TYPE(*CHAR) LEN(100)
DCL VAR(&DTAQA) TYPE(*CHAR) LEN(10)
DCL VAR(&DTAQB) TYPE(*CHAR) LEN(10)
DCL VAR(&LEN) TYPE(*DEC) LEN(5 0)
DCL VAR(&WAIT) TYPE(*DEC) LEN(5 0) VALUE(0)
DCL VAR(&JOBNO) TYPE(*CHAR) LEN(06)
DCLF FILE(SCREEN1)
IF COND(&TRCOPTSET *EQ ‘CPI3999 ‘) THEN(DO)
/*******/
RTVJOBA NBR(&JOBNO)
CHGVAR VAR(&DTAQA) VALUE(‘DSP’ || &JOBNO)
CHGVAR VAR(&DTAQB) VALUE(‘STS’ || &JOBNO)
/*******/
CALL PGM(QRCVDTAQ) PARM(&DTAQB ‘QGPL’ &LEN &LINES +
&WAIT)
IF COND(&LEN *EQ 0) THEN(GOTO CMDLBL(FINISH))
/*******/
OVRDSPF FILE(SCREEN1) TOFILE(LIB/SCREEN2) +
LVLCHK(*NO)
CHGVAR VAR(&LINES) VALUE(X’00021000730462′)
SNDRCVF RCDFMT(SCREEN)
CHGVAR VAR(&LEN) VALUE(1920)
CHGVAR VAR(&LINES) VALUE(%SST(&LINES 2 3563))
CALL PGM(QSNDDTAQ) PARM(&DTAQA ‘QGPL’ &LEN &LINES)
ENDDO

FINISH: ENDPGM

what can i do to convert in V5R4

—————————————————————————————————–

What you have been doing is using an exit program capability of TRCJOB to essentially call a program that runs in a different job. V5R4 provides formal support for this with a new exit point called QIBM_QWC_JOBITPPGM and the Call Job Interrupt Program (QWCJBITP) API. I don’t have the time right now to code the equivalent to what you have been doing with TRCJOB, but you can find a sample program demonstrating this capability in my <a href=”http://www.brucevining.com/Presentations/PPT_Presentations/Whats_new_in_system_APIs.pdf”>What’s New in System APIs</a> presentation.

If you have questions on this feel free to contact me offline.

Bruce
<a href=”http://www.brucevining.com/”>Bruce Vining Services</a>

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Cwc
    What is failing -- what messages are written to the job log?
    4,290 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following