What product/components do you use and which version/fix level?
Running Natural 8.2.7
Are you using a free trial or a product with a customer license?
Licensed
What are trying to achieve? Please describe in detail.
We have a SCM that integrates with Natural 8.2.7. It will take an existing Natural application and load it into the SCM. From then on users can use the SCM to perform all maintenance on the application. What they cannot do is create a new object from the SCM. The integration uses direct commands to invoke Natural. Edit, browse, load and unload work just fine. Is there a way to call the create function? I noticed that if I use the Natural interface to create a new object but do not enter any statements in it, it is not saved.
Do you get any error messages? Please provide a full error message screenshot and log file.
I wrote a comment, four asterisks, line to a file and then attempted to load the file into Natural using direct commands.
LOAD SALLYR70 LIB TUTORIAL OBJTYPE N WHERE REPLACE
Here’s the result.
Invalid work file version in header record.
Work file record: ***
Error detected in OLNLOAD.
Page 2
SYSOBJH: Error occurred during direct command processing!
Error: 5002
Invalid work file version in header record.
Work file record: ***
Error detected in OLNLOAD.
*H**ENAT8207202204251310539MVS/ESA 4AEMB 08.2
*C** DBALIB NEWSRC F S N 0000
*D01NAT8207F DBALIB NEWSRC VSTA003 VSTA003 0851 R
*D02 2022042513084022022042513084020000000045
*D03MVS/ESA CICS NATD
*D04 IBM01140
*S*** COMMENT LINE FOR NEW SOURCE CODE
*S**END
*E
I don’t have the unload format. I’m creating a new object. I’m thinking I must create a file with the expected format. I can reverse engineer this but that can lead to issues if the format changes or my understanding is inaccurate. I was hoping to see if someone has already figured out how to create a new object using direct commands. I would supply a comment line and the rest would be built by the commands.
Brian:
What format is the output you showed for the SYSOBJH input file? I get a different format when I unload an object. I don’t get D01, and so on, headers. Are the leading asterisks binary values?
My colleague and I just came to that idea as well. I’ve not been able to load an object with a new name. Here’s the job output:
NEXT LOGON TUTORIAL
Logon accepted to library TUTORIAL.
NEXT SYSOBJH
Input Command Data or ‘.’ to exit …
Input Command Data or ‘.’ to exit …
Input Command Data or ‘.’ to exit …
DATA LOAD COMMENT LIB TUTORIAL WITH NAME COMMENT NEWN FRED %
DATA WHERE REPLACE
09:44:19 ***** Natural Object Handler ***** 2022-04-26
***** Natural Object Handler *****
***** Natural Object Handler *****
User EFHWFF0D Direct Command Processing Library TUTORIAL
EFHWFF0D Direct Command Processing TUTORIAL
EFHWFF0D Direct Command Processing TUTORIAL
Report Text Member 20944190
20944190
20944190
*** Load Objects ***
Processing Load File created on 2022-04-26 at 08:16
Status Library Object Name Type
Replaced TUTORIAL FRED Progra
Function completed successfully.
Page 2
SYSOBJH direct command processing:
When I check the Natural environment, FRED is not there.
I am wondering if your utility default FUSER is not what you expect, and you created “FRED” in some other FUSER than you expect? Possibly changing the nucleus module or overriding this will fix that part.
I played around with Wolfgang’s idea and it appears to be doable. There is some internal plumbing I need to figure out. Many thanks to Brian and Wolfgang for their insights.