problem with Uppercase XMLCHAR RESULT when using DB2 statements

This is a discussion on problem with Uppercase XMLCHAR RESULT when using DB2 statements within the pl1 forums in Programming Languages category; 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'; ...

Go Back   Application Development Forum > Programming Languages > pl1

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 08-21-2008, 03:32 AM
oktg
Guest
 
Default problem with Uppercase XMLCHAR RESULT when using DB2 statements

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
Reply With Quote
  #2  
Old 08-21-2008, 12:06 PM
Daniel Weigl
Guest
 
Default Re: problem with Uppercase XMLCHAR RESULT when using DB2 statements

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

Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 05:06 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.