IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Unusual return codes from XML GENERATE command.


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Mike-H

New User


Joined: 07 Jan 2007
Posts: 2
Location: Maryland

PostPosted: Sun Jan 07, 2007 11:54 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Jan 08, 2007 2:33 am
Reply with quote

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
View user's profile Send private message
Mike-H

New User


Joined: 07 Jan 2007
Posts: 2
Location: Maryland

PostPosted: Mon Jan 08, 2007 6:54 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts Routing command Address SDSF to other... TSO/ISPF 2
No new posts DTL - how to define key with stacked ... TSO/ISPF 3
No new posts LTJ command CA Products 4
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top