NATURAL Access to PREDICT via USR3005N

I am attempting get to to grips with XML and the interface to PREDICT using USR3005N

I have looked at the example programs in SYSEXT etc and copied the code and modified some to my requirements.

However I am having trouble creating a conceptual file as I need to provide an OWNER for the file.
I have attempted to code the XML but get the following error returned

Result returned from USR3005N

<Message number=‘2894’ text=‘DIC2894 AT LEAST ONE OWNER MUST
BE ADDED.’ type=‘Error’ New_object_ID=‘CM-CONCEPTUAL-FILE-3-C’ invalid-
attribute=‘OWNER’/>
2894
DIC2894 AT LEAST ONE OWNER MUST BE ADDED.
OWNER is invalid

This is the start of XML code I have put together (Preview seems to strip out all indentations)

0440 COMPRESS
0450 ‘’
0460 ‘’
0470 ‘’
0500 ‘<Object-type value=’‘FILE-C’’ OWNER=‘‘DBA’’/>’
0510 ‘’
0520 ‘’
0540 ‘<Attribute name=’‘ID’’ value=‘‘CM-CONCEPTUAL-FILE-3-C’’/>’
0570 ‘<Structure Name=’‘Abstract’‘> ’
0580 ‘<Attribute Name=’‘Abstract-line’’’
0590 ‘Value=’‘This file was’‘/>’
0600 ‘<Attribute Name=’‘Abstract-line’’ Value=‘‘added by’’ />’
0610 ‘<Attribute Name=’‘Abstract-line’’ Value=‘’’
0620 #LINE-WITHOUT-APOSTROPH ‘’‘/>’
0630 ‘<Attribute Name=’‘Abstract-line’’ Value=‘‘of’
0640 *PROGRAM ‘’’/>’
0650 ‘’
0660 ‘’
0670 ‘’
0680 ‘’

Can someone point out where I have gone wrong and/or point me at the documentation that will provide the answer, so I can understand whereI have gone wrong, as I have more work to do in this area.

I have studied the part on API USR3005N in the PREDICT Adminstration manual but still not sure what I have done wrong.

Thanks

Do you have an Owner in Predict called “DBA”?

I do have an Owner called DBA.

All the data I am attempting to load has been manually added through predict , except the file name, so I know the data is valid and will load.

After spending a whole day trying various options, I have reached the conclusion that the addition of the Owner is not a valid option for USR3005N.

I got the following error with one option
P Press F3 or F15 to Exit

  • Nr.: 1316 - Appl: DBATEST - Program: YPRDAUOB - Line: 3420

Index not within array structure.

.
.
The index specified for an array is not within the dimensions
defined for the array.

We are unable to find YPRDAUOB in any of our libraries and the problem is being reported to SAG.

However, I have got around the problem by removing the problem.

There is the option in PREDICT to make the addition of an Owner Optional. By moving my prototype code to another environment where the owner option is switched to optional, the original code I wrote now works, and I am able to add my conceptual file from the XML.

This still leaves me with a problem of how to add the Owner via a USR, as I need to automate the process from an external data source.

SAG documentation in this area goes only part of the way, as usual, a list of all attribute names available for the maintenace options would be a great help, along with examples.

I have been provided with a solution form SAG and it has been tested and I can confirm that it works correctly.

The original problem would seem to be a problem with my XML.

The code that I should have used is shown below, the new statements are in RED.

I have posted it here in case anyone else has a similar problem. If anyone wants any help with NATURAL to PREDICT via XMl - contact myself and I will attempt to provide it.

‘’
‘’
‘’
‘<Object-type value=’‘FILE-C’‘/>’
‘’
‘’
‘<Attribute name=’‘ID’’ value=‘‘CM-CONCEPTUAL-FILE-6-C’’/>’
‘<Structure Name=’‘OWNERS’‘>’
‘<Attribute name=’‘Owner’’ value=‘‘DBA’’/>’
‘’

‘<Structure Name=’‘Abstract’‘> ’
‘<Attribute Name=’‘Abstract-line’’’
‘Value=’‘This file was’‘/>’
‘<Attribute Name=’‘Abstract-line’’ Value=‘‘added by’’ />’
‘<Attribute Name=’‘Abstract-line’’ Value=‘’’
#LINE-WITHOUT-APOSTROPH ‘’‘/>’
‘<Attribute Name=’‘Abstract-line’’ Value=‘‘of’
*PROGRAM ‘’’/>’
‘’