> Is there a JES2 command to submit a job from a PDS or PROCLIB, roughly
> analogous to TSO SUBMIT?

Charles,

You can use the SCHEDULE command to run the job at a particular time. Here
is a detailed explanation of the parms along with examples

https://www.ibm.com/support/knowledgecenter/SSLTBW_2.3.0/com.ibm.zos.v2r3.ieab600/iea3b6_schedule_examples_of_schedule_statements.htm

To make it run every day at the specified time, just add another step to
generate the SCHEDULE command for next day execution.

Something like this

//LASTSTEP EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTIN   DD DISP=SHR,DSN=Your.PDS(subjob)
//SORTOUT  DD SYSOUT=(*,INTRDR)
//SYSIN    DD *
  OPTION COPY
  INREC IFOUTLEN=80,
        IFTHEN=(WHEN=INIT,
             OVERLAY=(81:DATE1(/)+1)),
        IFTHEN=(WHEN=(01,22,CH,EQ,C'// SCHEDULE HOLDUNTL=('),
        BUILD=(C'// SCHEDULE HOLDUNTL=(''',
               C'17:00''',
               C',''',
               86,02,      $ MM
               88,01,      $ /
               89,02,      $ DD
               85,01,      $ /
               81,04,      $ YYYY
               C''')'))
/*



I had a sample member in my pds(subjob) and it has the following contents

//SCHEDJOB JOB (B004273,BIN#,BLDG#,DEPT#),&SYSUID,
//         MSGCLASS=H,MSGLEVEL=(1,1),CLASS=A,NOTIFY=&SYSUID
/*
// SCHEDULE HOLDUNTL=('17:00','11/18/2020')
/*
//STEP0100 EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSUT1   DD *
ABC
//SYSUT2   DD SYSOUT=*
//SYSIN    DD DUMMY
/*

To this we will add the last step as shown above. That last step will
change the SCHEDULE command to "Current date+1" as hold and it will submit
the job to INTRDR. So as soon this job ran the next day's job will be in
the INPUT queue waiting for it to be executed.

So you submit the job once and it will take care of submitting itself
everyday until you cancel


Further if you have any question please let me know

Thanks.
Kolusu
DFSORT Development
IBM Corporation


IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> wrote on
11/18/2020 04:00:59 PM:

> From: Charles Mills <charl...@mcn.org>
> To: IBM-MAIN@LISTSERV.UA.EDU
> Date: 11/18/2020 04:01 PM
> Subject: [EXTERNAL] Is there a JES2 command to submit a job?
> Sent by: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU>
>
> Is there a JES2 command to submit a job from a PDS or PROCLIB, roughly
> analogous to TSO SUBMIT?
>
> I want to run a predefined job, unmodified, once a day. (No, I don't have
a
> real scheduler.) I figured I could do something with $T
A,I=86400,'command'
> but I don't see what the command would be. It seems like an obvious thing
> for JES2 to be able to do.
>
> Do I use $VS,'S proc' and run it like a started task that just happens to
> end after a minute or so?
>
> I vaguely recall there is a way to submit a job (via TSO or whatever)
such
> that it gets held and then could be released with a JES2 command but also
> left in the input queue for another release? Am I on the right track?
Or ...
> ?
>
> Thanks. Sorry for the newbie question. I'm a newbie operator.
>
> Charles
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to