On the mainframe, we submit jobs by using the NATJRE function.
We have self-written software to migrate JCL to VBS.
What is the equivalence to NATRJE for Natural on Windows?
Do you have examples?
Thanks,
Dieter Storr
On the mainframe, we submit jobs by using the NATJRE function.
We have self-written software to migrate JCL to VBS.
What is the equivalence to NATRJE for Natural on Windows?
Do you have examples?
Thanks,
Dieter Storr
Hello Dieter,
maybe ‘winbatch’ can help you.
Use USR1052N for sending a command to the Operting system.
Call an own written winbatch.exe (which starts natural in background mode (Command is ‘RunHide’).
see more www.winbatch.com
hope it helps
Hi Dieter,
I would go for the standard “SHCMD” command
There are examples in the documentation
See: “Issuing Operating System Commands from within a Natural Program” like below…
This approach uses a different “paradigm” than NATRJE, because you can only issue one command and not a full JCL.
So usually you create a temporary .CMD file and then “submit” this either synchronous or asynchronous.
Finn
RESET rc (I4)
CALL ‘SHCMD’‘CMD.EXE /C DIR’
rc = RET( ‘SHCMD’ ) /* retrieve return code
IF rc <> 0 THEN /* in case of an error
DISPLAY “Error occurred during SHCMD” /* display an error message
Thank you for your examples and very helpful tips.
Very simplified, our program looks like this:
Read JCL or VBS from an Adabas file
if *machine-class ne ‘MAINFRAME’
perform process-script …
#JCL-MEMBER := line_of_code
*
compress '\cst87\cst87-w\batchjob\batchsubmit' #jcl-member ‘.vbs’
into #exe-file leaving no
*
compress 'CMD.EXE /C dir ’ #work-file into os-command
CALLNAT ‘USR1052N’ USR1052L
And here is some background info of our applications:
Our JCL is saved in one Adabas file and in a PDS dataset. We will need both because the Natural program can start on the mainframe and/or Windows.
A) First possible way to change JCL:
B) Second possible way to change JCL:
Any recommendations are very helpful.
By the way, Happy Holidays, Merry Chistmas, Happy Hannukah, etc.
Thank you so much.
Dieter Storr