| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| Hi, I wonder if somebody could help me with following problem: I want to use the PLI XMLCHAR function to deliver the produced XML string with elements in Mixed Case. In order to achieve this I declared the structure in my PL/1 source (CAPS OFF) as: dcl 1 Message unal, 3 Header, 5 Description char(43) init(''), 3 Transaction, 5 Pl_Seqnr pic'(10)9', 5 Pl_Fb_15 fixed bin(15) init(1000), 5 Pl_Fd_52 fixed dec(5,2) init(999.99), 5 Pl_Action char(3), 5 Pl_Message1 char(2000) varying, 5 Pl_Message2 char(2000) varying, 5 Pl_Length pic'(5)9'; MESSAGE.DESCRIPTION = 'MIJNDESCR'; MESSAGE.PL_SEQNR = 9999999999; MESSAGE.PL_ACTION = 'ACT'; MESSAGE.PL_MESSAGE1 = 'MESSAGE1_SAMPLE_SHORT_TEXT'; MESSAGE.PL_MESSAGE2 = 'MESSAGE1_SAMPLE_LONG_TEXT'; MESSAGE.PL_LENGTH = LENGTH(MESSAGE.PL_MESSAGE1) + LENGTH(MESSAGE.PL_MESSAGE2); ZRS05AP.PAYLOAD.DATA_LENGTH = XMLCHAR(MESSAGE, ADDR(ZRS05AP.PAYLOAD.DATA), LENGTH(ZRS05AP.PAYLOAD.DATA)); PUT SKIP LIST('ZRS05AP.PAYLOAD.DATA = '||ZRS05AP.PAYLOAD.DATA); Then i compiled my code using the following options: // PARM=('+DD:KLMOPT', // 'A(F),C,NEST,NIS,OBJ,OF,OPT(2),AG,X(F),XML(CASE(AS IS))', // 'PP(MACRO("CASE(ASIS)"))', // 'MAR(2,71,1)') and this correctly yields: ZRS05AP.PAYLOAD.DATA = Message><Header><Description>MIJNDESCR</ Description....... However when I introduce DB2 calls to the program and consequently use DSNHPC as preprocessor JCL step then in this phase the structure declare is converted to uppercase before it is passed to the PLI compile step and consequently the compile options XML(CASE(ASIS)) and 'PP(MACRO("CASE(ASIS)")) make no sense anymore and the output of the XMLCHAR function is all uppercase. Does anybody know how I can force the DSNHPC step to leave the PLI structure declare in mixed case ? Many thanks in advance |
|
#2
| |||
| |||
| Hi oktg, FAIK this cannot be done with the DB/2-preprocessor, you mut use the coprocessor (compiler option PP(SQL)) Daniel oktg schrieb: > Hi, > > I wonder if somebody could help me with following problem: > > I want to use the PLI XMLCHAR function to deliver the produced XML > string with elements in Mixed Case. In order to achieve this I > declared the structure in my PL/1 source (CAPS OFF) > as: > > dcl 1 Message unal, > 3 Header, > 5 Description char(43) init(''), > 3 Transaction, > 5 Pl_Seqnr pic'(10)9', > 5 Pl_Fb_15 fixed bin(15) init(1000), > 5 Pl_Fd_52 fixed dec(5,2) init(999.99), > 5 Pl_Action char(3), > 5 Pl_Message1 char(2000) varying, > 5 Pl_Message2 char(2000) varying, > 5 Pl_Length pic'(5)9'; > > MESSAGE.DESCRIPTION = 'MIJNDESCR'; > MESSAGE.PL_SEQNR = 9999999999; > MESSAGE.PL_ACTION = 'ACT'; > MESSAGE.PL_MESSAGE1 = 'MESSAGE1_SAMPLE_SHORT_TEXT'; > MESSAGE.PL_MESSAGE2 = 'MESSAGE1_SAMPLE_LONG_TEXT'; > MESSAGE.PL_LENGTH = LENGTH(MESSAGE.PL_MESSAGE1) + > LENGTH(MESSAGE.PL_MESSAGE2); > > ZRS05AP.PAYLOAD.DATA_LENGTH = XMLCHAR(MESSAGE, > ADDR(ZRS05AP.PAYLOAD.DATA), > LENGTH(ZRS05AP.PAYLOAD.DATA)); > > > PUT SKIP LIST('ZRS05AP.PAYLOAD.DATA = '||ZRS05AP.PAYLOAD.DATA); > > Then i compiled my code using the following options: > > // PARM=('+DD:KLMOPT', > // 'A(F),C,NEST,NIS,OBJ,OF,OPT(2),AG,X(F),XML(CASE(AS IS))', > // 'PP(MACRO("CASE(ASIS)"))', > // 'MAR(2,71,1)') > > and this correctly yields: > > ZRS05AP.PAYLOAD.DATA = Message><Header><Description>MIJNDESCR</ > Description....... > > However when I introduce DB2 calls to the program and consequently use > DSNHPC as preprocessor JCL step then in this phase the structure > declare is converted to uppercase before it is passed to the PLI > compile step and consequently the compile options XML(CASE(ASIS)) and > 'PP(MACRO("CASE(ASIS)")) make no sense anymore and the output of the > XMLCHAR function is all uppercase. > > Does anybody know how I can force the DSNHPC step to leave the PLI > structure declare in mixed case ? > > Many thanks in advance |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.