View previous topic :: View next topic
|
Author |
Message |
wanderer
Active User
Joined: 05 Feb 2007 Posts: 199 Location: Sri Lanka
|
|
|
|
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 |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
wanderer,
Remove this.
Quote: |
FILTER JOBID EQ 'JOB0xxxx' |
Don't enclose jobid in quotes. |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Also, take a look at ISFOUT. You should see the error messages, if there are any.
O. |
|
Back to top |
|
|
wanderer
Active User
Joined: 05 Feb 2007 Posts: 199 Location: Sri Lanka
|
|
|
|
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 |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
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 |
|
|
wanderer
Active User
Joined: 05 Feb 2007 Posts: 199 Location: Sri Lanka
|
|
|
|
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 |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
wanderer,
Quote: |
I see that you have used SDSF instead of ISFAFD. |
Both are diff flavours. |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Can you do the same filtering using the interactive SDSF panels?
O. |
|
Back to top |
|
|
wanderer
Active User
Joined: 05 Feb 2007 Posts: 199 Location: Sri Lanka
|
|
|
|
Ofer71,
Yes, the same filter works perfectly in interactive SDSF panels. |
|
Back to top |
|
|
wanderer
Active User
Joined: 05 Feb 2007 Posts: 199 Location: Sri Lanka
|
|
|
|
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 |
|
|
Decacas
New User
Joined: 30 Oct 2007 Posts: 1 Location: Brazil
|
|
|
|
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 |
|
|
hnharish
New User
Joined: 30 Aug 2005 Posts: 23
|
|
|
|
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 |
|
|
|