XML generate syntax error

15 pts.
Tags:
XML
I am trying to use the with attributes' option but the compiler keeps saying that 'with' is invalid. this is my code XML GENERATE XML-MESSAGE FROM ABC WITH ATTIRBUTES COUNT IN BUFFLEN. ATTRIBUTES was spelled correctly in the program I have tried the following & get syntax on all them. 

The first 3 gets IGYPS2072-S "WITH" was invalid.

 and the 4th gets

IGYPS0088-S The "XML" statement was invalid. Expected "FROM", but found "WITH".

Maybe it's a compiler option that I need to use.  

XML GENERATE XML-MESSAGE FROM nonpublicExecutionReport

COUNT IN BUFFLEN

WITH ATTRIBUTES.

 

XML GENERATE XML-MESSAGE FROM nonpublicExecutionReport

COUNT IN BUFFLEN

ATTRIBUTES.

 

XML GENERATE XML-MESSAGE FROM nonpublicExecutionReport

WITH ATTRIBUTES

COUNT IN BUFFLEN.

 

XML GENERATE XML-MESSAGE WITH ATTRIBUTES

FROM nonpublicExecutionReport

COUNT IN BUFFLEN.

 

 



Software/Hardware used:
COBOL z/OS V4R1

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 6  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Splat
    ATTIRBUTES? Do you mean ATTRIBUTES?
    7,565 pointsBadges:
    report
  • TBANDWS
    Yes I meant attributes
    15 pointsBadges:
    report
  • Splat
    If the above was copied straight out of your source that may be your problem. Is there a message id or second-level text on the compiler output?
    7,565 pointsBadges:
    report
  • Splat
    I'm not a COBOL guy nor do I have more than a cursory knowledge of XML so I'm speculating a bit here. The IBM documentation doesn't indicate that XML GENERATE supports the WITH clause (?), though ATTRIBUTE seems valid for the XML-MESSAGE declaration. Could it be the WITH ATTRIBUTE needs to immediately follow the XML-MESSAGE declaration?
    7,565 pointsBadges:
    report
  • TomLiotta
    The documentation isn't specific on this point, but the diagram shows like this:
    Format
    
    >>-XML GENERATE--identifier-1--FROM--identifier-2--------------->
    
    >--+-----------------------------+------------------------------>
       '-COUNT--+----+--identifier-3-'   
                '-IN-'                   
    
    >--+------------------------------+----------------------------->
       '-+------+--ENCODING--codepage-'   
         '-WITH-'                         
    
    >--+---------------------------+--+----------------------+------>
       '-+------+--XML-DECLARATION-'  '-+------+--ATTRIBUTES-'   
         '-WITH-'                       '-WITH-'
    ...
    First thing I'd try is to change the statement to match the diagram -- ATTRIBUTES comes after COUNT rather than before.
    
    If that doesn't work, then show us actual copy/pasted code. We can't work with what you type that is only 'close to' or 'looks like' the actual code.
    
    Tom
    125,585 pointsBadges:
    report
  • TomLiotta
    Maybe it's a compiler option that I need to use. Maybe. Can you show actual source that includes the complete executable statements just before and just after the XML GENERATE? The code should be pasted into a {code} block in this editor so that the exact formatting is shown, including indentation. It might be useful to have the data definitions for both XML-MESSAGE and nonpublicExecutionReport, but those might be needed later. I didn't see any specific PTFs for the error. Tom
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following