You prepare the JCL statements in an array and pass them to NATRJE, which submits them to the internal reader.
You'll find code samples and an explanation of NATRJE in the documentation, under Utilities:
http://documentation.softwareag.com/natural/nat426mf2/utis/rje.htm#rje Here's a sample program that demonstrates how to define the JCL in an array, substitute tokens (you'll need one for your date parameter), and submit the JCL. It also demonstrates how you can submit prepared JCL from a PDS.
DEFINE DATA LOCAL
1 #JM (I4) CONST <10>
1 #JCL (A80/#JM) INIT
<'//SPAWNJOB JOB (acct1,acct2,info),$USERID$,'
,'// MSGCLASS=Z,NOTIFY=&SYSUID,'
,'// USER=$USERID$,PASSWORD=$PSWD$'
,'//*'
,'//TSO EXEC PGM=IKJEFT01'
,'//SYSTSPRT DD SYSOUT=*'
,'//SYSTSIN DD *'
,'SUB "NAT.JCL($MEMBER$)"'
,'/*'
,'//'
>
1 #USERID (A8) INIT <*USER>
1 #PSWD (A8)
1 #PSW2 (A8)
1 #MEMBER (A8)
1 #RJE
2 #CNT (B4)
2 #END (A1) INIT <'L'>
2 #RRC (B4)
1 #MSG (A70)
*
1 #RC (I2)
1 #I (I4)
1 #B (I4)
END-DEFINE
*
DEFINE WINDOW MFSEC
SIZE 7*40
BASE 10/10
TITLE 'Mainframe Security'
CONTROL SCREEN
FRAMED ON
SET KEY PF3
*
REPEAT
INPUT WITH TEXT #MSG (CD=YE)
'ENter JCL member name:' #MEMBER (AD=MDLT'_')
IF *PF-KEY = 'PF3'
OR SUBSTR (#MEMBER, 1, 1) = '.'
THEN
STOP
END-IF
/* Submit JCL
RESET INITIAL #JCL (*)
IF #PSWD = ' '
THEN
INPUT WINDOW='MFSEC'
/ 'Enter Mainframe password:' #PSWD (AD=ANLT)
// ' Re-enter password:' #PSW2 (AD=ANLT)
IF #PSWD = ' '
THEN
REINPUT 'Password required for batch job submission'
MARK *#PSWD
END-IF
IF #PSWD <> #PSW2
THEN
REINPUT 'Passwords do not match - please try again'
MARK *#PSWD
END-IF
SET WINDOW OFF
END-IF
EXAMINE #JCL (*) FOR '$USERID$' REPLACE #USERID
EXAMINE #JCL (*) FOR '$PSWD$' REPLACE #PSWD
EXAMINE #JCL (*) FOR '$MEMBER$' REPLACE #MEMBER
ASSIGN #RJE.#CNT = #JM
ASSIGN #RJE.#END = 'L'
CALL 'NATRJE' #JCL (*)
#RJE.#CNT
#RJE.#END
#RJE.#RRC
IF #RJE.#RRC = 0
THEN
ASSIGN #MSG = 'Job submitted'
ELSE
ASSIGN #MSG = 'Job submission failed'
END-IF
END-REPEAT
END