CCN5825 message while compiling the code.



Help for C/C++ for MVS, OS/390 C/C++, z/OS C/C++ and C/C++ Productivity Tools for OS/390

CCN5825 message while compiling the code.

Postby valeca » Fri Sep 30, 2022 12:18 am

Hi everyone,
After bringing the code from PC to Z/OS using IND$FILE, the compiler produces the next messages
CCN5825 (W) The character "\xba" is not allowed.
CCN5825 (W) The character "\xbb" is not allowed.
These characters are '[' and ']' in EBCDIC 037 codepage and are shown properly in ISPF.
I tried different EBCDIC 1047 codepage, but in the ISPF they look improperly, but the messages are still the same.
I read the previous post about this issue, but changing terminal type as advised didn't help
( forum-f12/topic4056.html )
I wonder what EBCDIC code page the C/C++ Z/OS compiler is using?
I tried different code pages for PC <->Host combinations, like
ANSI(WinLatin1)(1252) <-> English US(037) etc., and still getting same messages.
Any advise is appreciated.
Thanks!
valeca
 
Posts: 12
Joined: Wed Sep 28, 2022 3:37 am
Has thanked: 3 times
Been thanked: 0 time

Re: CCN5825 message while compiling the code.

Postby sergeyken » Fri Sep 30, 2022 1:42 am

There is a problem with incompatible character codes for square brackets. X'BA' and X'BB' are looking as square brackets on the screen, but not for C++ compiler...

The workaround is, using triplexes(?) if I remember correctly.
Replace all X'BA' (looking as '[') with '??(', and all X'BB' (looking as ']') with '??)'
Doesn't look attractive, but is working...

char line??(100??);
int array??( 1000, 20 ??);
Javas and Pythons come and go, but JCL and SORT stay forever.

These users thanked the author sergeyken for the post:
valeca (Fri Sep 30, 2022 10:02 am)
User avatar
sergeyken
 
Posts: 436
Joined: Wed Jul 24, 2019 10:12 pm
Has thanked: 7 times
Been thanked: 40 times

Re: CCN5825 message while compiling the code.

Postby valeca » Fri Sep 30, 2022 10:01 am

Thanks, Sergey. This seems to be the only way to do it.
In manual they are called trigraphs, and the suggestion is similar to yours.
Is any way to replace all occurrences of the '\xba' with '??(' in the code with a single command?
Thanks!
valeca
 
Posts: 12
Joined: Wed Sep 28, 2022 3:37 am
Has thanked: 3 times
Been thanked: 0 time

Re: CCN5825 message while compiling the code.

Postby sergeyken » Fri Sep 30, 2022 4:54 pm

valeca wrote:Is any way to replace all occurrences of the '\xba' with '??(' in the code with a single command?
Thanks!

While using ISPF Edit option, you can use the commands (both at once):
Change ALL X'BA' '??(' ; C ALL X'BB' '??)'


Some companies have installed their own command scripts, to allow applying any Edit subcommand to all members of the PDS at once.
I remember I used such command (from the Member List screen):
Global C ALL '[' '??('
Javas and Pythons come and go, but JCL and SORT stay forever.
User avatar
sergeyken
 
Posts: 436
Joined: Wed Jul 24, 2019 10:12 pm
Has thanked: 7 times
Been thanked: 40 times

Re: CCN5825 message while compiling the code.

Postby sergeyken » Fri Sep 30, 2022 5:05 pm

If a command like GLOBAL is not available, but you have hundreds or thousands of C-members, there is also batch solution available with only standard utilities: IEBPTPCH+SORT+IEBUPDTE, to do this task for the whole library in one pass.
Javas and Pythons come and go, but JCL and SORT stay forever.

These users thanked the author sergeyken for the post:
valeca (Fri Sep 30, 2022 9:45 pm)
User avatar
sergeyken
 
Posts: 436
Joined: Wed Jul 24, 2019 10:12 pm
Has thanked: 7 times
Been thanked: 40 times

Re: CCN5825 message while compiling the code.

Postby valeca » Fri Sep 30, 2022 9:44 pm

Sounds good. Thanks.
The company uses PF buttons to replace these chars, but replacing all at once is the way to go.
Thanks for sharing!
valeca
 
Posts: 12
Joined: Wed Sep 28, 2022 3:37 am
Has thanked: 3 times
Been thanked: 0 time

Re: CCN5825 message while compiling the code.

Postby valeca » Fri Sep 30, 2022 9:56 pm

sergeyken wrote:If a command like GLOBAL is not available, but you have hundreds or thousands of C-members, there is also batch solution available with only standard utilities: IEBPTPCH+SORT+IEBUPDTE, to do this task for the whole library in one pass.

Sergey, any chance to share JCL? Will save me time :mrgreen: Thanks.
valeca
 
Posts: 12
Joined: Wed Sep 28, 2022 3:37 am
Has thanked: 3 times
Been thanked: 0 time

Re: CCN5825 message while compiling the code.

Postby sergeyken » Fri Sep 30, 2022 10:37 pm

valeca wrote:
sergeyken wrote:If a command like GLOBAL is not available, but you have hundreds or thousands of C-members, there is also batch solution available with only standard utilities: IEBPTPCH+SORT+IEBUPDTE, to do this task for the whole library in one pass.

Sergey, any chance to share JCL? Will save me time :mrgreen: Thanks.

I did such manipulations several times in my life (not for square brackets in C++, but also global text update in PDS), when GLOBAL command was not available.

I don't have it with me right now (they all left at my previous companies), but I can reproduce it, after a while.

The total size of such JCL procedure is about 100 JCL lines, or so.
Javas and Pythons come and go, but JCL and SORT stay forever.
User avatar
sergeyken
 
Posts: 436
Joined: Wed Jul 24, 2019 10:12 pm
Has thanked: 7 times
Been thanked: 40 times

Re: CCN5825 message while compiling the code.

Postby valeca » Fri Sep 30, 2022 10:59 pm

Sounds promising :P Thanks!
valeca
 
Posts: 12
Joined: Wed Sep 28, 2022 3:37 am
Has thanked: 3 times
Been thanked: 0 time

Re: CCN5825 message while compiling the code.

Postby sergeyken » Fri Sep 30, 2022 11:01 pm

Another solution may be: to make only temporary updates of square brackets encoding at the time of compilation. In this case the source code will remain attractive for reading in the library, but is modified for C++ compiler needs just before its compilation. You can use either your own compilation procedures, or request modification of the common company-wide procedures.

This modification is fully backward compatible: those modules already prepared for using trigraphs will be handled seamlessly.

//SUPERCPP PROC SOURCE='library(member)'
//*=========================================================
//PREPARE  EXEC PGM=SORT
//SYSOUT   DD  SYSOUT=*
//SORTIN   DD  DISP=SHR,DSN=&SOURCE
//SORTOUT  DD  DISP=(NEW,PASS),SPACE=(TRK,(50,50)),DSN=&&NEWCODE
//SYSIN    DD  *
 SORT FIELDS=COPY
 OUTREC FINDREP=(INOUT=(C'[',C'??(',
                        C']',C'??)'))
 END
//*=========================================================
//CPP      EXEC PGM=your-C-compiler
// . . . . . . . . . . .
//SYSIN    DD  DISP=(OLD,DELETE),DSN=&&NEWCODE
// . . . . . . . .
//*=========================================================
//         PEND
Javas and Pythons come and go, but JCL and SORT stay forever.
User avatar
sergeyken
 
Posts: 436
Joined: Wed Jul 24, 2019 10:12 pm
Has thanked: 7 times
Been thanked: 40 times

Next

Return to C, C++

 


  • Related topics
    Replies
    Views
    Last post