mapping from xml to cobol field

737 views Asked by At

I need to pass LOW-VALUES(am not very sure what kind would that be), as default for a copybook field, to the backend team. I use a wtx transform which converts xml to cobol

15 :abc       PIC X(15).

From the mainframe team I got this as sample for the field.

X'000000000000000000000000000000'

However when I use this rule, it fails because the number of characters is above 15. How can I pass the LOW-VALUES?

my rule map for the above cobol field

="X'000000000000000000000000000000'"

error meesage

Map:    Output: abc Field:123 Group:outputcbl
    Size of input item is greater than size of output item.
2

There are 2 answers

0
NealB On BEST ANSWER

LOW-VALUE in COBOL is a figurative constant. The value of this constant is the character having the lowest ordinal position in the collating sequence used.

Assuming the character set in use is EBCDIC (as indicated in one of your comments to another answer) and the collating sequence has not been overridden (probably a good assumption), a LOW-VALUE corresponds to binary zeros.

A PIC X(15) data item in COBOL occupies 15 bytes. Use a transformation that translates this field into 15 bytes of binary zeros. The COBOL application will see this a LOW-VALUE.

Note: The value your 'Mainframe team' gave you is a hexadecimal string representation for 15 bytes of binary zeros.

2
TrueDub On

Low-values is simply all Hex zeros, so if you resize your rule map to contain 15 hex digits, all zero, you should be fine.