C compling Error on IBM 390

S

shiling zhang

I have a C program that is complied fine under DOS and UNIX.

However, the same C program has the following compling error under IBM 390.

TIA.


----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+---->
42 |double dot(int n, double a[], double b[])
===========> ..........................ab..........cd..........................
*=ERROR===========> a - CBC3191 The character \xba is not a valid C source char
*=ERROR===========> b - CBC3191 The character \xbb is not a valid C source char
*=ERROR===========> c - CBC3191 The character \xba is not a valid C source char
*=ERROR===========> d - CBC3191 The character \xbb is not a valid C source char
 
M

Mike Wahler

shiling zhang said:
I have a C program that is complied fine under DOS and UNIX.

However, the same C program has the following compling error under IBM 390.
TIA.


----+----1----+----2----+----3----+----4----+----5----+----6----+----7----
+---->
42 |double dot(int n, double a[], double b[])
===========> ...........................ab..........cd..........................
*=ERROR===========> a - CBC3191 The character \xba is not a valid C source char
*=ERROR===========> b - CBC3191 The character \xbb is not a valid C source char
*=ERROR===========> c - CBC3191 The character \xba is not a valid C source char
*=ERROR===========> d - CBC3191 The character \xbb is not a valid C
source char

Looks like you have different character sets between
DOS/UNIX and IBM 390 (I'm pretty sure the 390 uses EBCDIC.)
You probably need to translate your source file to EBCDIC
for the 390 to eat.

This a platform specific issue, so further more specific
help should be sought in e.g. a forum about your target
platforms and operating systems.


-Mike
 
L

Lew Pitcher

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

shiling said:
I have a C program that is complied fine under DOS and UNIX.

However, the same C program has the following compling error under IBM 390.

TIA.


----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+---->
42 |double dot(int n, double a[], double b[])
===========> ..........................ab..........cd..........................
*=ERROR===========> a - CBC3191 The character \xba is not a valid C source char
*=ERROR===========> b - CBC3191 The character \xbb is not a valid C source char
*=ERROR===========> c - CBC3191 The character \xba is not a valid C source char
*=ERROR===========> d - CBC3191 The character \xbb is not a valid C source char

The C/390 compiler usually wants it's source code in EBCDIC-US, which
doesn't have square brackets. You'll have to recode these as trigraphs,
and make sure that you are using the correct EBCDIC. (That you could
type a square-bracket tells me that you're not using EBCDIC-US; you're
probably using coded characterset EBCDIC-INT or one of the national
EBCDIC charactersets).

- --

Lew Pitcher, IT Consultant, Enterprise Data Systems
Enterprise Technology Solutions, TD Bank Financial Group

(Opinions expressed here are my own, not my employer's)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (MingW32)

iD8DBQFBUFueagVFX4UWr64RAim9AJ96Lo3GM1y+VM54DdVp93RvGx8gagCeIYNr
yCe5lpmVF41J830dlOBaGS4=
=crf2
-----END PGP SIGNATURE-----
 
D

Dan Pop

In said:
I have a C program that is complied fine under DOS and UNIX.

However, the same C program has the following compling error under IBM 390.

----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+---->
42 |double dot(int n, double a[], double b[])
===========> ..........................ab..........cd..........................
*=ERROR===========> a - CBC3191 The character \xba is not a valid C source char
*=ERROR===========> b - CBC3191 The character \xbb is not a valid C source char
*=ERROR===========> c - CBC3191 The character \xba is not a valid C source char
*=ERROR===========> d - CBC3191 The character \xbb is not a valid C source char

This looks like typical EBCDIC code page nonsense. The code was converted
from ASCII to EBCDIC using a different code page than that expected by the
C compiler.

Try finding a local guru that can show you how to make the conversion
from ASCII to EBCDIC in such a way that the C compiler can read your
code properly (or, vice versa, how to tell the C compiler what code page
to use).

As a last resort, use digraphs (if available) or trigraphs for all
the characters that the C compiler fails to recongnise.

Dan
 
A

A. Bolmarcich

I have a C program that is complied fine under DOS and UNIX.

However, the same C program has the following compling error under IBM 390.

TIA.


----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+---->
42 |double dot(int n, double a[], double b[])
===========> ..........................ab..........cd..........................
*=ERROR===========> a - CBC3191 The character \xba is not a valid C source char
*=ERROR===========> b - CBC3191 The character \xbb is not a valid C source char
*=ERROR===========> c - CBC3191 The character \xba is not a valid C source char
*=ERROR===========> d - CBC3191 The character \xbb is not a valid C source char

The characters \xba and \xbb are square brackets in only some code pages.
If the compiler has an option to specify what code page is used by the
source file, specify code page 37.

Because the default code page being used by the compiler is 1047, in which
\xad and \xbd are square brackets, changing \xba to \xad and \xbb to \xbd
may work.
 
K

Keith Thompson

Lew Pitcher said:
The C/390 compiler usually wants it's source code in EBCDIC-US, which
doesn't have square brackets. You'll have to recode these as trigraphs,
and make sure that you are using the correct EBCDIC. (That you could
type a square-bracket tells me that you're not using EBCDIC-US; you're
probably using coded characterset EBCDIC-INT or one of the national
EBCDIC charactersets).

It's likely that the environment also provides a solution other than
trigraphs.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top