Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Unusual return codes from XML GENERATE command.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Unusual return codes from XML GENERATE command.
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

Site Director


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

PostPosted: Mon Jan 08, 2007 2:33 am    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts IBEGENER RETURN CODE 12 anilkumar922 All Other Mainframe Topics 5 Wed Dec 13, 2017 11:41 am
No new posts OUTREC with ALter Command scorp_rahul23 DFSORT/ICETOOL 1 Wed Nov 22, 2017 3:10 pm
No new posts MQ command in option 6 of ISPF! Vignesh Sid All Other Mainframe Topics 3 Tue Sep 26, 2017 6:01 pm
No new posts Generate public-private key in batch ... vasanthz All Other Mainframe Topics 6 Fri Sep 15, 2017 9:20 am
No new posts Return a Non Numeric value from REXX Learncoholic CLIST & REXX 3 Fri Sep 01, 2017 8:33 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us