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

"Filter" not working for SDSF batch


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

Active User


Joined: 05 Feb 2007
Posts: 199
Location: Sri Lanka

PostPosted: Wed Aug 15, 2007 10:02 am
Reply with quote

Hi,

I have been trying to access SDSF in batch. Following is the code I am using,

Code:
//BSDSF  EXEC PGM=ISFAFD,PARM='++60,132'       
//ISFOUT   DD SYSOUT=*                         
//SYSUDUMP DD SYSOUT=*                         
//SYSPRINT DD SYSOUT=*                         
//SYSTSPRT DD SYSOUT=*                         
//SYSOUT   DD SYSOUT=*                         
//ISFIN    DD *                               
 PRE xxxxxxxx                                 
 ST                                           
 FILTER JOBID EQ 'JOB0xxxx'                   
 ++?                                           
 FIND 'OUTDD'                                 
 ++S                                           
 PRINT ODSN 'xxxxxxxx.SDSF' * OLD               
 PRINT 1 9999                                 
 PRINT CLOSE                                   
 END                                           
 EXIT                                         
/*                                             


But the filter command doesn't work. It just picks up the first job on the list regardless of the JobId I supply. I have looked around in google and searched the forum but didn't find any solution for this.

I haven't tried using REXX to use SDSF yet and will try later on, but not sure why this doesn't work. The Filter command works perfectly if I issue manually on panel.

Any tips will be very helpful.

Thanks.
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Wed Aug 15, 2007 10:43 am
Reply with quote

wanderer,

Quote:
PRE xxxxxxxx

Remove this.

Quote:
FILTER JOBID EQ 'JOB0xxxx'

Don't enclose jobid in quotes.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Wed Aug 15, 2007 10:47 am
Reply with quote

Also, take a look at ISFOUT. You should see the error messages, if there are any.

O.
Back to top
View user's profile Send private message
wanderer

Active User


Joined: 05 Feb 2007
Posts: 199
Location: Sri Lanka

PostPosted: Wed Aug 15, 2007 11:21 am
Reply with quote

Hello Murmohk1 and Ofer71,

I removed the PRE command. And I have tried both without and with quotes. But no effect.

ISFOUT looks like as follows,

1. displays like ISPF;SD
2. displays like ISPF;SD;ST
3. displays like ISPF;SD;ST (This is when Filter should have worked but instead, displays all jobs here instead of filtered one, and no error or message )
4. displays like ISPF;SD;ST then "?" command on left of the first job from bottom(not my filter job)
...

Hope the above makes sense.

The only error is when FIND command is issued. Since the job it is picking up doesn't have OUTDD, it says "Bottom of Data Reached". So it picks up the JESMSGLG to Print. And this is OK, but why doesn't it find the filtered job?

Thanks.
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Wed Aug 15, 2007 11:42 am
Reply with quote

Wanderer,

I had provided the jobstep and corresponding ISFOUT from the spool.

Code:
//SDSFOUT EXEC PGM=SDSF   
//SYSPRINT DD SYSOUT=*     
//SYSOUT DD SYSOUT=*       
//ISFOUT DD SYSOUT=*       
//ISFIN DD *               
ST                         
OWNER MYRACFID             
FILTER JOBID EQ JOB11892   
++?                       
PRINT ODSN ................
PRINT                     
PRINT CLOSE               
END                       
/*                         




Quote:
SDSF STATUS DISPLAY ALL CLASSES LINE 1-1 (1)
COMMAND INPUT ===> SCROLL ===> PAGE
NP JOBNAME JobID Owner Prty Queue C Pos SAff ASys Status
LISTCAT JOB11892 KORAPAM 1 PRINT P 247
Back to top
View user's profile Send private message
wanderer

Active User


Joined: 05 Feb 2007
Posts: 199
Location: Sri Lanka

PostPosted: Wed Aug 15, 2007 1:00 pm
Reply with quote

Murmohk1, thanks for your tips.

I see that you have used SDSF instead of ISFAFD. I tried it and the filter works. But subsequent commands like ++? or ++s don't. It tries to execute them from command line instead of left of the job, resulting in "Invalid Command" messages.

thanks.
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Wed Aug 15, 2007 1:05 pm
Reply with quote

wanderer,

Quote:
I see that you have used SDSF instead of ISFAFD.

Both are diff flavours.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Wed Aug 15, 2007 3:22 pm
Reply with quote

Can you do the same filtering using the interactive SDSF panels?

O.
Back to top
View user's profile Send private message
wanderer

Active User


Joined: 05 Feb 2007
Posts: 199
Location: Sri Lanka

PostPosted: Wed Aug 15, 2007 11:33 pm
Reply with quote

Ofer71,

Yes, the same filter works perfectly in interactive SDSF panels.
Back to top
View user's profile Send private message
wanderer

Active User


Joined: 05 Feb 2007
Posts: 199
Location: Sri Lanka

PostPosted: Thu Aug 16, 2007 1:05 am
Reply with quote

I finally made the code to work using the PGM=SDSF. Here it is,

Code:
//BSDSF  EXEC PGM=SDSF                                       
//ISFOUT   DD SYSOUT=*                                       
//SYSUDUMP DD SYSOUT=*                                       
//SYSPRINT DD SYSOUT=*                                       
//SYSTSPRT DD SYSOUT=*                                       
//SYSOUT   DD SYSOUT=*                                       
//ISFIN    DD *                                               
 ST                                                           
 FILTER JOBID EQ JOB05433                                     
 F myjobnm                                                   
 ++?                                                         
 FIND 'myjobdd'                                                 
 ++S                                                         
 PRINT ODSN 'myracfid.SDSF' * OLD                             
 PRINT 1 9999                                                 
 PRINT CLOSE                                                 
 END                                                         
 EXIT                                                         
/*                                                           


Looks like I had to do a "F myjobnm" so that the cursor could move to the left of job for the "++?" command to be successful. This avoided the invalid command for "++?".

I read that ISFAFD is more flexible, so would love to have that work too, but the Filter is just not working there, for now.
Back to top
View user's profile Send private message
Decacas

New User


Joined: 30 Oct 2007
Posts: 1
Location: Brazil

PostPosted: Mon Jan 07, 2008 6:35 pm
Reply with quote

The filter doesn't work using ISFAFD because you didn't executed the command "AFD REFRESH" after the Filter Command. When using Filter command, always execute the refresh command.
Back to top
View user's profile Send private message
hnharish

New User


Joined: 30 Aug 2005
Posts: 23

PostPosted: Wed Jan 18, 2012 10:31 am
Reply with quote

Decacas wrote:
The filter doesn't work using ISFAFD because you didn't executed the command "AFD REFRESH" after the Filter Command. When using Filter command, always execute the refresh command.


Hello Team,

I am working on the similar 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. As suggested, I executed "AFD REFRESH" cmd after executing filter cmd but I am getting message "AFD MODE REQUIRED” also jobs are not filtered. 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
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 Execute secondary panel of sdsf with ... CLIST & REXX 1
No new posts Routing command Address SDSF to other... TSO/ISPF 2
No new posts How to get a stack trace on a looping... ABENDS & Debugging 5
No new posts Calling Java method from batch COBOL ... COBOL Programming 5
No new posts PuTTY - "User is not a surrogate... IBM Tools 5
Search our Forums:

Back to Top