Posted: Thu Oct 28, 2004 12:42 am Post subject: Quikjob abended with U3336
Hi all,
i have a file in which the first 13 bytes are of alphanumeric values and the next 4 bytes are of numeric values. The last four bytes is an error code. i am interested in extracting those records in which the error code 1015 comes immediatly after 1013 and also the first 13 bytes for the two records are the same. I wrote a quick job for this but it is abending with U3336. I tried to get some help on this abend from the manuals but couldnt find it. This is the sample input and output i want.
bytes 14-17 can range from 1001 to 1020. There may or may not be 1 duplicate for first 13 bytes(not more than one if there is a duplicate present).
*************************************************************
quick job which i used for this purpose.
*************************************************************
Code:
EQU CUSTDA INF1-13
EQU ERRORC INF14-17
EQU PCUSTDA WST1-13 ZERO
EQU PERRORC WST14-17 ZERO
200 GET INF ATEND 800
IF ERRORC EQ C'1013'
GOTO 250
ELSE
GOTO 200
ENDIF
250 IF ERRORC EQ C'1013'
MOVE CUSTDA TO PCUSTDA
MOVE ERRORC TO PERRORC
GOTO 350
ENDIF
350 GET INF ATEND 800
IF ERRORC EQ C'1015'
GOTO 400
ELSE
GOTO 200
ENDIF
400 IF CUSTDA EQ PCUSTDA
MOVE INF1-80 TO OFA1-80
WRITE OFA
GET INF ATEND 800
IF ERRORC EQ C'1013'
GOTO 250
ELSE
GOTO 200
ENDIF
This is my first quikjob. As this didnt work, i used rexx and got the result. i am attaching the rexx code also so as to make my requirement clear. Please tell me what is wrong with the quick job.
*************************************************************
rexx
*************************************************************
DO I=1 TO PROC.0
PROC.I = STRIP(PROC.I)
ERROR_CODE= SUBSTR(PROC.I,14,4)
CUST_DEM_APP = SUBSTR(PROC.I,1,14)
IF ERROR_CODE = '1013' THEN
DO
K = K + 1
PREV_CUST_DEM_APP = CUST_DEM_APP
PREV_ERROR_CODE = ERROR_CODE
END
IF ERROR_CODE = '1015' THEN
DO
IF (CUST_DEM_APP = PREV_CUST_DEM_APP & PREV_ERROR_CODE = '1013') THEN
L = L + 1
END
END
SAY 'NO OF RECORDS WITH ERROR CODE 1013 IS ' K
SAY 'NO OF REPEATED ERROR RECORDS IS ' L
*************************************************************
Please note that in this rexx i am trying to find out the number of such cases. but in quikjob i will have to write those cases into an output file also.
Joined: 26 Nov 2002 Posts: 12377 Topics: 75 Location: San Jose
Posted: Thu Oct 28, 2004 8:05 am Post subject:
Bademiya,
Quote:
bytes 14-17 can range from 1001 to 1020. There may or may not be 1 duplicate for first 13 bytes(not more than one if there is a duplicate present).
I am not an expert in QUIKJOB or rexx, so I managed to do it in sort. As you mentioned earlier your error code range is 1001 to 1020. And you wanted to find out if there is record with 1015 which had a an error code of 1013 in prior record.
I used the concept of summing the error code. so if we sum 1013 and 1015 we would end up with 2028. Using an include cond on the OUTFIL we can just include those records.
However a sum of 1028 can be achieved with many possible combinations such as
Hi Kolusu,
Thanks for the solution. It worked fine. When i got the problem i thought of every thing else other than sort, which turned out to be the most effective and fastest way(it took so long for rexx to process the same file). Thank you very much.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum