# NATRJE for Windows?

**URL:** <https://techcommunity.softwareag.com/t/natrje-for-windows/79823>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-on-Linux, Natural-on-Windows-Unix\
**Created:** [December 20, 2008, 1:04am UTC](https://techcommunity.softwareag.com/t/natrje-for-windows/79823 "2008-12-20T01:04:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dieter\_W\_Storr](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/dieter_w_storr/32/91_2.png) [@Dieter\_W\_Storr](https://techcommunity.softwareag.com/u/Dieter_W_Storr)\
**Post date:** [December 20, 2008, 1:04am UTC](https://techcommunity.softwareag.com/t/natrje-for-windows/79823/1 "2008-12-20T01:04:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![VRitter](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/vritter/32/159_2.png) [@VRitter](https://techcommunity.softwareag.com/u/VRitter)\
**Post date:** [December 22, 2008, 1:58pm UTC](https://techcommunity.softwareag.com/t/natrje-for-windows/79823/2 "2008-12-22T13:58:19Z")

</div>

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](http://www.winbatch.com)

hope it helps

😃

---

<div class="post-metadata">

**Author:** ![Finn\_the\_Dane1](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/finn_the_dane1/32/132_2.png) [@Finn\_the\_Dane1](https://techcommunity.softwareag.com/u/Finn_the_Dane1)\
**Post date:** [December 22, 2008, 2:15pm UTC](https://techcommunity.softwareag.com/t/natrje-for-windows/79823/3 "2008-12-22T14:15:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Dieter\_W\_Storr](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/dieter_w_storr/32/91_2.png) [@Dieter\_W\_Storr](https://techcommunity.softwareag.com/u/Dieter_W_Storr)\
**Post date:** [December 24, 2008, 7:44am UTC](https://techcommunity.softwareag.com/t/natrje-for-windows/79823/4 "2008-12-24T07:44:43Z")

</div>

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:

- Read JCL from the Adabas file and save it as a text file
- Translate the JCL into VB script by using a software
- Problem with the software: it doesn’t migrate OS  
Sort statements.
- Save the migrated code (JCL to VBS) into an Adabas file

B) Second possible way to change JCL:

- Same as A but save it as .vbs on windows

Any recommendations are very helpful.

By the way, Happy Holidays, Merry Chistmas, Happy Hannukah, etc.

Thank you so much.  
Dieter Storr

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 2:51pm UTC](https://techcommunity.softwareag.com/t/natrje-for-windows/79823/5 "2021-04-02T14:51:18Z")

</div>


