Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Release a HELD job using JES command in batch.
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1445
Location: Azeroth

PostPosted: Thu May 05, 2011 5:43 pm    Post subject: Release a HELD job using JES command in batch.
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: 1703
Location: Australia

PostPosted: Fri May 06, 2011 6:01 am    Post subject:
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: 1445
Location: Azeroth

PostPosted: Fri May 06, 2011 11:33 am    Post subject:
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: 258

PostPosted: Fri May 06, 2011 2:17 pm    Post subject:
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: 1445
Location: Azeroth

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

Hello Nevil,

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

PostPosted: Fri May 06, 2011 2:38 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Fri May 06, 2011 2:41 pm    Post subject: Reply to: Release a HELD job using JES command in batch.
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: 1445
Location: Azeroth

PostPosted: Fri May 06, 2011 2:47 pm    Post subject:
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: 258

PostPosted: Fri May 06, 2011 2:54 pm    Post subject:
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: 1445
Location: Azeroth

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

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

Active User


Joined: 01 Sep 2006
Posts: 258

PostPosted: Fri May 06, 2011 3:22 pm    Post subject:
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: 1445
Location: Azeroth

PostPosted: Fri May 06, 2011 3:38 pm    Post subject:
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: 258

PostPosted: Fri May 06, 2011 3:56 pm    Post subject:
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: 2422
Location: Netherlands, Amstelveen

PostPosted: Fri May 06, 2011 4:02 pm    Post subject:
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: 258

PostPosted: Fri May 06, 2011 5:39 pm    Post subject:
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: 1445
Location: Azeroth

PostPosted: Fri May 06, 2011 5:52 pm    Post subject:
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: 258

PostPosted: Fri May 06, 2011 9:17 pm    Post subject:
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: 1445
Location: Azeroth

PostPosted: Mon May 16, 2011 11:30 am    Post subject:
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: 258

PostPosted: Mon May 16, 2011 2:47 pm    Post subject:
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: 1445
Location: Azeroth

PostPosted: Mon May 16, 2011 4:08 pm    Post subject:
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
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How does a called pgm know if its cal... Graeme Westerman COBOL Programming 4 Tue Nov 29, 2016 9:25 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
This topic is locked: you cannot edit posts or make replies. MIPS reduction for Batch job Virendra Shambharkar All Other Mainframe Topics 8 Mon Nov 07, 2016 4:02 pm
No new posts SDSF Command Avtrix CLIST & REXX 4 Fri Sep 30, 2016 11:13 am
No new posts How to find a CICS resource used in C... Arunkumar Chandrasekaran CICS 8 Thu Sep 29, 2016 1:45 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us