Page 2 of 2

Re: Mail the contents of file

PostPosted: Wed Nov 25, 2009 10:50 am
by rajas.abcdefg
so you mean, it is not possible to find if a job is exeuting for a long time

Re: Mail the contents of file

PostPosted: Wed Nov 25, 2009 10:58 am
by dick scherrer
Hello,

so you mean, it is not possible to find if a job is exeuting for a long time
No that is not what i mean - i posted what i meant. It is quite doable, but not the kind of task for a student or a beginner.

Suggest you talk with your scheduling people and see f they have already done something to identify "long-running" jobs.

Re: Mail the contents of file

PostPosted: Tue Dec 15, 2009 10:23 am
by kalyanbrata.dhar
You can try with the below codes:

The JCL will look like below:

//STEP001 EXEC PGM=IEFBR14   
//SYSPRINT DD SYSOUT=*                               
//DD01     DD DSN=pppnnn.SPOOL.LIST.ACTIVE.JOBS,   
//              DISP= (MOD, DELETE, DELETE), SPACE= (TRK, 0)
//STEP010 EXEC PGM=IKJEFT01   (this utility tools is to run REXX)                 
//SYSTSPRT DD SYSOUT=*                         
//OUTPUT   DD DSN= pppnnn.SPOOL.LIST.ACTIVE.JOBS
//            DISP=(NEW,CATLG,DELETE),         
//            SPACE=(CYL,(5,10),RLSE),         
//            DCB=(DSORG=PS,RECFM=FB,LRECL=80)
//SYSTSIN DD *                                   
EXEC 'pppnnn.CA7.CNTL(REXX)'              (location of the REXX)   
MMCO*                         (Type of job I want to search)                 
 â€˜pppnnn.SPOOL.LIST.ACTIVE.JOBS '             (output location)               
/*         

The REXX code will look like below:

This REXX will log into the SDSF panel with the credential of current user and will capture the jobs (the job particular has been passed from JCL), and will write the output in the output dataset as passed from JCL.
REXX Code

 /**-------------------------------------------------------
"ALLOC F(XXOT) DS("DSN") SHR REUSE"     
Drop out.                               
RC = ISFCALLS("ON")                     
isfowner='*'                           
Address SDSF "ISFEXEC I "Job"*"         
If RC <> 0 Then Exit 20                 
jobname = word(isfcols,1)               
out.1   = 'JOBNAME '                   
out.2   = '========'                   
Do ix = 1 to isfrows                       
jx=ix+2                                 
out.jx = value(jobname"."ix)         
End                                     
"EXECIO * DISKW XXOT (FINIS STEM out." 
"EXECIO 0 DISKW XXOT (FINIS"           
"FREE F(XXOT)"                         
RC = ISFCALLS("OFF")                   
Say "Job list written to File"         
Exit                                   
/**---------------------------------------------------------------


Try with this... Best of luck!!!

Re: Mail the contents of file

PostPosted: Tue Jan 05, 2010 6:51 pm
by Anuj Dhawan
dick scherrer wrote:What you want to do is not a subject for beginners/students. Many quite qualified people would not be able to automate this quickly.
So can we refere him back to the "expert forum" now? :D

Re: Mail the contents of file

PostPosted: Wed Jan 06, 2010 2:12 am
by dick scherrer
Hi Anuj,

So can we refere him back to the "expert forum" now?
I wouldn't think so. . .

Many students/beginners ask questions that many experts would struggle to answer (if they even could answer).

That does not mean that the "asker" should be considered an expert. . .

Just MHO :)

d