Question & Answer
Question
In Version 8, I am receiving a syntax error on the following lines of C code in SYSIN:
#include
Cause
The precompile step is being run with a DECP with CCSID(500), but the C program contains square brackets in CCSID 1047 codepoints ('AD'x, 'BD'x):
OPTIONS SPECIFIED: HOST(CPP),SOURCE,XREF,MARGINS(1,80),STDSQL(NO)
OPTIONS USED - SPECIFIED OR DEFAULTED
APOST
APOSTSQL
ATTACH(TSO)
CCSID(500) <---- defaulted from DECP
NOPADNTSTR
CONNECT(2)
FLAG(I)
HOST(CPP)
FLOAT(S390)
LINECOUNT(60)
MARGINS(1,80)
NEWFUN(YES)
ONEPASS
OPTIONS
PERIOD
SOURCE
STDSQL(NO)
SQL(DB2)
XREF
struct dsnMsg {short len; char txt*7**132*;}
In the line shown above, the *'s represent square brackets with hex representation 'AD'x and 'BD'x (CCSID 1047 codepoints).
The message, " DSNH007I E DSNHTOKR LINE 5 COL 35 ILLEGAL CHARACTER IGNORED: "I" ('AD'X)," explains that the character that cannot be recognized in CCSID 500 is the left square bracket in CCSID 1047.
Answer
Use the CCSID(1047) precompile option to precompile this program.
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21170680