IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Need to filter jobs in the spool based on start time


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
hnharish

New User


Joined: 30 Aug 2005
Posts: 23

PostPosted: Wed Jan 18, 2012 12:24 pm
Reply with quote

Hello Team,

I am working on a requirement to filter the jobs based on start time. I am using the cmd "FILTER 'STA TIME' GE '6:15:58' " to filter the jobs but it is not getting filtered. I tried executing "AFD REFRESH" cmd after executing filter cmd but I am getting message "AFD MODE REQUIRED”. Please suggest.

If the above cmd runs successfully in spool then will try to implement in the jcl with SDSF program.

Thanks,
Harish.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Jan 18, 2012 1:00 pm
Reply with quote

see this topic
www.ibmmainframes.com/viewtopic.php?t=54926&highlight=
for working examples of REXX scripts invoking SDSF
and the links to the redbook and tutorial on how to use the REXX SDSF smart interface
Back to top
View user's profile Send private message
hnharish

New User


Joined: 30 Aug 2005
Posts: 23

PostPosted: Wed Jan 18, 2012 3:12 pm
Reply with quote

enrico-sorichetti wrote:
see this topic
www.ibmmainframes.com/viewtopic.php?t=54926&highlight=
for working examples of REXX scripts invoking SDSF
and the links to the redbook and tutorial on how to use the REXX SDSF smart interface


Thanks for the updates.

I would like to go with SDSF program. Please let me know the corrections in the filter cmd.

Regards,
Harish.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Jan 18, 2012 3:22 pm
Reply with quote

Quote:
I would like to go with SDSF program. Please let me know the corrections in the filter cmd.

not me icon_biggrin.gif
I see no reason to waste time investigating the use of a dumb interface
when a smarter one is available ( especially for error handling and <not found> conditions )

here is a snippet which will filter jobs started between, ( find out Yourself )


Code:
 ****** ***************************** Top of Data ******************************
 000001 /*REXX - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 000002 /*                                                                   */
 000003 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 000004 Trace  "O"                                                             
 000005 Parse Source _sys _how _cmd .                                           
 000006                                                                         
 000007 IsfRC = isfcalls("ON")                                                 
 000008 if IsfRC ¬= 0 then do                                                   
 000009     say "isfcalls RC" IsfRC                                             
 000010     exit                                                               
 000011 end                                                                     
 000012                                                                         
 000013 isfprefix     = "ENRICO*"                                               
 000014 isffiltermode = "AND"                                                   
 000015 isffilter     = "timee ge 17:00:00  timee le 18:00:00"                 
 000016 isfcols       = "jname jobid datee timee daten timen "                 
 000017                                                                         
 000018 Address SDSF "isfexec h  (alternate delayed"                           
 000019 if RC ¬= 0 then do                                                     
 000020     say "isfexec  RC" RC                                               
 000021     say isfmsg                                                         
 000022     do  m = 1 to isfmsg2.0                                             
 000023         say isfmsg2.m                                                   
 000024     end                                                                 
 000025     exit                                                               
 000026 end                                                                     
 000027                                                                         
 000028 do  j = 1 to jname.0                                                   
 000029     say right(j,2) jname.j jobid.j datee.j timee.j daten.j timen.j     
 000030 end                                                                     
 000031                                                                         
 000032 call  isfcalls "OFF"                                                   
 000033 exit                                                                   
 ****** **************************** Bottom of Data ****************************
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Finding and researching jobs All Other Mainframe Topics 0
No new posts To get the the current time DFSORT/ICETOOL 13
No new posts RC query -Time column CA Products 3
No new posts How to create a list of SAR jobs with... CA Products 3
No new posts Help in Automating Batch JCL jobs mon... JCL & VSAM 3
Search our Forums:

Back to Top