Hi,
I just need to know how to submit a job through online screen in natural . Please find the details below :-
I am having a online screen containing 4 options e.g :-
1 ASSET MAPPING LIST
2 PRINT LBS-CORP-ACTION-DIARY
3 AWAIT REC/DEL BY BROK - F INT
4 AWAIT REC/DEL BY BROKER - FOP
so i have to include one more option e.g :-
1 ASSET MAPPING LIST
2 PRINT LBS-CORP-ACTION-DIARY
3 AWAIT REC/DEL BY BROK - F INT
4 AWAIT REC/DEL BY BROKER - FOP
5 Enquiry
then by entering that option a new map will open and that new map contain a field name as date E.g :-
Please input the Date of Selection:
Message Receive Date : 20100430 (YYYYMMDD)
By filling the date and pressing enter a job is submitted on backened and report is generated.
JOB SUCCESSFULLY SUBMITTED
Can anybody please help me on that ?
How to submit a job through online in natural ?
-
- Posts: 90
- Joined: Sun Mar 14, 2010 5:12 pm
- Skillset: Natural,Adabas,jcl
- Referer: friend
- dick scherrer
- Global moderator
- Posts: 6268
- Joined: Sat Jun 09, 2007 8:58 am
Re: How to submit a job through online in natural ?
Hello,
As this is already working, suggest you talk with the adabas/natural support/admin for direction on how this is to be done on your system.
Your process should be done the same way - which we are not familiar with.
As this is already working, suggest you talk with the adabas/natural support/admin for direction on how this is to be done on your system.
Your process should be done the same way - which we are not familiar with.
Hope this helps,
d.sch.
d.sch.
- RGZbrog
- Posts: 101
- Joined: Mon Nov 23, 2009 1:34 pm
- Skillset: Natural, Adabas, Predict, Natural Security, Construct, EntireX, SPoD, NaturalONE
- Referer: SAG Developer Forum
- Location: California, USA
- Contact:
Re: How to submit a job through online in natural ?
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.
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.
Code: Select all
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