[Migrated content. Thread originally posted on 21 December 2011]
Hello,I have this program that works correctly in RM/COBOL. It generates an XML document with the XML extensions libraries.
IDENTIFICATION DIVISION.
PROGRAM-ID. PROVAXML2.
AUTHOR. mossa.
DATE-WRITTEN. 20080304.
*
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SOURCE-COMPUTER. LEVEL-6.
OBJECT-COMPUTER. LEVEL-6.
SPECIAL-NAMES.
DECIMAL-POINT COMMA.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 VAR-PROGRAMA.
03 url pic x(100).
03 xmlrespuesta pic x(50).
03 request-payload usage pointer.
03 response-payload usage pointer.
03 response-error usage pointer.
03 response-status pic 9(3) value zero.
03 response-len pic s9(4).
03 a-single-char pic x.
03 longrequest.
05 filler pic x occurs 1 to 65000
times depending on counters.
03 counters pic 9(5).
03 Returned-text pic x(1031).
03 RUTA-MODELO PIC X(150).
03 RUTA-PLANTILLA PIC X(150).
03 IDJOB PIC X(100).
03 RESULTAT-WEBSERVICE PIC X(10).
03 STAT-TRABAJO PIC X(2).
03 LOC-TRABAJO PIC X(100).
01 XML-RESPUESTA.
03 returnResult pic x(100).
01 PATH-MODELO PIC X(100)
VALUE "/MNG/DESA/XML/".
01 PATH-PLANTILLA PIC X(100)
VALUE "/MNG/DESA/XML/".
Copy "lixmlall.cpy".
01 parametros-ws001.
02 ws001-parametres-entrada.
03 ws001-indata.
04 ws001-remoteurl pic x(30).
04 ws001-pcontenttype pic x(50).
04 ws001-attachmentid pic x(50).
04 ws001-binarydata pic X(99999).
/
PROCEDURE DIVISION.
INICIO SECTION.
INI-1.
INITIALIZE VAR-PROGRAMA.
INITIALIZE parametros-ws001.
xml initialize.
if not xml-ok then
DISPLAY "ERROR XML INITIALIZE"
GO TO FIN-PROGRAMA
end-if.
**
INITIALIZE ws001-parametres-entrada.
MOVE "12345" TO ws001-binarydata.
MOVE SPACES TO RUTA-MODELO
STRING
PATH-MODELO
DELIMITED BY SPACES
"BASE0085-WS1"
DELIMITED BY SIZE
INTO RUTA-MODELO.
MOVE SPACES TO RUTA-PLANTILLA
STRING
PATH-PLANTILLA
DELIMITED BY SPACES
"BASE0085-WS1PL.XSL"
DELIMITED BY SIZE
INTO RUTA-PLANTILLA.
DISPLAY "RUTA-MODEL: ", RUTA-MODELO
DISPLAY "RUTA-PLANTILLA: ", RUTA-PLANTILLA
XML EXPORT TEXT
ws001-parametres-entrada
request-payload
RUTA-MODELO
RUTA-PLANTILLA.
if not XML-OK then
DISPLAY "ERROR EXPORT"
end-if.
**
xml put text
request-payload
"./P1".
if not xml-ok then
DISPLAY "ERROR " XML-STATUS " EN XML PUT"
stop run
else
DISPLAY "OK. THE PROGRAM HAS GENERATED: ./P1.xml"
end-if.
**
XML TERMINATE.
FIN-PROGRAMA.
GOBACK.But when I want to compile/build it with Visual Cobol I receive the next error:
os.init:
os.init.windows:
os.init.unix:
init:
pre.build.cfg.New_Configuration:
os.init:
os.init.windows:
os.init.unix:
init:
cfg.New_Configuration:
[cobol]
[cobol] Compiling (64-bit) PROVAXML2.cbl...
[cobol] * 019-C Program checked with non-optimal alignment. Optimal alignment is 8
[cobol] * 013-R Illegal intermediate code (at 0X349 in seg 0)
[cobol] cob64: error(s) in code generation: /MNG/DESA/FUENTES/EQBASE/visual_cobol/provaRemot6_XML/outEcl/PROVAXML2.int
[cobol] Compilation complete with 0 errors, 0 warnings, 0 notices and an exit code of 1
[cobollink] Linking (64-bit) PROVAXML2.so...
[cobollink] cob64: error opening: PROVAXML2.o
[cobollink] Link complete with errors
[cobollink]
BUILD FAILED
Build finished with 1 errors, 0 warnings, 0 notices and a maximum exit code of 1
/MNG/DESA/FUENTES/EQBASE/visual_cobol/provaRemot6_XML/.cobolBuild:142: Build errors have occurred
Total time: 0 secondsThe program resides on a remote AIX server. I've tried to compile the program from the same remote server using the "cob" command, and also from Eclipse (Windows), and in both cases I get the same error.
I've used the next compiler directives
SHOW-DIR
CALLFH(ACUFH)
RM "GIVING"
RM "ANSI"
NOOPTIONAL-FILE
REMOVE"TIMEOUT"I think maybe I have to attach a library of XML Extensions but I do not know how ..
Where can be the problem?
Thanks in advance




