View previous topic :: View next topic
|
Author |
Message |
Mike-H
New User
Joined: 07 Jan 2007 Posts: 2 Location: Maryland
|
|
|
|
I am using Enterprise COBOL for z/OS 3.4.0. Upon executing the simplest XML GENERATE commands, I am getting values in the special register XML-CODE completely above the range indicated in the manuals. Manuals indicate 3 digit values such as 400-403, 410-411, and 600-699 as errors occurring when the command is not successful.
I am receiving values such as +1006168. These values change depending upon the number and size of the fields in the group data item being converted.
Here is my code.
01 FAMILY.
05 FATHER PIC X(1) VALUE 'F'.
05 MOTHER PIC X(1) VALUE 'M'.
01 WS-CODE PIC 9(09) VALUE ZEROES.
01 WS-CODE-SIGN PIC S9(09) VALUE ZEROES.
01 WS-XML-COUNT PIC 9(09) VALUE ZEROES.
01 WS-XML-BUILD PIC X(1000) VALUE SPACES.
XML GENERATE
WS-XML-BUILD FROM FAMILY
COUNT IN WS-XML-COUNT
ON EXCEPTION
DISPLAY 'COUNT ' WS-XML-COUNT
MOVE XML-CODE TO WS-CODE
MOVE XML-CODE TO WS-CODE-SIGN
DISPLAY 'SOMETHING IS WRONG ' WS-CODE
DISPLAY 'SOMETHING IS WRONG ' WS-CODE-SIGN
GO TO A000-BAIL
END-XML. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Try removing these 2 lines from your definitions:
Code: |
01 WS-CODE PIC 9(09) VALUE ZEROES.
01 WS-CODE-SIGN PIC S9(09) VALUE ZEROES. |
as well as removing these:
Code: |
MOVE XML-CODE TO WS-CODE
MOVE XML-CODE TO WS-CODE-SIGN
DISPLAY 'SOMETHING IS WRONG ' WS-CODE
DISPLAY 'SOMETHING IS WRONG ' WS-CODE-SIGN
|
If i recall (i'm away for a few days and don't have most of my "stuff" available), XML-CODE is a special register. Try just displaying it.
I was able to find this example and maybe it will help. . .
Code: |
XML GENERATE XML-OUTPUT FROM SOURCE-REC
COUNT IN XML-CHAR-COUNT
ON EXCEPTION
DISPLAY 'XML generation error ' XML-CODE
STOP RUN
NOT ON EXCEPTION
DISPLAY 'XML document was successfully generated.'
END-XML
|
Please let us know if you'd like any other info. |
|
Back to top |
|
|
Mike-H
New User
Joined: 07 Jan 2007 Posts: 2 Location: Maryland
|
|
|
|
Thanks for the response.
I minimized the code to the display of the XML-CODE and, unfortunately, am still getting a rather large return code of 31461. I'm starting to wonder if there is a setup issue with our systems programmers. |
|
Back to top |
|
|
|