Page 2 of 2

Re: JES2 and purge by batch

PostPosted: Mon Sep 09, 2013 9:25 pm
by dick scherrer
Hello,

You need to talk with your system support people or the security admins.

Someone will have to allow your id to do this. Many organizations restrict this to only a few. . . Often this requires management approval.

Re: JES2 and purge by batch

PostPosted: Tue Sep 10, 2013 12:02 am
by Akatsukami
samb01 wrote:i don't what can i do to have the right ...

The User authorization topic indicates what steps you should take if you believe you have been erroneously denied authorization.

However...your initial post indicates that you are attempting to delete all aged sysout for a class, presumably belonging to many users beside yourself. In my shop, this ability is restricted, as Mr. Scherrer says, to a few select IDs. If this is something that you doing on your own initiative, I recommend that you eighty-six the idea.

Re: JES2 and purge by batch

PostPosted: Tue Sep 10, 2013 12:37 pm
by samb01
Hello Akatsukami,
don't worry it is not my own initative.

I 'w going to ask the security admin to get the autorization.

We want to purge the hel class wich have are ten days old before. If we don't do that, the spool will be full.

Re: JES2 and purge by batch

PostPosted: Tue Sep 10, 2013 1:55 pm
by samb01
I succed by using my user et not TWS.
In the rexx, i delete the all the sysout beginning by my user.

But i want the sysout which are ten days old only...

/* REXX */                                                         
TRACE I                                                             
 RC=ISFCALLS('ON')                                                 
       /* SET THE JOBNAME PREFIX AND OWNER */                       
/*  ISFPREFIX="**"                                                 
    ISFOWNER="*"  */                                               
 ISFPREFIX="MYUSER*"                                               
 ISFOWNER="*"                                                       
     /* ACCESS THE ST PANEL.  A TOKEN VARIABLE IS  */               
     /* CREATED FOR EACH ROW WHICH IS SUBSEQUENTLY */               
     /* NEEDED TO PERFORM ACTIONS                  */               
 ADDRESS SDSF "ISFEXEC H"                                           
 LRC=RC                                                             
 CALL MSGRTN  /* LIST ANY ERROR MESSAGES */                         
 IF LRC<>0 THEN                                                     
   EXIT 20                                                         
     /* FIND ALL JOBS STARTING WITH RJONES AND CANCEL THEM */       
 NUMROWS=ISFROWS                                                   
 DO IX=1 TO NUMROWS    /* LOOP FOR ALL ROWS RETURNED */               
  IF POS("MYUSER",JNAME.IX) = 1 THEN  /* IF THIS IS DESIRED ROW */   
   DO                                                                 
    /* ISSUE THE P ACTION CHARACTER FOR THE JOB    */                 
     /* IDENTIFIED BY THE TOKEN VARIABLE.  NOTE     */               
     /* THE TOKEN MUST BE ENCLOSED IN SINGLE QUOTES */               
     ADDRESS SDSF "ISFACT H TOKEN('"TOKEN.IX"') PARM(NP P)"           
     LRC=RC                                                           
     CALL MSGRTN                                                     
     IF LRC<>0 THEN                                                   
       EXIT 20                                                       
   END                                                               
END                                                                   
RC=ISFCALLS('OFF')                                                   
EXIT                                                                 
     /* SUBROUTINE TO LIST ERROR MESSAGES */                         


Re: JES2 and purge by batch

PostPosted: Tue Sep 10, 2013 3:24 pm
by enrico-sorichetti
the SDSF manuals describe well what are the differences in authorization checking
when running in TSO batch and when running from a true TSO sessions

see here for a similar issue

http://ibmmainframes.com/about60769.html

Re: JES2 and purge by batch

PostPosted: Thu Sep 12, 2013 1:02 pm
by samb01
Hello,

the command to do it is :

$p jobq,q=ppu,days>10



But is it possible to do it by batch ?

Re: JES2 and purge by batch

PostPosted: Thu Sep 12, 2013 3:15 pm
by NicC
If that is an SDSF command then, Yes you can as SDSF has a Rexx interface and, as you know, rexx programs can be run in batch. If it is a system command then you can PROBABLy run it in batch using only an IEFBR14.

Re: JES2 and purge by batch

PostPosted: Thu Sep 12, 2013 7:41 pm
by dick scherrer
Hello,

Keep in mind that if you submit this in a batch job as a JES command it will execute as soon as the system sees it - not whan the job actually begins.

I believe you'd be safer interfacing with REXX as you'd have more control and could conceivably produce some kind of audit trail.