Hello all,
I have a table with the field CCSDSC. It is of type graphic,
I am using this in a CLP program like so:
the ADDMBXPGM command has 2 parameters, &CHCCSDC and &CCCODE. CCCODE is a CHAR, so that is not causing any problems, but CCSDSC is a graphic, and even though I am using CHGVAR to convert it into CHAR, it is still giving me a value in graphic (attached SS of the value). What am I doing wrong here? Any help would be appreciated!
EDIT: in the job log, I see that it passes in the correct parameter from the ZCC table but in USC2 form...I have attached a screenshot (some things masked)
so I guess all I need to do is to convert this USC2 to normal characters...I tried CHGVAR VAR(&CHCCSDSC) VALUE(%CHAR(&CCSDSC)) but it says built in function %CHAR is not a valid...Please help
I have a table with the field CCSDSC. It is of type graphic,
Code:
CCSDSC GRAPHIC 15 30 119 Both Short Description Field text . . . . . . . . . . . . . . . : Short Description Coded Character Set Identifier . . . . . : 13488 UCS2 or Unicode conversion . . . . . . . : *CONVERT
Code:
DCLF FILE(*LIBL/ZCC) ALWGRAPHIC(*YES) DCL &CHCCSDSC *CHAR OVRDBF FILE(ZCC) SHARE(*YES) OPNQRYF FILE((ZCC)) QRYSLT('CCTABL = "EDIASNCT"') DOWHILE COND('1') RCVF CHGVAR VAR(&CHCCSDSC) VALUE(&CCSDSC) // my attempt to convert to CHAR MONMSG MSGID(CPF0864) EXEC(LEAVE) SBMJOB CMD(CALL ADDMBXPGM (&CHCCSDSC &CCCODE)) + JOBQ(*LIBL/EDIASNCLJQ) ENDDO CLOF OPNID(ZCC)
EDIT: in the job log, I see that it passes in the correct parameter from the ZCC table but in USC2 form...I have attached a screenshot (some things masked)
so I guess all I need to do is to convert this USC2 to normal characters...I tried CHGVAR VAR(&CHCCSDSC) VALUE(%CHAR(&CCSDSC)) but it says built in function %CHAR is not a valid...Please help
Comment