Skip to main content

Hi All,

I am working on Cobol Ver 5.1.4.0 , Linux  ( 2.6.18-194.el5 x86_64 x86_64 x86_64 GNU/Linux ).

Program with following code was compiled successfully, but when execute command  'open output xml-stream',  the file-status value is set as "000000001- " .   Please if anyone can help me with the settings required, for this code to work.

********************** Code *********************

       $set p(prexml)  o(dth1.cp) endp  noibmcomp
       id division.
       program-id. DTH1.
       environment division.
       input-output section.
       file-control.

       select xml-stream    assign to "$HOME/myxml.xml"
                            organization is xml
                            file status is file-status.

       data division.
       file section.
       xd  xml-stream.
       01  my-record identified by "my_record".
           02 my-customer identified by "cust_record".
              03 my-name pic x(100) identified by "my_name".
              03 my-company pic x(100) identified by "my_company".
              03 my-phone   pic x(100) identified by "my_phone".
       working-storage section.
       01 file-status  pic s9(9) value 0.
       procedure division.

           open output xml-stream
           display "status : " file-status.
           move "chris" to my-name
           move "Micro Focus" to my-company
           move "603-555-1212" to my-phone

           write my-record key is all my-customer
           move "John" to my-name
           move "Microsoft" to my-company
           move "800-111-2222" to my-phone
           write my-record key is all my-customer
           write my-record
           close xml-stream
           stop run.

********  CODE ENDS **************************************************************

Thanks & Regards
Dhaval

Hi All,

I am working on Cobol Ver 5.1.4.0 , Linux  ( 2.6.18-194.el5 x86_64 x86_64 x86_64 GNU/Linux ).

Program with following code was compiled successfully, but when execute command  'open output xml-stream',  the file-status value is set as "000000001- " .   Please if anyone can help me with the settings required, for this code to work.

********************** Code *********************

       $set p(prexml)  o(dth1.cp) endp  noibmcomp
       id division.
       program-id. DTH1.
       environment division.
       input-output section.
       file-control.

       select xml-stream    assign to "$HOME/myxml.xml"
                            organization is xml
                            file status is file-status.

       data division.
       file section.
       xd  xml-stream.
       01  my-record identified by "my_record".
           02 my-customer identified by "cust_record".
              03 my-name pic x(100) identified by "my_name".
              03 my-company pic x(100) identified by "my_company".
              03 my-phone   pic x(100) identified by "my_phone".
       working-storage section.
       01 file-status  pic s9(9) value 0.
       procedure division.

           open output xml-stream
           display "status : " file-status.
           move "chris" to my-name
           move "Micro Focus" to my-company
           move "603-555-1212" to my-phone

           write my-record key is all my-customer
           move "John" to my-name
           move "Microsoft" to my-company
           move "800-111-2222" to my-phone
           write my-record key is all my-customer
           write my-record
           close xml-stream
           stop run.

********  CODE ENDS **************************************************************

Thanks & Regards
Dhaval

Hello Dhaval,

I have tried your program on SUSE Linux Enterprise Edition 11.0, with Server Express 5.1 Wrap Pack 7, and it runs with no errors, and generates the .xml file. Can you confirm the exact version of Server Express that you are using? You can find this by entering "cob -V" at the command prompt. Please reply with the entire output from that command.

Also, what is the exact compile command you use?


Hi All,

I am working on Cobol Ver 5.1.4.0 , Linux  ( 2.6.18-194.el5 x86_64 x86_64 x86_64 GNU/Linux ).

Program with following code was compiled successfully, but when execute command  'open output xml-stream',  the file-status value is set as "000000001- " .   Please if anyone can help me with the settings required, for this code to work.

********************** Code *********************

       $set p(prexml)  o(dth1.cp) endp  noibmcomp
       id division.
       program-id. DTH1.
       environment division.
       input-output section.
       file-control.

       select xml-stream    assign to "$HOME/myxml.xml"
                            organization is xml
                            file status is file-status.

       data division.
       file section.
       xd  xml-stream.
       01  my-record identified by "my_record".
           02 my-customer identified by "cust_record".
              03 my-name pic x(100) identified by "my_name".
              03 my-company pic x(100) identified by "my_company".
              03 my-phone   pic x(100) identified by "my_phone".
       working-storage section.
       01 file-status  pic s9(9) value 0.
       procedure division.

           open output xml-stream
           display "status : " file-status.
           move "chris" to my-name
           move "Micro Focus" to my-company
           move "603-555-1212" to my-phone

           write my-record key is all my-customer
           move "John" to my-name
           move "Microsoft" to my-company
           move "800-111-2222" to my-phone
           write my-record key is all my-customer
           write my-record
           close xml-stream
           stop run.

********  CODE ENDS **************************************************************

Thanks & Regards
Dhaval

Hi Blair,

Please find below the required details.

cob -V

==========================

version @(#)cob.c       5.1.4.0

PRN=RXCTS/AAE:9n.u5.51.05

PTI=WrapPack 4

PTI=ES

program compilation

==========================

cob -iva -W e  \\

-C "rtncode-size=4 copylist warning=3" \\

-C "$RMANSI $NESTCALL\\

-C LIST=${filename}.lst  \\

-k $int/${filename}.COB

cob -uv $HPCHUNK $int/${filename}.int

To run program, executable 'rts' used which is generated by following

cob -vX fres -X fsav -o rts -xe ""  -I SESSION -I FHREDIR -I CICS $OFILES  -lcurses -lpthread -lm $*

here, OFILES - some C executables

Thanks & Regards

Dhaval


Hi All,

I am working on Cobol Ver 5.1.4.0 , Linux  ( 2.6.18-194.el5 x86_64 x86_64 x86_64 GNU/Linux ).

Program with following code was compiled successfully, but when execute command  'open output xml-stream',  the file-status value is set as "000000001- " .   Please if anyone can help me with the settings required, for this code to work.

********************** Code *********************

       $set p(prexml)  o(dth1.cp) endp  noibmcomp
       id division.
       program-id. DTH1.
       environment division.
       input-output section.
       file-control.

       select xml-stream    assign to "$HOME/myxml.xml"
                            organization is xml
                            file status is file-status.

       data division.
       file section.
       xd  xml-stream.
       01  my-record identified by "my_record".
           02 my-customer identified by "cust_record".
              03 my-name pic x(100) identified by "my_name".
              03 my-company pic x(100) identified by "my_company".
              03 my-phone   pic x(100) identified by "my_phone".
       working-storage section.
       01 file-status  pic s9(9) value 0.
       procedure division.

           open output xml-stream
           display "status : " file-status.
           move "chris" to my-name
           move "Micro Focus" to my-company
           move "603-555-1212" to my-phone

           write my-record key is all my-customer
           move "John" to my-name
           move "Microsoft" to my-company
           move "800-111-2222" to my-phone
           write my-record key is all my-customer
           write my-record
           close xml-stream
           stop run.

********  CODE ENDS **************************************************************

Thanks & Regards
Dhaval

Hello Dhaval,

I have recompiled with those directives which are clearly specified, and then run the .gnt with cobrun – it still runs successfully. However, I can’t tell all of the compiler directives which are being specified, since some are in environment variables. Can you tell me what the values of $RMANSI, $NESTCALL and $HPCHUNK are at compile/build time?


Hi All,

I am working on Cobol Ver 5.1.4.0 , Linux  ( 2.6.18-194.el5 x86_64 x86_64 x86_64 GNU/Linux ).

Program with following code was compiled successfully, but when execute command  'open output xml-stream',  the file-status value is set as "000000001- " .   Please if anyone can help me with the settings required, for this code to work.

********************** Code *********************

       $set p(prexml)  o(dth1.cp) endp  noibmcomp
       id division.
       program-id. DTH1.
       environment division.
       input-output section.
       file-control.

       select xml-stream    assign to "$HOME/myxml.xml"
                            organization is xml
                            file status is file-status.

       data division.
       file section.
       xd  xml-stream.
       01  my-record identified by "my_record".
           02 my-customer identified by "cust_record".
              03 my-name pic x(100) identified by "my_name".
              03 my-company pic x(100) identified by "my_company".
              03 my-phone   pic x(100) identified by "my_phone".
       working-storage section.
       01 file-status  pic s9(9) value 0.
       procedure division.

           open output xml-stream
           display "status : " file-status.
           move "chris" to my-name
           move "Micro Focus" to my-company
           move "603-555-1212" to my-phone

           write my-record key is all my-customer
           move "John" to my-name
           move "Microsoft" to my-company
           move "800-111-2222" to my-phone
           write my-record key is all my-customer
           write my-record
           close xml-stream
           stop run.

********  CODE ENDS **************************************************************

Thanks & Regards
Dhaval

Hi Blair,

The value of  $RMANSI, $NESTCALL and $HPCHUNK  is set as spaces.

Thanks & Regards

Dhaval


Hi All,

I am working on Cobol Ver 5.1.4.0 , Linux  ( 2.6.18-194.el5 x86_64 x86_64 x86_64 GNU/Linux ).

Program with following code was compiled successfully, but when execute command  'open output xml-stream',  the file-status value is set as "000000001- " .   Please if anyone can help me with the settings required, for this code to work.

********************** Code *********************

       $set p(prexml)  o(dth1.cp) endp  noibmcomp
       id division.
       program-id. DTH1.
       environment division.
       input-output section.
       file-control.

       select xml-stream    assign to "$HOME/myxml.xml"
                            organization is xml
                            file status is file-status.

       data division.
       file section.
       xd  xml-stream.
       01  my-record identified by "my_record".
           02 my-customer identified by "cust_record".
              03 my-name pic x(100) identified by "my_name".
              03 my-company pic x(100) identified by "my_company".
              03 my-phone   pic x(100) identified by "my_phone".
       working-storage section.
       01 file-status  pic s9(9) value 0.
       procedure division.

           open output xml-stream
           display "status : " file-status.
           move "chris" to my-name
           move "Micro Focus" to my-company
           move "603-555-1212" to my-phone

           write my-record key is all my-customer
           move "John" to my-name
           move "Microsoft" to my-company
           move "800-111-2222" to my-phone
           write my-record key is all my-customer
           write my-record
           close xml-stream
           stop run.

********  CODE ENDS **************************************************************

Thanks & Regards
Dhaval

Hi Blair,

For following command

cob -iva -W e -C "rtncode-size= 4 copylist warning=3"  -C LIST= DTH.lst  -k  /fns/zr/r/int/DTH.COB

system internally executes :

cob64 -C nolist -C notrunc checknum noreseq noosvs vsc2 fileshare ibmcomp include-filler -C hidemessage=1146 hidemessage=1205 hidemessage=1234 hidemessage=1168 hidemessage=1158 -C odoosvs odoslide -C notrunc checknum noreseq noosvs vsc2 fileshare ibmcomp include-filler hidemessage=1136 hidemessage=1205 hidemessage=1234 -C odoosvs odoslide -iva -W e -C rtncode-size=4 copylist warning=3 -C     -C LIST=DTH.lst -k /fns/zr/r/int/DTH.COB

and, for following command

cob -uv  /fns/zr/r/int/DTH.int

system internally executes :

cob64 -C nolist -C notrunc checknum noreseq noosvs vsc2 fileshare ibmcomp include-filler -C hidemessage=1146 hidemessage=1205 hidemessage=1234 hidemessage=1168 hidemessage=1158 -C odoosvs odoslide -C notrunc checknum noreseq noosvs vsc2 fileshare ibmcomp include-filler hidemessage=1136 hidemessage=1205 hidemessage=1234 -C odoosvs odoslide -uv /fns/zr/r/int/DTH.int

Can you please send the compile command with which you successfully compiled and executed the program. I will try compiling with that command.

Thanks & Regards

Dhaval


Hi All,

I am working on Cobol Ver 5.1.4.0 , Linux  ( 2.6.18-194.el5 x86_64 x86_64 x86_64 GNU/Linux ).

Program with following code was compiled successfully, but when execute command  'open output xml-stream',  the file-status value is set as "000000001- " .   Please if anyone can help me with the settings required, for this code to work.

********************** Code *********************

       $set p(prexml)  o(dth1.cp) endp  noibmcomp
       id division.
       program-id. DTH1.
       environment division.
       input-output section.
       file-control.

       select xml-stream    assign to "$HOME/myxml.xml"
                            organization is xml
                            file status is file-status.

       data division.
       file section.
       xd  xml-stream.
       01  my-record identified by "my_record".
           02 my-customer identified by "cust_record".
              03 my-name pic x(100) identified by "my_name".
              03 my-company pic x(100) identified by "my_company".
              03 my-phone   pic x(100) identified by "my_phone".
       working-storage section.
       01 file-status  pic s9(9) value 0.
       procedure division.

           open output xml-stream
           display "status : " file-status.
           move "chris" to my-name
           move "Micro Focus" to my-company
           move "603-555-1212" to my-phone

           write my-record key is all my-customer
           move "John" to my-name
           move "Microsoft" to my-company
           move "800-111-2222" to my-phone
           write my-record key is all my-customer
           write my-record
           close xml-stream
           stop run.

********  CODE ENDS **************************************************************

Thanks & Regards
Dhaval

Hello Dhaval,

Thank you for providing the internally executed commands. However, even when I use the exact internally executed commands that you've shown, the program compiles and executes correctly for me.

It appears we will have to do some more in-depth investigation on this problem, better handled with a regular Micro Focus Support Incident. If you would, please call SupportLine at 800-632-6265, and request that a Support Incident be opened for this problem. Please reference my name, and ask that it be assigned to me. Alternately, you can go to the SupportLine website (supportline.microfocus.com) and create a Support Incident there.


Hi All,

I am working on Cobol Ver 5.1.4.0 , Linux  ( 2.6.18-194.el5 x86_64 x86_64 x86_64 GNU/Linux ).

Program with following code was compiled successfully, but when execute command  'open output xml-stream',  the file-status value is set as "000000001- " .   Please if anyone can help me with the settings required, for this code to work.

********************** Code *********************

       $set p(prexml)  o(dth1.cp) endp  noibmcomp
       id division.
       program-id. DTH1.
       environment division.
       input-output section.
       file-control.

       select xml-stream    assign to "$HOME/myxml.xml"
                            organization is xml
                            file status is file-status.

       data division.
       file section.
       xd  xml-stream.
       01  my-record identified by "my_record".
           02 my-customer identified by "cust_record".
              03 my-name pic x(100) identified by "my_name".
              03 my-company pic x(100) identified by "my_company".
              03 my-phone   pic x(100) identified by "my_phone".
       working-storage section.
       01 file-status  pic s9(9) value 0.
       procedure division.

           open output xml-stream
           display "status : " file-status.
           move "chris" to my-name
           move "Micro Focus" to my-company
           move "603-555-1212" to my-phone

           write my-record key is all my-customer
           move "John" to my-name
           move "Microsoft" to my-company
           move "800-111-2222" to my-phone
           write my-record key is all my-customer
           write my-record
           close xml-stream
           stop run.

********  CODE ENDS **************************************************************

Thanks & Regards
Dhaval

Hi Blair,

Thanks for your reply. I am in process in my company to get the details required to register Support Incident.

One question please, have you tried with same cobol and Linux version that I have.

I tried executing same code in HP-UX and it executed fine. Following are cobol and server details in which code is working.

cob -V

===============================

version @(#)cob.c       1.321

PRN=RXCAE/AAP:9i.T4.40.04

PTI=SP2

PTI=ES

PTI=Fixpack40.04_54

PTI=Fixpack40.04_67

PTI=Fixpack40.04_79

HP-UX hpux1572 B.11.23 U ia64 unlimited-user license

Is it possible that a setting is required in Cobol compiler for Linux which is specific for XML.

Thanks & Regards

Dhaval


Hi All,

I am working on Cobol Ver 5.1.4.0 , Linux  ( 2.6.18-194.el5 x86_64 x86_64 x86_64 GNU/Linux ).

Program with following code was compiled successfully, but when execute command  'open output xml-stream',  the file-status value is set as "000000001- " .   Please if anyone can help me with the settings required, for this code to work.

********************** Code *********************

       $set p(prexml)  o(dth1.cp) endp  noibmcomp
       id division.
       program-id. DTH1.
       environment division.
       input-output section.
       file-control.

       select xml-stream    assign to "$HOME/myxml.xml"
                            organization is xml
                            file status is file-status.

       data division.
       file section.
       xd  xml-stream.
       01  my-record identified by "my_record".
           02 my-customer identified by "cust_record".
              03 my-name pic x(100) identified by "my_name".
              03 my-company pic x(100) identified by "my_company".
              03 my-phone   pic x(100) identified by "my_phone".
       working-storage section.
       01 file-status  pic s9(9) value 0.
       procedure division.

           open output xml-stream
           display "status : " file-status.
           move "chris" to my-name
           move "Micro Focus" to my-company
           move "603-555-1212" to my-phone

           write my-record key is all my-customer
           move "John" to my-name
           move "Microsoft" to my-company
           move "800-111-2222" to my-phone
           write my-record key is all my-customer
           write my-record
           close xml-stream
           stop run.

********  CODE ENDS **************************************************************

Thanks & Regards
Dhaval

Hello Dhaval,

Yes, as you've suggested, it may be that some configuration or setting difference exists which is causing us to receive different results. Because of this, I will be better able to help you with a Support Incident. I hope that you will proceed with getting a Support Incident created, so that we can dig further into this problem. Please be sure to reference my name when the incident is created, and ask that it be assigned to me.


Hi All,

I am working on Cobol Ver 5.1.4.0 , Linux  ( 2.6.18-194.el5 x86_64 x86_64 x86_64 GNU/Linux ).

Program with following code was compiled successfully, but when execute command  'open output xml-stream',  the file-status value is set as "000000001- " .   Please if anyone can help me with the settings required, for this code to work.

********************** Code *********************

       $set p(prexml)  o(dth1.cp) endp  noibmcomp
       id division.
       program-id. DTH1.
       environment division.
       input-output section.
       file-control.

       select xml-stream    assign to "$HOME/myxml.xml"
                            organization is xml
                            file status is file-status.

       data division.
       file section.
       xd  xml-stream.
       01  my-record identified by "my_record".
           02 my-customer identified by "cust_record".
              03 my-name pic x(100) identified by "my_name".
              03 my-company pic x(100) identified by "my_company".
              03 my-phone   pic x(100) identified by "my_phone".
       working-storage section.
       01 file-status  pic s9(9) value 0.
       procedure division.

           open output xml-stream
           display "status : " file-status.
           move "chris" to my-name
           move "Micro Focus" to my-company
           move "603-555-1212" to my-phone

           write my-record key is all my-customer
           move "John" to my-name
           move "Microsoft" to my-company
           move "800-111-2222" to my-phone
           write my-record key is all my-customer
           write my-record
           close xml-stream
           stop run.

********  CODE ENDS **************************************************************

Thanks & Regards
Dhaval

Hi Blair,

My supervisor has raised the Supportline Incident  #2616750 - "TCS BaNCS - Cobol-XML Access Issue on Linux".  He raised it before I could inform him to include your name.

As a response to this incident, he received link for documentation on SX 5.1

supportline.microfocus.com/.../sx51indx.htm.

I am not sure whether this document will be enough to solve the problem.

Please suggest.

Thanks & Regards

Dhaval


Hi All,

I am working on Cobol Ver 5.1.4.0 , Linux  ( 2.6.18-194.el5 x86_64 x86_64 x86_64 GNU/Linux ).

Program with following code was compiled successfully, but when execute command  'open output xml-stream',  the file-status value is set as "000000001- " .   Please if anyone can help me with the settings required, for this code to work.

********************** Code *********************

       $set p(prexml)  o(dth1.cp) endp  noibmcomp
       id division.
       program-id. DTH1.
       environment division.
       input-output section.
       file-control.

       select xml-stream    assign to "$HOME/myxml.xml"
                            organization is xml
                            file status is file-status.

       data division.
       file section.
       xd  xml-stream.
       01  my-record identified by "my_record".
           02 my-customer identified by "cust_record".
              03 my-name pic x(100) identified by "my_name".
              03 my-company pic x(100) identified by "my_company".
              03 my-phone   pic x(100) identified by "my_phone".
       working-storage section.
       01 file-status  pic s9(9) value 0.
       procedure division.

           open output xml-stream
           display "status : " file-status.
           move "chris" to my-name
           move "Micro Focus" to my-company
           move "603-555-1212" to my-phone

           write my-record key is all my-customer
           move "John" to my-name
           move "Microsoft" to my-company
           move "800-111-2222" to my-phone
           write my-record key is all my-customer
           write my-record
           close xml-stream
           stop run.

********  CODE ENDS **************************************************************

Thanks & Regards
Dhaval

Hello Dhaval,

I have contacted the Support Incident owner to suggest that it be transferred to me.

Blair


Hi All,

I am working on Cobol Ver 5.1.4.0 , Linux  ( 2.6.18-194.el5 x86_64 x86_64 x86_64 GNU/Linux ).

Program with following code was compiled successfully, but when execute command  'open output xml-stream',  the file-status value is set as "000000001- " .   Please if anyone can help me with the settings required, for this code to work.

********************** Code *********************

       $set p(prexml)  o(dth1.cp) endp  noibmcomp
       id division.
       program-id. DTH1.
       environment division.
       input-output section.
       file-control.

       select xml-stream    assign to "$HOME/myxml.xml"
                            organization is xml
                            file status is file-status.

       data division.
       file section.
       xd  xml-stream.
       01  my-record identified by "my_record".
           02 my-customer identified by "cust_record".
              03 my-name pic x(100) identified by "my_name".
              03 my-company pic x(100) identified by "my_company".
              03 my-phone   pic x(100) identified by "my_phone".
       working-storage section.
       01 file-status  pic s9(9) value 0.
       procedure division.

           open output xml-stream
           display "status : " file-status.
           move "chris" to my-name
           move "Micro Focus" to my-company
           move "603-555-1212" to my-phone

           write my-record key is all my-customer
           move "John" to my-name
           move "Microsoft" to my-company
           move "800-111-2222" to my-phone
           write my-record key is all my-customer
           write my-record
           close xml-stream
           stop run.

********  CODE ENDS **************************************************************

Thanks & Regards
Dhaval

Hi Blair,

We received a mail today from 'Jun Fabros' asking to respond by Monday whether to keep the Incident open.  Please do let us know if you have been assigned to this Incident, and if we have to respond something to Jun.

Thanks & Regards

Dhaval


Hi All,

I am working on Cobol Ver 5.1.4.0 , Linux  ( 2.6.18-194.el5 x86_64 x86_64 x86_64 GNU/Linux ).

Program with following code was compiled successfully, but when execute command  'open output xml-stream',  the file-status value is set as "000000001- " .   Please if anyone can help me with the settings required, for this code to work.

********************** Code *********************

       $set p(prexml)  o(dth1.cp) endp  noibmcomp
       id division.
       program-id. DTH1.
       environment division.
       input-output section.
       file-control.

       select xml-stream    assign to "$HOME/myxml.xml"
                            organization is xml
                            file status is file-status.

       data division.
       file section.
       xd  xml-stream.
       01  my-record identified by "my_record".
           02 my-customer identified by "cust_record".
              03 my-name pic x(100) identified by "my_name".
              03 my-company pic x(100) identified by "my_company".
              03 my-phone   pic x(100) identified by "my_phone".
       working-storage section.
       01 file-status  pic s9(9) value 0.
       procedure division.

           open output xml-stream
           display "status : " file-status.
           move "chris" to my-name
           move "Micro Focus" to my-company
           move "603-555-1212" to my-phone

           write my-record key is all my-customer
           move "John" to my-name
           move "Microsoft" to my-company
           move "800-111-2222" to my-phone
           write my-record key is all my-customer
           write my-record
           close xml-stream
           stop run.

********  CODE ENDS **************************************************************

Thanks & Regards
Dhaval

Hello Dhaval,

I have been assigned the incident. I will be sending an email shortly to the B P Rao who is assigned to the incident.


Hi All,

I am working on Cobol Ver 5.1.4.0 , Linux  ( 2.6.18-194.el5 x86_64 x86_64 x86_64 GNU/Linux ).

Program with following code was compiled successfully, but when execute command  'open output xml-stream',  the file-status value is set as "000000001- " .   Please if anyone can help me with the settings required, for this code to work.

********************** Code *********************

       $set p(prexml)  o(dth1.cp) endp  noibmcomp
       id division.
       program-id. DTH1.
       environment division.
       input-output section.
       file-control.

       select xml-stream    assign to "$HOME/myxml.xml"
                            organization is xml
                            file status is file-status.

       data division.
       file section.
       xd  xml-stream.
       01  my-record identified by "my_record".
           02 my-customer identified by "cust_record".
              03 my-name pic x(100) identified by "my_name".
              03 my-company pic x(100) identified by "my_company".
              03 my-phone   pic x(100) identified by "my_phone".
       working-storage section.
       01 file-status  pic s9(9) value 0.
       procedure division.

           open output xml-stream
           display "status : " file-status.
           move "chris" to my-name
           move "Micro Focus" to my-company
           move "603-555-1212" to my-phone

           write my-record key is all my-customer
           move "John" to my-name
           move "Microsoft" to my-company
           move "800-111-2222" to my-phone
           write my-record key is all my-customer
           write my-record
           close xml-stream
           stop run.

********  CODE ENDS **************************************************************

Thanks & Regards
Dhaval

Hello Dhaval,

My apologies for the confusion. I did not notice that you are in India, making it impractical for me to help because of the time zone difference. I have placed the incident back in the name of the Micro Focus representative Jun Fabros.  I have also shared with him the background from our conversation on the Micro Focus community website.


Hi All,

I am working on Cobol Ver 5.1.4.0 , Linux  ( 2.6.18-194.el5 x86_64 x86_64 x86_64 GNU/Linux ).

Program with following code was compiled successfully, but when execute command  'open output xml-stream',  the file-status value is set as "000000001- " .   Please if anyone can help me with the settings required, for this code to work.

********************** Code *********************

       $set p(prexml)  o(dth1.cp) endp  noibmcomp
       id division.
       program-id. DTH1.
       environment division.
       input-output section.
       file-control.

       select xml-stream    assign to "$HOME/myxml.xml"
                            organization is xml
                            file status is file-status.

       data division.
       file section.
       xd  xml-stream.
       01  my-record identified by "my_record".
           02 my-customer identified by "cust_record".
              03 my-name pic x(100) identified by "my_name".
              03 my-company pic x(100) identified by "my_company".
              03 my-phone   pic x(100) identified by "my_phone".
       working-storage section.
       01 file-status  pic s9(9) value 0.
       procedure division.

           open output xml-stream
           display "status : " file-status.
           move "chris" to my-name
           move "Micro Focus" to my-company
           move "603-555-1212" to my-phone

           write my-record key is all my-customer
           move "John" to my-name
           move "Microsoft" to my-company
           move "800-111-2222" to my-phone
           write my-record key is all my-customer
           write my-record
           close xml-stream
           stop run.

********  CODE ENDS **************************************************************

Thanks & Regards
Dhaval

Hi Dhaval,

Please help to respond to the incident as these are monitored. Kindly reply with your email address so we can include you in the mail recipients and be informed of the updates on the incident.