Attached is a table definition screen where I make new records in a existing table. I am asked: Attribute, Length, Table type and description.
I guess the Attribute would be the data type of whatever data I plan on putting inside this record? also, what is table type? Is this a as400 default screen or custom?
when I fill in the fields from this menu, a new record gets created in the ZCC table.
The fields I need to fill in are CCTABL, CCCODE, CCDESC, CCSDSC, CCNOT1, CCNOT2 which are a mix of chars and graphics.
I need to be able to convert CCSDSC, CCNOT1, CCNOT2 into integers (which I think I am doing correctly) but it is not getting converted...as seen in the SS below.
when I create the record, I have an option of numeric, or alphanumeric. I chose alphanumeric. could that be a reason why it isn't getting converted?
I guess the Attribute would be the data type of whatever data I plan on putting inside this record? also, what is table type? Is this a as400 default screen or custom?
when I fill in the fields from this menu, a new record gets created in the ZCC table.
The fields I need to fill in are CCTABL, CCCODE, CCDESC, CCSDSC, CCNOT1, CCNOT2 which are a mix of chars and graphics.
I need to be able to convert CCSDSC, CCNOT1, CCNOT2 into integers (which I think I am doing correctly) but it is not getting converted...as seen in the SS below.
when I create the record, I have an option of numeric, or alphanumeric. I chose alphanumeric. could that be a reason why it isn't getting converted?
Code:
DCL-DS ControlTable extname('ZCC') qualified END-DS; Exec SQL SELECT * Into :ControlTable FROM ZCC WHERE CCTABL = 'TIMCONTB' and CCCODE = :WrkRank; ModChar = %CHAR(ControlTable.CCSDSC); ResultChar = %CHAR(ControlTable.CCNOT1); SRunChar = %CHAR(ControlTable.CCNOT2); ZccMod = %DEC(ModChar:1:0); //errors out here during debug ZccResult = %DEC(ResultChar:1:0); ZccSingleRun = %DEC(SRunChar:1:0) Message ID . . . . . . : RNX0105 Message . . . . : A character representation of a numeric value is in error. Cause . . . . . : A conversion from character to numeric found data that was not valid. Recovery . . . : Correct the numeric data.