Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

COBOL XML GENERATE Error

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
rahuindo

New User


Joined: 09 Apr 2008
Posts: 83
Location: Chennai

PostPosted: Sun Oct 27, 2013 10:02 am    Post subject: COBOL XML GENERATE Error
Reply with quote

Hi,

We're using DB2 V10. I need to pass the results of my COBOL-DB2 stored procedure as XML. The XML result-set will be a huge document and hence I cannot use VARCHAR variable to return the result. I am using an output parameter in the Stored Procedure to return the XML as CLOB. The XML file is generated using the XML-Generate statement and passing it back as XML through a CLOB variable. The CLOB

I have defined the XML output variable as follows:
Code:

01 WS-XML-DOC1 USAGE IS SQL TYPE IS XML AS CLOB(1024K).

This is my XML GENERATE statement:

Code:

INITIALIZE WS-XML-DOC1
XML GENERATE WS-XML-DOC1 FROM WS-OUTPUT-LAYOUT
COUNT IN WS-XML-DOC1-LENGTH
ON EXCEPTION
PERFORM P-XML-EXCEPTION THRU P-EXIT



However, while compiling the code I am getting the following error:

Code:

"XML GENERTATE" identifiers "WS-XML-DOC1(GROUP)" and "WS-XML-DOC1-LENGTH (BINARY INTEGER)" had over storage. This statement was discarded.

Any idea what is wrong I am doing here? As per the manuals this should be working.[/code]
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Sun Oct 27, 2013 1:52 pm    Post subject: Reply to: COBOL XML GENERATE Error
Reply with quote

You need to post the full definitions of everything referenced in the statement which caused the error and the full error-message, including message-code.
Back to top
View user's profile Send private message
rahuindo

New User


Joined: 09 Apr 2008
Posts: 83
Location: Chennai

PostPosted: Mon Oct 28, 2013 4:15 am    Post subject: Reply to: COBOL XML GENERATE Error
Reply with quote

Hi Bill,
Here is the layout of WS-OUTPUT-LAYOUT:
Code:

  01 WS-OUTPUT-LAYOUT.                                           
      05 RP-EMPLOYEE-NUM             PIC X(6).                       
      05 RP-ADDRS-FIELDS                                         
               OCCURS 0 TO 2908 TIMES DEPENDING ON NUMITEMS.     
        10 RP-ADDR-TYP-CD            PIC X(1).                     
        10 RP-PH-AREA-CD              PIC X(3).                     
        10 RP-LOC-PH-NUM              PIC X(7).                     
        10 RP-LN-1-ADDR                PIC X(40).                   
        10 RP-LN-2-ADDR                PIC X(40).                   
        10 RP-LN-3-ADDR                PIC X(40).                   
        10 RP-CTY-NAME                  PIC X(20).                   
        10 RP-ST-CD                       PIC X(2).                     
        10 RP-ZIP-CD                      PIC X(10).                   
        10 RP-CTRY-CD                   PIC X(2).                     
        10 RP-CANNOT-LOC-IND      PIC X(1).                     
        10 RP-FAX-AREA-CD            PIC X(3).                     
        10 RP-FAX-NUM                   PIC X(7).                     

This is the definition of the XML CLOB variable:
Code:

 01  WS-XML-DOC1       USAGE IS SQL TYPE IS XML AS CLOB(1024K).


This is the XML Generate statement
Code:

XML GENERATE WS-XML-DOC1 FROM WS-OUTPUT-LAYOUT 
    COUNT IN WS-XML-DOC1-LENGTH                       
   ON EXCEPTION                                       
      PERFORM P-XML-EXCEPTION THRU P-EXIT             
END-XML                                               


We use ChangeMan as a compiler. Here is the compiler error:
Code:

615  IGYPA3207-E   "XML GENERATE" identifiers "WS-XML-DOC1 (GROUP)" and "WS-XML-DOC1-LENGTH (BINARY INTEGER)" had ove
storage.  The statement was discarded.


Please let me know if you need any additional details.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Mon Oct 28, 2013 5:35 am    Post subject: Reply to: COBOL XML GENERATE Error
Reply with quote

Well, you've not shown the definition of WS-XML-DOC1-LENGTH, but the compiler indicates that it is part of WS-XML-DOC1 which is not allowed.

You need to look at the compile listing. If still unclear, post the WS-XML-DOC1 from the compile listing and include WS-XML-DOC1-LENGTH.

ChangeMan is not your compiler.
Back to top
View user's profile Send private message
rahuindo

New User


Joined: 09 Apr 2008
Posts: 83
Location: Chennai

PostPosted: Mon Oct 28, 2013 6:08 am    Post subject:
Reply with quote

Hi Bill,
Thanks a lot!! I got the answer. The WS-XML-DOC1-LENGTH was created by the DB2 Pre-compiler and I used that during my XML GENERATE statement. I defined a new variable WS-XML-DOC1-LEN and used it for the COUNT.
Thanks a lot, again!!
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Mon Oct 28, 2013 12:44 pm    Post subject: Reply to: COBOL XML GENERATE Error
Reply with quote

Thanks for letting us know.
Back to top
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Mon Oct 28, 2013 7:13 pm    Post subject:
Reply with quote

I also think you cut off the error message:

I bet the words OVERLAPPING STORAGE are in there. That may have helped understand it.
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 S922 Error yuvan ABENDS & Debugging 3 Fri Dec 02, 2016 6:58 pm
No new posts Invoke Webservice Fails with DFHPI100... divated CICS 2 Thu Nov 24, 2016 5:57 pm
This topic is locked: you cannot edit posts or make replies. RANDOM Function in COBOL swapnil781 COBOL Programming 2 Tue Nov 15, 2016 6:17 pm
No new posts Regarding COBOL Stored Procedure opti... selvamsrinivasan85 DB2 4 Fri Nov 04, 2016 8:57 pm
No new posts COBOL Version 6.1 Virendra Shambharkar COBOL Programming 5 Tue Nov 01, 2016 11:24 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us