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

Release a HELD job using JES command in batch.


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

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Thu May 05, 2011 5:43 pm
Reply with quote

Hello,
I am trying to release a HELD job using JES command in batch.

When I issue the release command on the console the command /$AJ(JOBNAME) works releasing the job
But when I try the same command on batch, it does not work with no error messages on the JCL,
Attempt 1: Not working
Code:
//JOBCARD
//         COMMAND '$AJ(JOBNAME)'
//STEP1   EXEC PGM=IEFBR14

Only related message on the log was
Code:
05.47.11 JOB05016  IEFC165I // $AJ(JOBNAME)  630
05.47.11 JOB05016  $AJ(JOBNAME)


the below REXX works releasing the job in interactive mode,
Code:
/*REXX*/
ADDRESS TSO                                       
  'ALLOC FI(INTRDR) WRITER(INTRDR) SYSOUT(Y) REUSE'
  LIST.1 = '/*$AJ(JOBNAME)'                       
  LIST.0 = 1                                       
  'EXECIO * DISKW INTRDR (FINIS STEM LIST.'       
  'FREE FI(INTRDR)'                               
EXIT       


Attempt 2: Not working
But when the above REXX is run in batch with IKJEFT1B it does not release the job.

Attempt3: Not working

The below JCL also does not work

Code:
//SUBMIT   EXEC PGM=ICEGENER   
//SYSPRINT DD DUMMY             
//SYSIN    DD DUMMY             
//SYSUT1   DD DATA,DLM='$$'     
/*$AJ(JOBNAME)                 
$$                             
//SYSUT2   DD SYSOUT=(A,INTRDR)


I am new to JES commands and have not worked with them much, So please let me know what could be the reason for the issue.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Fri May 06, 2011 6:01 am
Reply with quote

Hi,

this works for me
Code:
//SDSF01  EXEC PGM=IKJEFT01               
//SYSPRINT DD SYSOUT=*                   
//SYSTSPRT DD SYSOUT=*                   
//ISFOUT   DD SYSOUT=*                   
//SYSTSIN  DD  *                         
  SDSF                                   
//ISFIN    DD  *                         
/$AJ(JOBNAME)                             


Gerry
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Fri May 06, 2011 11:33 am
Reply with quote

Hello Gerry,

Many thanks for the job, I tried it out and the job completed with RC=00.
But the job did not get released. I got the below message on joblog,

Code:
HQX7760 ----------------- 
SDSF PRIMARY OPTION MENU     
NOT AUTHORIZED FOR CMD
COMMAND INPUT ===>
/$AJ(JOBNAME)                             
SCROLL ===> PAGE
                                                                               
DA    Active users                                                             
I     Input queue                                                             
O     Output queue                                                             
H     Held output queue                                                       
ST    Status of jobs                                                           
                                                                               
SE    Scheduling environments                                                 
                                                                               
END   Exit SDSF                                                                           


"NOT AUTHORIZED FOR CMD"
Looks like somehow our site has restricted people from issuing JES commands in batch. I have access to issue this command in interactive mode from SDSF, but not with a batch job. icon_confused.gif

Regards,
Back to top
View user's profile Send private message
nevilh

Active User


Joined: 01 Sep 2006
Posts: 262

PostPosted: Fri May 06, 2011 2:17 pm
Reply with quote

Issue a $djobclass(%),long command where % is equal to the jobclass in which the batch job will run and if in the output you see the parameter command(ignore) your sysprogs have disallowed the command for this jobclass
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Fri May 06, 2011 2:30 pm
Reply with quote

Hello Nevil,

The response was,
Code:
$HASP837 JOBCLASS(S)                                           
JOBCLASS(S)         ACCT=NO,AUTH=(ALL),BLP=NO,         
                 COMMAND=DISPLAY,COPY=NO,           
               DUPL_JOB=DELAY,HOLD=NO,IEFUJP=YES,
                 IEFUSO=YES,JESLOG=(NOSPIN),       
                   JOURNAL=YES,LOG=YES,MODE=JES,     
                 MSGLEVEL=(1,1),OUTDISP=(,),       
                  OUTPUT=YES,PERFORM=000,PGMRNAME=NO,
                 PROCLIB=00,QAFF=(ANY),QHELD=NO,   
                    RESTART=NO,REGION=0000M,SCAN=NO,   
                  SCHENV=,SWA=BELOW,TIME=(001440,00),
               TYPE26=YES,TYPE6=YES,XBM=,         
                  XEQCOUNT=(MAXIMUM=*,CURRENT=0),   
                   XEQMEMBER(ACSD)=(MAXIMUM=*,       
               CURRENT=0)                         


I think COMMAND says DISPLAY, Could you please let me know if this would help in diagnosing the problem?

Thank you,
Back to top
View user's profile Send private message
nevilh

Active User


Joined: 01 Sep 2006
Posts: 262

PostPosted: Fri May 06, 2011 2:38 pm
Reply with quote

With command=display the command should work fine(you are authorised to issue command in batch) having read you previous post again it looks like you are using a different profile when you invoke sdsf in batch.Try the following

// VALID JOB CARD
/*$VS,'$aj(jobname)'
//S1 EXEC PGM=IEFBR14
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri May 06, 2011 2:41 pm
Reply with quote

Quote:
Could you please let me know if this would help in diagnosing the problem?
by showing that for the job class you are using You are not allowed to issue commands
but really there is nothing to diagnose...
You have just to realize that, if You have the need to do, You should contact Your support who will be glad to provide You the proper authorizations to use a job class where You are allowed to issue commands icon_cool.gif
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Fri May 06, 2011 2:47 pm
Reply with quote

Hello Nevil, Thanks for the swift response,

Code:
/*$VS,'$aj(jobname)'
//S1 EXEC PGM=IEFBR14


This too is not working(the held job is not released), The job ran fine with messages referencing only IEFBR14.

Quote:
looks like you are using a different profile when you invoke sdsf in batch.

Is there anyway that I can pass my userid and password to JES so that it recognises my ID as authorised to issue JES commands.

@Enrico,
I guess thats the right way forward.. I would request assitance from systemsupport guys.

Regards,
Back to top
View user's profile Send private message
nevilh

Active User


Joined: 01 Sep 2006
Posts: 262

PostPosted: Fri May 06, 2011 2:54 pm
Reply with quote

Can you create a new member with ISPF edit and just insert one line
/*$VS,'$aj(jobname)'

and then submit the member . Depending on how TSO is customised this may or may not work
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Fri May 06, 2011 3:01 pm
Reply with quote

Still no joy ):
Back to top
View user's profile Send private message
nevilh

Active User


Joined: 01 Sep 2006
Posts: 262

PostPosted: Fri May 06, 2011 3:22 pm
Reply with quote

Last attempt. Go into sdsf in ispf and issue the command WHO
This will show you various bits of information including GRPINDEX=,GRPNAME=
Then submit your batch job and issie the WHO command in SDSF batch. If a different GRPINDEX and GRPNAME are shown, then in all likelihood your sysprogs have stopped you issueing commands using SDSF batch and we will have to find another route
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Fri May 06, 2011 3:38 pm
Reply with quote

Hello Nevil,
Below are the results of the new attempt,

Interactive mode: who command
Code:
USERID=USERID,PROC=SYSUSER,
TERMINAL=VDACU381,GRPINDEX=1,GRPNAME=ISFSPROG,   
MVS=z/OS 01.11.00,JES=z/OS1.11,SDSF=HQX7760,
ISPF=6.1,RMF/DA=NOTACC,SERVER=YES,
SERVERNAME=SDSF,JESNAME=JES2,
MEMBER=LPAR,JESTYPE=JES2,SYSNAME=LPAR,           
SYSPLEX=DGRPPLEX,COMM=NOTAVAIL     


Batch mode: who command
Code:
USERID=USERID,PROC=BATCH,
TERMINAL=BATCH,GRPINDEX=3,GRPNAME=ISFUSER,
MVS=z/OS 01.11.00,JES=z/OS1.11,SDSF=HQX7760,
ISPF=N/A,
RMF/DA=NOTACC,SERVER=YES,SERVERNAME=SDSF,
JESNAME=JES2,MEMBER=LPAR,JESTYPE=JES2,
SYSNAME=LPAR,SYSPLEX=DGRPPLEX,COMM=NOTAVAIL


Thanks again,
Back to top
View user's profile Send private message
nevilh

Active User


Joined: 01 Sep 2006
Posts: 262

PostPosted: Fri May 06, 2011 3:56 pm
Reply with quote

Ok the following assumes that your sysprogs have used the default values for the GRPNAMEs that they have used(there is a good chance they have done this as they have used the default grpnames) . When you go into SDSF from ISPF you are assigned a group ISFSPROG this is the default name of the sysprogs group and by default you are allowed to issue commands. When you go into sdsf using batch you are assigned group ISFUSER (the lowest of the low) and by default commands are not allowed. So I do not think there is a way to issue the command using SDSF batch.
However from your jes command we can see that class S has the setting

COMMAND=DISPLAY this means that jes should display the command and then execute it . So theoretically you are authorised to issue the command. All we have to do now is work out why jes is not executing the command, or work out why the command is not being passed to jes. Let me think about this I will try and get back to you.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Fri May 06, 2011 4:02 pm
Reply with quote

$AJ

Authority Required
This command requires job authority. The description of the $T RDRnn command
explains how to ensure the proper MVS system command group authority is
assigned.
This command requires update security access authority. For a description of
assigning command input authority, see OS/390 JES2 Initialization and Tuning Guide
Back to top
View user's profile Send private message
nevilh

Active User


Joined: 01 Sep 2006
Posts: 262

PostPosted: Fri May 06, 2011 5:39 pm
Reply with quote

Quote:
Authority Required
This command requires job authority. The description of the $T RDRnn command
explains how to ensure the proper MVS system command group authority is
assigned.

Agreed .... I was going to go into a long discourse here about SDSF and RACF before remembering that SDSF uses the console interface to communicate with the system not the intrdr interface .


Vasanth could you issue a $DINTRDR command and see what they have defined
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Fri May 06, 2011 5:52 pm
Reply with quote

Nevil,
I really appreciate your thoughts and efforts into this,
Here is the response to $DINTRDR in interactive mode,

Code:
RESPONSE=LPAR                                                   
 $HASP838 INTRDR                                               
 $HASP838 INTRDR  AUTH=(DEVICE=NO,JOB=YES,SYSTEM=YES),BATCH=YES,
 $HASP838         CLASS=A,HOLD=NO,HONORLIM=NO,PRTYINC=0,       
 $HASP838         PRTYLIM=15,SYSAFF=(ANY),TRACE=NO   


Regards,
Back to top
View user's profile Send private message
nevilh

Active User


Joined: 01 Sep 2006
Posts: 262

PostPosted: Fri May 06, 2011 9:17 pm
Reply with quote

I went back to your original post and read it again. you posted this
Quote:
05.47.11 JOB05016 IEFC165I // $AJ(JOBNAME) 630
05.47.11 JOB05016 $AJ(JOBNAME


After seeing message IEFC165I do you see a message IEFC166D ?
If yes does the automation software reply N to this message ?
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Mon May 16, 2011 11:30 am
Reply with quote

Hello,
Apologies for the delayed response, I have'nt been keeping good health lately icon_oak.gif

There were no IEFC166D messages after IEFC165I.
Also there were no logs of a request to respond for yes or no.

Regards,
Back to top
View user's profile Send private message
nevilh

Active User


Joined: 01 Sep 2006
Posts: 262

PostPosted: Mon May 16, 2011 2:47 pm
Reply with quote

Hope you are feeling better. Yet another question, is the job you are trying to release the job you are submitting ?
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Mon May 16, 2011 4:08 pm
Reply with quote

Thank you, im recovering well,

Quote:
is the job you are trying to release the job you are submitting ?


They are 2 different jobs, I ran a DFSORT copy job with TYPRUN=HOLD and then submitting the release job which has the JES commands + an IEFBR14 step.

Regards,
Back to top
View user's profile Send private message
nevilh

Active User


Joined: 01 Sep 2006
Posts: 262

PostPosted: Mon May 16, 2011 4:29 pm
Reply with quote

Is the job name unique ? if not instead of releasing the job name release the job number eg $aj1234. If the jobname is not unique jes will not release the job
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Mon May 16, 2011 4:37 pm
Reply with quote

Quote:
Is the job name unique ?

Yes the job name is unique,only one such job with that particular jobname exists on entire spool.
I had this problem of duplicate jobnames when I was trying the release job command in foreground mode(via ISPF-->SDSF). So made sure that it did not occur in batch.

Regards,
Back to top
View user's profile Send private message
nevilh

Active User


Joined: 01 Sep 2006
Posts: 262

PostPosted: Tue May 17, 2011 1:44 pm
Reply with quote

I ran some tests on a z/OS 1.11 and z/OS 1.12 system. If I disable the ability to issue commands in jes the batch job runs correctly but I get no IEFC165I message. If I enable the ability to issue commands in Jes but remove my RACF authorisation btach job runs ok I get message IEFC165I followed by the command I wish to execute and then a RACF error message. If I then give myself the correct Racf authorisation , I get message IEFC165I followed by the command I wish to execute and the batch job works correctly. According to the manuals if you receive IEFC165I followed by the command unless there is a request for a reply from the operator the command will be executed.
As you are seeing
[quote]05.47.11 JOB05016 IEFC165I // $AJ(JOBNAME) 630
05.47.11 JOB05016 $AJ(JOBNAME)
Quote:
I assume the command is being passed to the system for execution.
After this are you seeing any HASP messages before you see the $HASP373 job started message. Lastly I assume you are looking in the actual SYSLOG dataset for the messages and not just in the joblog, as the SYSLOG will contain all messages (unless your site is using filtering to reduce the message volume) not just a subset of the messages
Back to top
View user's profile Send private message
nevilh

Active User


Joined: 01 Sep 2006
Posts: 262

PostPosted: Tue May 17, 2011 2:24 pm
Reply with quote

sorry for the incorrect formatting of the previous post
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Tue May 17, 2011 3:53 pm
Reply with quote

Hello,

Below is the output of the job, there were no HASP messages before the HASP373 message,
Code:

                   J E S 2  J O B  L O G  --  S Y S T E M  L P A R  --  N O D E
                                                                               
05.16.16 JOB01227 ---- TUESDAY,   17 MAY 2011 ----                             
05.16.16 JOB01227  IRR010I  USERID USERID  IS ASSIGNED TO THIS JOB.           
05.16.16 JOB01227  IEFC165I // $AJ(TESTER1)  253                               
05.16.16 JOB01227  $AJ(TESTER1)                                                 
05.16.16 JOB01227  ICH70001I USERID  LAST ACCESS AT 05:15:32 ON TUESDAY, MAY 17
05.16.16 JOB01227  $HASP373 USERIDJ STARTED - INIT 26   - CLASS S - SYS LPAR   
05.16.16 JOB01227  IEF403I USERIDJ - STARTED - TIME=05.16.16                   
05.16.16 JOB01227  -                                         --TIMINGS (MINS.)--
05.16.16 JOB01227  -JOBNAME  STEPNAME PROCSTEP    RC   EXCP    TCB    SRB  CLOCK
05.16.16 JOB01227  -USERIDJ STEP1                00      7    .00    .00     .0
05.16.16 JOB01227  IEF404I USERIDJ - ENDED - TIME=05.16.16                     
05.16.16 JOB01227  -USERIDJ ENDED.  NAME-0001 TSG COMMAND     TOTAL TCB CPU TIM
05.16.16 JOB01227  $HASP395 USERIDJ ENDED                                     
------ JES2 JOB STATISTICS ------                                               
  17 MAY 2011 JOB EXECUTION DATE                                               
            5 CARDS READ                                                       
           33 SYSOUT PRINT RECORDS                                             
            0 SYSOUT PUNCH RECORDS                                             
            2 SYSOUT SPOOL KBYTES                                               
         0.00 MINUTES EXECUTION TIME                                           
        1 //JOBCARD
        2 //         COMMAND '$AJ(TESTER1)'                                     
        3 //STEP1   EXEC PGM=IEFBR14                                           
ICH70001I USERID  LAST ACCESS AT 05:15:32 ON TUESDAY, MAY 17, 2011             
IEF142I USERIDJ STEP1 - STEP WAS EXECUTED - COND CODE 0000                     
IEF373I STEP/STEP1   /START 2011137.0516                                       
IEF374I STEP/STEP1   /STOP  2011137.0516 CPU    0MIN 00.00SEC SRB    0MIN 00.00S
IEF375I  JOB/USERIDJ/START 2011137.0516                                       
IEF376I  JOB/USERIDJ/STOP  2011137.0516 CPU    0MIN 00.00SEC SRB    0MIN 00.00S


I am aware of only the ULOG on SDSF, could you please let me know how to check out SYSLOG?

Regards,
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 Goto page 1, 2  Next

 


Similar Topics
Topic Forum Replies
No new posts RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts Routing command Address SDSF to other... TSO/ISPF 2
No new posts DTL - how to define key with stacked ... TSO/ISPF 3
No new posts How to get a stack trace on a looping... ABENDS & Debugging 5
No new posts LTJ command CA Products 4
Search our Forums:

Back to Top