Decimal Data Error
From: Denis Robitaille To: All
We are about to migrate a lot of files in native mode (externally defined). But several of them have blanks instead of zeroes in numeric fields. We do not want to compile our program with ignore decimal data error. We would like to avoid writing one program per file to check and correct those values. Is there an easy way to change those blanks to zeros? One idea is to copy the file using the Copy file (CPYF) command with FMTOPT(*NOCHK). Then we'd run a very simple program (5) to correct the data
We are about to migrate a lot of files in native mode (externally defined). But several of them have blanks instead of zeroes in numeric fields. We do not want to compile our program with ignore decimal data error. We would like to avoid writing one program per file to check and correct those values. Is there an easy way to change those blanks to zeros? One idea is to copy the file using the Copy file (CPYF) command with FMTOPT(*NOCHK). Then we'd run a very simple program (Figure 5) to correct the data
We would compile this program to ignore decimal data error. Would this work? Does anyone know of a better way?
From: Eric Hill To: Denis Robitaille
An even better approach is shown in 6. You do need to compile this with ignore decimal data error.
An even better approach is shown in Figure 6. You do need to compile this with ignore decimal data error.
TechTalk: Decimal Data Error
Figure 5 Program to Fix Decimal Data Errors
... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 FFILE UF E DISK C READ FILE LR C NLR WRITEFILE
TechTalk: Decimal Data Error
Figure 6 A Better, Shorter Program
... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 FFILE UPE E DISK C UPDATFILE
LATEST COMMENTS
MC Press Online