View previous topic :: View next topic
|
Author |
Message |
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1744 Location: Tirupur, India
|
|
|
|
Hi,
I am trying to submit a job at a particular time using JES2 $TA command.
Tried out the below command but the job is not being submitted at the specified time. Could you please let me know the correct syntax for the command,
Code: |
/$TA,T=04.00,'$VS,"S JOB,MBR=DFSORT"' |
requirement is to run the job "DFSORT" located in one of my PDS at 04:00 AM.
I allocated the source PDS to SYSPROC and placed the DFSORT member inside it. I am unable to see any error messages as well.
The manual says that S JOB is a jes command to start a job, but I am not sure how to specify the location of the job on the command itself. Please let me know your thoughts.
Thanks in advance, |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
I believe that the JCL needs to reside in one of the PROCLIBS defined to the JES subsystem. |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1744 Location: Tirupur, India
|
|
|
|
oh ok, thanks for clarifying the point, i got mixed up with PROCLIBS of JES and my SYSPROCS.
Regards, |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1744 Location: Tirupur, India
|
|
|
|
Hi,
Im stuck with another obstacle with JES 2 command structure,
I tried to couple the $TA with $A command, but facing issues with " and '
The $A command for releasing jobs,
works fine with a single quote but does not work with double quotes around jobname.
Code: |
/$TA,T=05.40,'COMMAND' |
works fine with single quotes and does not work with double quotes.
when trying to combine both of these there is a conflict between single quotes,
Code: |
$TA,T=05.40,'$A 'JOBNAME'' |
Please let me know how to correct this.
Thanks, |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1744 Location: Tirupur, India
|
|
|
|
Hi Peter, I referred to that link before posting, the link says
Quote: |
3. Modification of #2. Submit your job with "TYPRUN=HOLD". Then, use the "$TA" JES2 command to schedule a command to release your job at a specified time (the "$A" command). Of course, your job would then have to reload itself with the "TYPRUN=HOLD" enabled for the next runtime. |
so I am trying out that command. but stuck with the usage of " and '.
I was dropped on my head several times when I was kid, maybe thats why im unable to figure it out
Thanks, |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
Maybe the JES2 commands manual will take care of your head ache. |
|
Back to top |
|
|
nevilh
Active User
Joined: 01 Sep 2006 Posts: 262
|
|
|
|
A simple $TA,T=05.40,'$AJ(jobname)' should be enough |
|
Back to top |
|
|
nevilh
Active User
Joined: 01 Sep 2006 Posts: 262
|
|
|
|
A word of warning JES will issue the command once and then forget it. If you want the command to be issued daily you will have to set up the process to reinitialise every 24 hours and at every jes restart |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1744 Location: Tirupur, India
|
|
|
|
Thank you very much Nevil, your suggestion worked well.
Quote: |
A word of warning JES will issue the command once and then forget it. If you want the command to be issued daily you will have to set up the process to reinitialise every 24 hours and at every jes restart |
I will keep this in mind.
Thanks again, |
|
Back to top |
|
|
tatasteed
New User
Joined: 18 Sep 2007 Posts: 8 Location: Santiago de Chile
|
|
|
|
Hi...
How can I produce a log with the following information when a jcl is submitted:
-Proc's invoked by the JCL
-JCL name
-Userid
-System date.
I have been told that it can be possible using JES2 exit but that is far beyond my knowledge.
Thanks in advance! |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1744 Location: Tirupur, India
|
|
|
|
Hello,
If you are familiar with REXX, then this could be done with the below JCL & program,
Code: |
//JS010 EXEC PGM=IKJEFT1B
//SYSPRINT DD SYSOUT=*
//SYSTSPBD DD SYSOUT=Y
//SYSTSPRT DD SYSOUT=Y
//SYSEXEC DD DSN=WELLS.GREEN.DAY,DISP=SHR
//SYSTSIN DD *
%RAJNI
/* |
The PDS WELLS.GREEN.DAY should have a member called RAJNI with the below contents inside,
Code: |
/*REXX*/
NOW = DATE(); /*CURRENT DATE*/
ASCB = C2D(STORAGE(224,4))
ASSB = C2D(STORAGE(D2X(ASCB+336),4))
JSAB = C2D(STORAGE(D2X(ASSB+168),4))
JOBNAME = STORAGE(D2X(JSAB+28),8) /* JOBNAME */
JOBNUM = STORAGE(D2X(JSAB+20),8) /* JOB # */
USERID = STORAGE(D2X(JSAB+44),8) /* USERID */
PTR2PSA = 0
CVTPTR = STORAGE(D2X(PTR2PSA + 16),4)
CVTSMCA = STORAGE(D2X(C2D(CVTPTR)+197),3)
SMFID = STORAGE(D2X(C2D(CVTSMCA)+16),4) /* SYSID */
/*CRLF = X2C('0D0A') ASCII */
CRLF = X2C('0D25') /*EBCIDIC */
SAY 'JOBNAME IS ' JOBNAME
SAY 'JOBNUM IS ' JOBNUM
SAY 'USERID IS ' USERID
SAY 'SMFID IS ' SMFID
SAY 'DATE IS ' NOW
EXIT |
The JOBNAME and USERID will be present inside the variables shown above, you could write them to an external file with DISP=MOD using EXECIO commands and maintain a log.
Hope it helps.
It would be better if you could start a separate topic for this instead of posting it under a unrelated topic. |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1744 Location: Tirupur, India
|
|
Back to top |
|
|
tatasteed
New User
Joined: 18 Sep 2007 Posts: 8 Location: Santiago de Chile
|
|
|
|
Your code is amazing and simple.
This is part of the information required.
We also need to have all of the PROC's executed inside a JCL when submitted. I guess this information is also contained in the blocks:
ASCB
ASSB
JSAB
PTR2PSA,
That is something I will have to research, but that you have shed a light on.
If you consider this is worth a separate post, I will open a new thread.
Thanks and regards... |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1744 Location: Tirupur, India
|
|
|
|
Glad it was helpful
Quote: |
have all of the PROC's executed inside a JCL when submitted. |
Do you mean to say that you need the list of all the procs that are present inside the JCL thats being run?
Cheers, |
|
Back to top |
|
|
tatasteed
New User
Joined: 18 Sep 2007 Posts: 8 Location: Santiago de Chile
|
|
|
|
Yes, Sir!
And I did it!
I wrote a Rexx script activating SDSF which is able to identify jobname and jobid.
With that information reads SDSF and lokks for JESYSMSG.
Then it opens dataset and parses into variables until it finds message IEFC001I.... from then on... queue to write or say command is enough!
All of this in one day!
You certainly shed a light on this as I said.
Thanks! |
|
Back to top |
|
|
|