XML and Mixed Case



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

Re: XML and Mixed Case

Postby BillyBoyo » Wed Mar 21, 2012 6:17 pm

Thanks.

Can't see anything here, don't have 3.4.1 to try anything. Can't see anything in the release notes for Cobol 4.x.

Try with your support people. Maybe they have a "clever" EXIT which is doing something to covert to upper-case, but missing out on the copybook processing? Let us know if you get any useful answers, please.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: Re: XML and Mixed Case

 

Re: XML and Mixed Case

Postby Robert Sample » Wed Mar 21, 2012 6:47 pm

Going back to your original statement, I tried this code:
       01  xml-data-input.
           05  zipcode                 PIC x(05) value '30002'.
           05  carrrte                 PIC X(04) value 'r033'.
           05  walkseq                 pic x(05) value '00001'.
           05  addr                    pic x(72) value
               '123 main st'.
           05  city                    pic x(20) value 'anytown'.
           05  state                   pic x(02) value 'ga'.
           05  zip4                    pic x(04) value '0101'.
       01  xml-data-output             pic x(242) value spaces.
      /
       PROCEDURE DIVISION.
       S1000-MAIN       SECTION.
           XML GENERATE xml-data-output
               from xml-data-input
           END-XML.
           DISPLAY 'OUTPUT: %' xml-data-output '%'.
           GOBACK.
and got these results:
 OUTPUT: %<_xml-data-input><zipcode>30002</zipcode><carrrte>r033</carrrte><walkseq><addr>123 main st</addr
 ><city>anytown</city><state>ga</state><zip4>0101</zip4></_xml-data-input>
            %
Perhaps the problem is simply that your main program has upper case variable names while the copy book does not? NOTE: there is NO line break in the actual output line; the forum software is breaking the line.
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 222 times

Re: XML and Mixed Case

Postby Ed Goodman » Thu Mar 22, 2012 7:16 pm

What is a META COBOL TRANSLATOR??? My compiles jobs start with the compile step.

I would ask for one more check. You are talking about that other step, the META translator, and you say there is a "listing". However... That "listing" is probably NOT what is being passed to the COBOL compiler. There is probably another output, probably a temp file, that is being created as SOURCE for the compiler. Try to get a hold of THAT file and see if it's already been converted. That's where I'd put my money right about now.
Ed Goodman
 
Posts: 342
Joined: Thu Feb 24, 2011 12:05 am
Has thanked: 3 times
Been thanked: 17 times

Re: XML and Mixed Case

Postby Ed Goodman » Thu Mar 22, 2012 7:40 pm

OK...I just hunted down a ca-metacobol+ manual: ftp://scftpd.ca.com/comp/R205M+11UGP.pdf

It does have an option (page 55) to convert everything to upper case. That explains why it works when you move things to copybooks.

Sorry I missed the "datacom" reference earlier. If I had realized that was also a CA product, I would have sniffed this out a little more quickly.
Ed Goodman
 
Posts: 342
Joined: Thu Feb 24, 2011 12:05 am
Has thanked: 3 times
Been thanked: 17 times

Re: XML and Mixed Case

Postby Robert Sample » Thu Mar 22, 2012 7:54 pm

I totally missed the "datacom" reference, too. That would definitely make a difference!
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 222 times

Previous

Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post