How to execute inline NATURAL code from JCL?

Hi folks, I have a very unusual requirement.

I have 3 sets of NAT code with me. These NAT code performs Adabas read, Adabas Update & Adabas Store. But these are not stored as NATURAL objects.

I want to execute these set of NATURAL statements from my JCL without calling any Natural program. How can i execute an inline NAT code from JCL or the NAT code in PDS?

Please help urgently!

Education, education, education !!!

If I understand your question correctly, you cannot do what you have proposed to do.

Natural is a compiler. You need to invoke the compiler in order to execute Natural statements (e.g a READ or UPDATE).

This is done via a Natural program.

I have no idea what you mean by “I have 3 sets of NAT code with me.” It sounds like you have a text file with some Natural statements. Such a text file is totally useless unless pasted into a Natural program.


If the code is in a dataset, it could be used if slightly modified… after the logon in batch mode, the EDT editor could be invoked, then all the code through END, then .E, then RUN.

Our purpose for that is when we need to dynamically build Natural code with another Natural program. I am not sure why this is important in Aman’s case, as he didn’t explain why his Natural code is not stored as Natural objects.

Special note to Natural Security admins: this is a powerful capability. Please be sure you only allow source to be RUN in production by trusted id’s in trusted locations. SOX violations may abound if not controlled.

Examples of Brian’s suggestion can be found in a previous post: