¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Re: COBOL in TK4-: Handling Signed Numbers


 

On 1/6/21 2:33 PM, Patrik Schindler wrote:
Hello,
I have a sequential file with records being fed to it via external card reader. Works very well. I want to do some statistics with the data, so I want to use the (very old) COBOL compiler delivered with TK4-. I struggle with the format for getting the number parsed in the correct way in pos. 18 - 25.
Format:
* 1 10 20 30 40 50
* +---+----+----+----+----+----+----+----+----+----+
* Jan 6 17:03:30 0003.10 4.8 166039
* Jan 6 17:08:05 -0002.20 3.5 9007
Patrik,

As others have said, the MVT COBOL compiler we have does not implement much in the way of sign handling for fields. A very long time ago I wrote some field pre/post processing routines for use with COBOL/CICS programs. One of these may help you with identifying the leading sign and converting the field to a packed field: jaymoseley.com/hercules/misc_pgms/miscpgms.htm

Join [email protected] to automatically receive all group messages.