Mail the contents of file



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Re: Mail the contents of file

Postby rajas.abcdefg » Wed Nov 25, 2009 10:50 am

so you mean, it is not possible to find if a job is exeuting for a long time
rajas.abcdefg
 
Posts: 38
Joined: Thu Jul 09, 2009 8:56 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Re: Mail the contents of file

 

Re: Mail the contents of file

Postby dick scherrer » Wed Nov 25, 2009 10:58 am

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.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: Mail the contents of file

Postby kalyanbrata.dhar » Tue Dec 15, 2009 10:23 am

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!!!
kalyanbrata.dhar
 
Posts: 12
Joined: Wed Jul 09, 2008 3:15 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Mail the contents of file

Postby Anuj Dhawan » Tue Jan 05, 2010 6:51 pm

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
Anuj
Anuj Dhawan
 
Posts: 274
Joined: Mon Feb 25, 2008 3:53 am
Location: Mumbai, India
Has thanked: 6 times
Been thanked: 4 times

Re: Mail the contents of file

Postby dick scherrer » Wed Jan 06, 2010 2:12 am

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
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Previous

Return to JCL

 


  • Related topics
    Replies
    Views
    Last post