Thread: DB2

Easytrieve load float to DB2 - S0C7 and B204 party

Started by Elena • user3 replies133 viewsLast activity 3 weeks ago
Post #1
0 votes
Elena
Reputation
391
Posts: 19
Joined: Apr 18, 2024, 9:30 AM
Posted: Jul 20, 2026, 8:18 AM

Incoming PS has signed decimals as 20-byte display (-123.456...). Target column is FLOAT.

Tried alpha host var, packed, numeric with MASK. Getting S0C7, B055, or B204 SQL-INVALID HOSTVAR DATATYPE depending on the attempt. Negative signs are the killer.

Anyone actually done float loads from Easytrieve?

Post #2
1 votes
Omar
Reputation
155
Posts: 12
Joined: Jan 7, 2025, 10:05 AM
Posted: Jul 20, 2026, 12:18 PM

We gave up on FLOAT from Easytrieve for messy display input. Land in DECIMAL or CHAR, then UPDATE with CAST in a SQL step. Negatives survived that path.

If you must stay in EZT, strip the sign into a flag, load absolute value, multiply by -1 in SQL.

Post #3
0 votes
Elena
Reputation
391
Posts: 19
Joined: Apr 18, 2024, 9:30 AM
Posted: Jul 21, 2026, 10:18 AM

CHAR staging table + CAST it is. Not pretty but it ships.

You must be signed in to reply to this thread