View previous topic :: View next topic
|
Author |
Message |
diwa_thilak
Active User
Joined: 13 Jul 2006 Posts: 205 Location: At my desk
|
|
|
|
Hi Friends,
I need to purge the job in SDSF.
When i try to use the below command, i could not able to purge
ADDRESS TSO "CANCEL "JNAME.I"("JOBID.I") PURGE"
Error message - "JOBNAME SHOULD BE USERID PLUS ATLEAST 1 CHARACTER".
Then i tried the below code to get the job name and Purge
/* REXX */
TCB = PTR(540)
TIOT= PTR(TCB+12)
JobNAM= STG(TIOT,8)
StepNAM= STG(TIOT+8,8)
ProcNAM = STG(TIOT+16,8)
JSCB= PTR(TCB+180)
ProgNAM= STG(JSCB+360,8)
SSIB= PTR(JSCB+316)
JobNUM= STG(SSIB+12,8)
SAY 'JOB NAME:' JobNAM
SAY 'PROC STEP NAME:' ProcNAM
SAY 'STEP NAME :' StepNAM
SAY 'PROGRAM NAME:' ProgNAM
SAY 'JOB NUMBER:' JobNUM
EXIT(0)
PTR: RETURN C2D(STORAGE(D2X(ARG(1)),4))
STG: RETURN STORAGE(D2X(ARG(1)),ARG(2))
Still i could not able purge. the command always expects the job name should be USERID + 1 character.
I tried the below code, but still i could not able to execute.
rc=isfcalls(”ON”)
Address SDSF “ISFEXEC ST”
do ix=1 to JNAME.0
if pos(“KEN”,JNAME.ix) = 1 then
Address SDSF “ISFACT ST TOKEN(‘”TOKEN.ix”’) PARM(NP P)”
rc=isfcalls(“OFF”)
i am getting an error message like
"END OF FILE ON CLIST INPUT OCCURRED BEFORE ALL DO STMTS WERE CLOSED"
Let me know whether i am following the right process.
Thanks |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
Assuming you have the authority to purge a job, why can't you (C)ancel it or (P)urge it as a line command on the SDSF screen instead of submitting a REXX program to do it? |
|
Back to top |
|
|
DB2 Guy
New User
Joined: 28 Oct 2008 Posts: 98 Location: Cubicle
|
|
|
|
Or may be block purge (//P..//P) if there are multiple jobs to be purged.. |
|
Back to top |
|
|
MBabu
Active User
Joined: 03 Aug 2008 Posts: 400 Location: Mumbai
|
|
|
|
also notice that your message says that it is interpreting your code as a CLIST, not as Rexx. add the /* Rexx */ comment as the 1st line. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
From the TSO Command Reference manual:
Quote: |
1.11.2 CANCEL Command Operands
(jobname (jobid))
specifies the names of the jobs that you want to cancel. The job names must consist of your user identification plus 1 to 8 alphanumeric characters. However, if your installation has replaced the default IBM-supplied CANCEL exit, you may be allowed to specify different job names. |
So it sounds like your site is using the IBM-supplied CANCEL exit and you may only be able to use REXX to cancel jobs that have names starting with your userid. I suggest you contact your site system support people and find out if this is the case. |
|
Back to top |
|
|
|