Host array initialization

31 views
Skip to first unread message

Bernd Stoltefuss

unread,
Jun 12, 2015, 10:07:12 AM6/12/15
to legsta...@googlegroups.com
Hello Fady,

i have a probably rather uncommon(?) host interface which i have to generate data for with legstar.
The host interface is defined by a cobol copybook. No problem generating xsd and java classes for that :-)

But the host program makes an assumption which is not represented in the copybook. It wants all fields for which no value should be set to be represented as hex 00, regardless of the field type(probably it uses this concept to determine which fields are "empty" and should not be changed). This is kind of sick as legstar will normally produce a copybook conform default value (f.e. 000c for a packed-dec or 40 for a string) when the correspondig java-object field is not set(null).
Do you have any tip how to fullfill this strange(?) request and still use the legstar lib(v1) for xsd/java-converter generation and field conversions?

Thanks

 Bernd

Fady

unread,
Jun 17, 2015, 3:41:14 PM6/17/15
to legsta...@googlegroups.com, b.stol...@googlemail.com
Hello Bernd,

I am assuming you are trying to send data to the mainframe. At least for strings, you should be able to set the value to something like "0x0000000000" which sets the value to low values.

For packed decimals unfortunately there is no way to set the value to low values (as this would create an invalid packed decimal). What you could try though is to fake a REDEFINES for these with a String value.

Sorry that it does not seem there is a better solution right now.

Fady
Reply all
Reply to author
Forward
0 new messages