Good morning, I have a scan program that uses a scanner and a display file. The record format gets written every 30 seconds with an updated time. The scanner waits for something to scan then delivers it to the screen to get processed.
I check on the write of the display format for any errors. If there is one, I capture it and write it to a log file. Yesterday one of the scanning jobs had an issue and wrote over 9 million error records to my log file. The error I captured was 1299 with the scantype = 'WRITE' with the same timestamp. I get this by capturing the error using %STATUS. The CPF1299 explanation doesn't seem to fit what I am doing here so I wanted to see if there was more to it. I will be putting a counter on this so it only writes a certain amount of times then ends the job.
Here is part of my code:
c Dou *INKA
c
c clear SCANLR
c
C TIME TIMDAT 12 0
C MOVEL TIMDAT stime 6 0
C MOVE TIMDAT sdate 6 0
c
C WRITE(e) TMC003R1
c
* Check for error
c If %error
c eval scandate =
c %dec(%char(%date():*iso0):8:0)
c eval SCANTIME = %Dec(%time():*HMS)
c eval SCANID = ' '
c eval SCANERR = %Status()
c eval SCANTYPE = 'WRITE'
c eval SCANJOB = jobnam
C eval SCANPORT = 0
C eval SCANCOMP = ' '
C eval SCANDIV = ' '
C eval SCANPTYPE = ' '
c eval SCANNAME= ' '
c write SCANLR
c iter
c Endif
*
C READ(e) TMC003D
*
C IF %error
c* If screen was idle for waitrcd time, redisplay, clear all fields at 30 sec
c If %status = 01331 and @OUTID = SIDNUM
c If count >= 4
C MOVE *BLANKS @NAME
C MOVE *BLANKS @IDNUM
C MOVE *BLANKS SIDNUM
C MOVE *BLANKS @OUTID
C Z-ADD 0 @DATE
C Z-ADD 0 @TIME
. . . . . . . . .
Any input would be appreciated.
Thank you.
I check on the write of the display format for any errors. If there is one, I capture it and write it to a log file. Yesterday one of the scanning jobs had an issue and wrote over 9 million error records to my log file. The error I captured was 1299 with the scantype = 'WRITE' with the same timestamp. I get this by capturing the error using %STATUS. The CPF1299 explanation doesn't seem to fit what I am doing here so I wanted to see if there was more to it. I will be putting a counter on this so it only writes a certain amount of times then ends the job.
Here is part of my code:
c Dou *INKA
c
c clear SCANLR
c
C TIME TIMDAT 12 0
C MOVEL TIMDAT stime 6 0
C MOVE TIMDAT sdate 6 0
c
C WRITE(e) TMC003R1
c
* Check for error
c If %error
c eval scandate =
c %dec(%char(%date():*iso0):8:0)
c eval SCANTIME = %Dec(%time():*HMS)
c eval SCANID = ' '
c eval SCANERR = %Status()
c eval SCANTYPE = 'WRITE'
c eval SCANJOB = jobnam
C eval SCANPORT = 0
C eval SCANCOMP = ' '
C eval SCANDIV = ' '
C eval SCANPTYPE = ' '
c eval SCANNAME= ' '
c write SCANLR
c iter
c Endif
*
C READ(e) TMC003D
*
C IF %error
c* If screen was idle for waitrcd time, redisplay, clear all fields at 30 sec
c If %status = 01331 and @OUTID = SIDNUM
c If count >= 4
C MOVE *BLANKS @NAME
C MOVE *BLANKS @IDNUM
C MOVE *BLANKS SIDNUM
C MOVE *BLANKS @OUTID
C Z-ADD 0 @DATE
C Z-ADD 0 @TIME
. . . . . . . . .
Any input would be appreciated.
Thank you.
Comment