JES2 and purge by batch



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

Re: JES2 and purge by batch

Postby dick scherrer » Mon Sep 09, 2013 9:25 pm

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

Re: JES2 and purge by batch

Postby Akatsukami » Tue Sep 10, 2013 12:02 am

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.
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: JES2 and purge by batch

Postby samb01 » Tue Sep 10, 2013 12:37 pm

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.
samb01
 
Posts: 431
Joined: Mon Nov 16, 2009 7:24 pm
Has thanked: 1 time
Been thanked: 0 time

Re: JES2 and purge by batch

Postby samb01 » Tue Sep 10, 2013 1:55 pm

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 */                         

samb01
 
Posts: 431
Joined: Mon Nov 16, 2009 7:24 pm
Has thanked: 1 time
Been thanked: 0 time

Re: JES2 and purge by batch

Postby enrico-sorichetti » Tue Sep 10, 2013 3:24 pm

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
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3006
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 165 times

Re: JES2 and purge by batch

Postby samb01 » Thu Sep 12, 2013 1:02 pm

Hello,

the command to do it is :

$p jobq,q=ppu,days>10



But is it possible to do it by batch ?
samb01
 
Posts: 431
Joined: Mon Nov 16, 2009 7:24 pm
Has thanked: 1 time
Been thanked: 0 time

Re: JES2 and purge by batch

Postby NicC » Thu Sep 12, 2013 3:15 pm

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.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: JES2 and purge by batch

Postby dick scherrer » Thu Sep 12, 2013 7:41 pm

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

Previous

Return to JCL

 


  • Related topics
    Replies
    Views
    Last post