I am facing trouble with CLLE program while reading a PF which contains VARCHAR fields.
Below are the steps which were executed and observed.
1. A table EMPDTL is created (using 'Create Table') through transact SQL. The table contains the following fields -
a. EMPID - Numeric(6, 0)
b. FIRSTNM - Varchar (20)
c. LASTNM - Varchar (10)
2. Data is entered into EMPDTL.
EMPID - 1
FIRSTNM - Sam
LASTNM - Jones
3. When the table EMPDTL is viewed through Transact SQL, data appears perfect.
EMPID FIRSTNM LASTNM
1 Sam Jones
However, when the table is viewed using DSPPFM, 2 bytes of unreadable (like packed fields appears in DSPPFM view) characters shows in between the columns.
000001**Sam **Jones
Also, when I check table file properties using DSPFD, it shows record length = 40 instead of 36 (6 + 20 + 10).
4. As I try to read (RCVF) field FIRSTNM from a CLLE program, those unreadable characters appears as a prefix of the field value (&FIRSTNM = '**Sam').
I want to get rid of these unreadable characters while reading the value into a CL variable without using substring functions. Please advice.
Below are the steps which were executed and observed.
1. A table EMPDTL is created (using 'Create Table') through transact SQL. The table contains the following fields -
a. EMPID - Numeric(6, 0)
b. FIRSTNM - Varchar (20)
c. LASTNM - Varchar (10)
2. Data is entered into EMPDTL.
EMPID - 1
FIRSTNM - Sam
LASTNM - Jones
3. When the table EMPDTL is viewed through Transact SQL, data appears perfect.
EMPID FIRSTNM LASTNM
1 Sam Jones
However, when the table is viewed using DSPPFM, 2 bytes of unreadable (like packed fields appears in DSPPFM view) characters shows in between the columns.
000001**Sam **Jones
Also, when I check table file properties using DSPFD, it shows record length = 40 instead of 36 (6 + 20 + 10).
4. As I try to read (RCVF) field FIRSTNM from a CLLE program, those unreadable characters appears as a prefix of the field value (&FIRSTNM = '**Sam').
I want to get rid of these unreadable characters while reading the value into a CL variable without using substring functions. Please advice.
Comment