Hello,
I am trying to update a COBOL packed field via a SQL query in a C# application. Currently, the COBOL packed field is being stored in a character column (char(50)) in a MS SQL database.
COBOL Data Type = 4 Byte binary number (“PIC S9(9) COMP”):
I can use the following statement to extract the data. I am not sure on how to reverse this processes for data updates.
CAST(CAST(SUBSTRING({Column Name},{Start},4) AS VARBINARY(4)) AS BIGINT) AS {Alias_Name}
Any suggestions?
Thanks,
Brennan Mann