Skip to main content

Dear Sir,

When I executed this Code in Visual Cobol for Visual Studio, Thge Output File is Empty :  

      


$set p(prexml) endp

  program-id grabaxml as "XMLDemo.grabaxml".

 Environment Division.

 Input-Output Section.

 File-Control.

 Select xml-stream assign TO not line advancing "C:\\MByB\\out.xml"

 organization  is XML  document-type is "group"

 file status is xml-status.

 data division.

 xd xml-stream.

   01  xmls-group. 

    05  xmls-Number pic 9(18) identified by "group".   

    05  xmls-Alpha  pic x(80) identified by "elementAlpha".

 Working-Storage section.

 01  xml-status         pic xx value 99.

 procedure division.

 open output xml-stream.

 move 1235              To xmls-Number.

 move "elementNumber"   To xmls-Alpha.

 write xmls-group.

 close xml-stream.

 stop run.

 

 

Could you please say what I Did wrong ???

Many Thanks in Advanced.

PJM

Dear Sir,

When I executed this Code in Visual Cobol for Visual Studio, Thge Output File is Empty :  

      


$set p(prexml) endp

  program-id grabaxml as "XMLDemo.grabaxml".

 Environment Division.

 Input-Output Section.

 File-Control.

 Select xml-stream assign TO not line advancing "C:\\MByB\\out.xml"

 organization  is XML  document-type is "group"

 file status is xml-status.

 data division.

 xd xml-stream.

   01  xmls-group. 

    05  xmls-Number pic 9(18) identified by "group".   

    05  xmls-Alpha  pic x(80) identified by "elementAlpha".

 Working-Storage section.

 01  xml-status         pic xx value 99.

 procedure division.

 open output xml-stream.

 move 1235              To xmls-Number.

 move "elementNumber"   To xmls-Alpha.

 write xmls-group.

 close xml-stream.

 stop run.

 

 

Could you please say what I Did wrong ???

Many Thanks in Advanced.

PJM

So Sorry...I Find the mistake.  Solved.

PJM