View previous topic :: View next topic |
Author |
Message |
Bithead Advanced
Joined: 03 Jan 2003 Posts: 550 Topics: 23 Location: Michigan, USA
|
Posted: Fri Jan 28, 2005 1:01 pm Post subject: XML Parsing in COBOL |
|
|
I am trying to get a COBOL XML parser to work but it is failing at run-time because it can't locate module IGZCXML. Can anyone tell me where this module is located? |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12372 Topics: 75 Location: San Jose
|
|
Back to top |
|
|
Bithead Advanced
Joined: 03 Jan 2003 Posts: 550 Topics: 23 Location: Michigan, USA
|
Posted: Fri Jan 28, 2005 1:36 pm Post subject: |
|
|
Kolusu,
I am running Enterprise COBOL 3.3.1 and this APAR relates to 3.1 which is when it was added. I checked SCEERUN and SCEELKED but it not in either. Do you know which library I should look in? |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12372 Topics: 75 Location: San Jose
|
Posted: Fri Jan 28, 2005 1:45 pm Post subject: |
|
|
Bithead,
I did not find the module IGZCXML at all and I am running only Enterprise COBOL for z/OS and OS/390 3.2.0. Try to run this JCL and see if it works for you.
Code: |
//STEP0100 EXEC PGM=IGYCRCTL
//STEPLIB DD DSN=SYS1.SIGYCOMP,
// DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSTERM DD SYSOUT=*
//SYSUT1 DD UNIT=DISK,SPACE=(CYL,(10,2))
//SYSUT2 DD UNIT=DISK,SPACE=(CYL,(10,2))
//SYSUT3 DD UNIT=DISK,SPACE=(CYL,(10,2))
//SYSUT4 DD UNIT=DISK,SPACE=(CYL,(10,2))
//SYSUT5 DD UNIT=DISK,SPACE=(CYL,(10,2))
//SYSUT6 DD UNIT=DISK,SPACE=(CYL,(10,2))
//SYSUT7 DD UNIT=DISK,SPACE=(CYL,(10,2))
//SYSLIN DD DSN=&&LOADSET,
// DISP=(MOD,PASS),
// UNIT=DISK,
// SPACE=(CYL,(1,1),RLSE)
//SYSIN DD *
PROCESS FLAG(I,I)
IDENTIFICATION DIVISION.
PROGRAM-ID. XMLSAMPL.
DATA DIVISION.
WORKING-STORAGE SECTION.
*****************************************************************
* XML DOCUMENT, ENCODED AS INITIAL VALUES OF DATA ITEMS.
*****************************************************************
1 xml-document.
2 pic x(39) value '<?xml version="1.0" encoding="ibm-1140"'.
2 pic x(19) value ' standalone="yes"?>'.
2 pic x(39) value '<!--This document is just an example-->'.
2 pic x(10) value '<sandwich>'.
2 pic x(35) value ' <bread type="baker's best"/>'.
2 pic x(41) value ' <?spread please use real mayonnaise ?>'.
2 pic x(31) value ' <meat>Ham & turkey</meat>'.
2 pic x(40) value ' <filling>Cheese, lettuce, tomato, etc.'.
2 pic x(10) value '</filling>'.
2 pic x(35) value ' <![CDATA[We should add a <relish>'.
2 pic x(22) value ' element in future!]]>'.
2 pic x(31) value ' <listprice>$4.99 </listprice>'.
2 pic x(27) value ' <discount>0.10</discount>'.
2 pic x(11) value '</sandwich>'.
1 xml-document-length computational pic 999.
*****************************************************************
* SAMPLE DATA DEFINITIONS FOR PROCESSING NUMERIC XML CONTENT.
*****************************************************************
1 current-element pic x(30).
1 xfr-ed pic x(9) justified.
1 xfr-ed-1 redefines xfr-ed pic 999999.99.
1 list-price computational pic 9v99 value 0.
1 discount computational pic 9v99 value 0.
1 display-price pic $$9.99.
PROCEDURE DIVISION.
MAINLINE SECTION.
XML PARSE XML-DOCUMENT PROCESSING PROCEDURE XML-HANDLER
ON EXCEPTION
DISPLAY 'XML DOCUMENT ERROR ' XML-CODE
NOT ON EXCEPTION
DISPLAY 'XML DOCUMENT SUCCESSFULLY PARSED'
END-XML
*****************************************************************
* PROCESS THE TRANSFORMED CONTENT AND CALCULATE PROMO PRICE.
*****************************************************************
DISPLAY ' '
DISPLAY '-----+++++***** USING INFORMATION FROM XML '
'*****+++++-----'
DISPLAY ' '
MOVE LIST-PRICE TO DISPLAY-PRICE
DISPLAY ' SANDWICH LIST PRICE: ' DISPLAY-PRICE
COMPUTE DISPLAY-PRICE = LIST-PRICE * (1 - DISCOUNT)
DISPLAY ' PROMOTIONAL PRICE: ' DISPLAY-PRICE
DISPLAY ' GET ONE TODAY!'
GOBACK.
XML-HANDLER SECTION.
EVALUATE XML-EVENT
* ==> ORDER XML EVENTS MOST FREQUENT FIRST
WHEN 'START-OF-ELEMENT'
DISPLAY 'START ELEMENT TAG: <' XML-TEXT '>'
MOVE XML-TEXT TO CURRENT-ELEMENT
WHEN 'CONTENT-CHARACTERS'
DISPLAY 'CONTENT CHARACTERS: <' XML-TEXT '>'
* ==> TRANSFORM XML CONTENT TO OPERATIONAL COBOL DATA ITEM...
EVALUATE CURRENT-ELEMENT
WHEN 'listprice'
* ==> USING FUNCTION NUMVAL-C...
COMPUTE LIST-PRICE = FUNCTION NUMVAL-C(XML-TEXT)
WHEN 'discount'
* ==> USING DE-EDITING OF A NUMERIC EDITED ITEM...
MOVE XML-TEXT TO XFR-ED
MOVE XFR-ED-1 TO DISCOUNT
END-EVALUATE
WHEN 'END-OF-ELEMENT'
DISPLAY 'END ELEMENT TAG: <' XML-TEXT '>'
MOVE SPACES TO CURRENT-ELEMENT
WHEN 'START-OF-DOCUMENT'
COMPUTE XML-DOCUMENT-LENGTH = FUNCTION LENGTH(XML-TEXT)
DISPLAY 'START OF DOCUMENT: LENGTH=' XML-DOCUMENT-LENGTH
' CHARACTERS.'
WHEN 'END-OF-DOCUMENT'
DISPLAY 'END OF DOCUMENT.'
WHEN 'VERSION-INFORMATION'
DISPLAY 'VERSION: <' XML-TEXT '>'
WHEN 'ENCODING-DECLARATION'
DISPLAY 'ENCODING: <' XML-TEXT '>'
WHEN 'STANDALONE-DECLARATION'
DISPLAY 'STANDALONE: <' XML-TEXT '>'
WHEN 'ATTRIBUTE-NAME'
DISPLAY 'ATTRIBUTE NAME: <' XML-TEXT '>'
WHEN 'ATTRIBUTE-CHARACTERS'
DISPLAY 'ATTRIBUTE VALUE CHARACTERS: <' XML-TEXT '>'
WHEN 'ATTRIBUTE-CHARACTER'
DISPLAY 'ATTRIBUTE VALUE CHARACTER: <' XML-TEXT '>'
WHEN 'START-OF-CDATA-SECTION'
DISPLAY 'START OF CDATA: <' XML-TEXT '>'
WHEN 'END-OF-CDATA-SECTION'
DISPLAY 'END OF CDATA: <' XML-TEXT '>'
WHEN 'CONTENT-CHARACTER'
DISPLAY 'CONTENT CHARACTER: <' XML-TEXT '>'
WHEN 'PROCESSING-INSTRUCTION-TARGET'
DISPLAY 'PI TARGET: <' XML-TEXT '>'
WHEN 'PROCESSING-INSTRUCTION-DATA'
DISPLAY 'PI DATA: <' XML-TEXT '>'
WHEN 'COMMENT'
DISPLAY 'COMMENT: <' XML-TEXT '>'
WHEN 'EXCEPTION'
COMPUTE XML-DOCUMENT-LENGTH = FUNCTION LENGTH (XML-TEXT)
DISPLAY 'EXCEPTION ' XML-CODE ' AT OFFSET '
XML-DOCUMENT-LENGTH '.'
WHEN OTHER
DISPLAY 'UNEXPECTED XML EVENT: ' XML-EVENT '.'
END-EVALUATE.
/*
//**********************************************************************
//GO EXEC PGM=LOADER,
// PARM=('LIST,LET,XREF,DCBS,'),
// COND=(5,LT,STEP0100)
//SYSLIB DD DSN=SYS1.SCEELKED,
// DISP=SHR
//SYSLIN DD DSNAME=*.STEP0100.SYSLIN,DISP=(OLD,DELETE)
//SYSLOUT DD SYSOUT=*
//SYSABOUT DD SYSOUT=*
//SYSDBOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
/*
|
Hope this helps...
Cheers
kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
Bithead Advanced
Joined: 03 Jan 2003 Posts: 550 Topics: 23 Location: Michigan, USA
|
Posted: Fri Jan 28, 2005 2:07 pm Post subject: |
|
|
I got the same error. |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12372 Topics: 75 Location: San Jose
|
|
Back to top |
|
|
Bithead Advanced
Joined: 03 Jan 2003 Posts: 550 Topics: 23 Location: Michigan, USA
|
Posted: Fri Jan 28, 2005 2:26 pm Post subject: |
|
|
Kolusu,
I think that this refers to OO COBOL access JVM parameters. The IBM sample is not OO so I don't see how this would fix the problem. We are not running Java on our mainframe.
|
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12372 Topics: 75 Location: San Jose
|
Posted: Fri Jan 28, 2005 2:36 pm Post subject: |
|
|
Bithead,
The apar also listed the macro IGZCXML in it. I thought it might be related. Can you post the complete error messages?
I just looked at the load-module of my pgm and I don't find any IGZCXML modules at all. I can only find references to IGZCBSO.
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12372 Topics: 75 Location: San Jose
|
Posted: Fri Jan 28, 2005 2:48 pm Post subject: |
|
|
Bithead,
After a bit digging I found that IGZCXML is actually a CSECT in the load module IGZCPAC which can be found in SYS1.SCEERUN.
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
Bithead Advanced
Joined: 03 Jan 2003 Posts: 550 Topics: 23 Location: Michigan, USA
|
Posted: Fri Jan 28, 2005 2:49 pm Post subject: |
|
|
IGZ0096C A load of module IGZCXML was unsuccessful.
From compile unit XMLSAMPL at entry point XMLSAMPL at compile unit offset +00000C1A at entry offset +00000C1A
at address 0B301BBA. |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12372 Topics: 75 Location: San Jose
|
Posted: Fri Jan 28, 2005 3:19 pm Post subject: |
|
|
Bithead,
Did you look at the load module IGZCPAC in SYS1.SCEERUN?
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
Bithead Advanced
Joined: 03 Jan 2003 Posts: 550 Topics: 23 Location: Michigan, USA
|
Posted: Fri Jan 28, 2005 3:41 pm Post subject: |
|
|
There is a CSECT called IGZCXMU but that's all. I have found an allocation for SCEEXML in SCEESAMP(CEEWALOC). Do you have this library? |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12372 Topics: 75 Location: San Jose
|
Posted: Fri Jan 28, 2005 3:53 pm Post subject: |
|
|
Bithead,
I also see an allocation for SCEEXML in SCEESAMP(CEEWALOC). I ran an amblist on IGZCPAC and found that IGZCXML is loaded as a part of the PTF UQ85364 which was found on this page
http://www-1.ibm.com/support/docview.wss?uid=isg1PQ80358
Code: |
IGZCXML SD 02DC8 E50 HLASM 04/02/27
IDENT 04/11/20 UQ85364
IGZCXMU SD 5EC68 3E1 HLASM 02/04/05
IDENT 02/04/05 RSI20952486
|
Also check this link for Table of compiler maintenance levels required for Debug Tool
http://www-1.ibm.com/support/docview.wss?uid=swg21180142
PTF UQ85364 was a part of Language Environment PTFs for Enterprise COBOL for z/OS runtime support
Hope this helps...
Cheers
kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
Bithead Advanced
Joined: 03 Jan 2003 Posts: 550 Topics: 23 Location: Michigan, USA
|
Posted: Fri Jan 28, 2005 4:05 pm Post subject: |
|
|
Thanks Kolusu, I will take a look at the APAR.
We don't use Debug Tool so we should be all set there. |
|
Back to top |
|
|
|
|