Hi,
I have the data like as below in the datasets.
I want to copy whenever the string "SQLCODE =" comes, I need to copy the above five lines including the SQLCODE= line.
Can any one help in this one.
Thanks in Advance,
Purush
Example data :
----------------
PAGE 1
--#SET MAXERRORS 03
***INPUT STATEMENT:
SELECT 'G10.TG10Y02_007' FROM G10.TG10Y02_007
FETCH FIRST 1 ROWS ONLY WITH UR;
SUCCESSFUL RETRIEVAL OF 0 ROW(S)
PAGE 1
***INPUT STATEMENT:
SELECT 'G10.TG10Y03_007' FROM G10.TG10Y03_007
FETCH FIRST 1 ROWS ONLY WITH UR;
SUCCESSFUL RETRIEVAL OF 0 ROW(S)
PAGE 1
***INPUT STATEMENT:
SELECT 'G13.TG13B11' FROM G13.TG13B11
FETCH FIRST 1 ROWS ONLY WITH UR;
SQLERROR ON SELECT COMMAND, PREPARE FUNCTION
RESULT OF SQL STATEMENT:
DSNT408I SQLCODE = -551, ERROR: S8Y3Y2 DOES NOT HAVE THE PRIVILEGE TO PERFORM
DSNT418I SQLSTATE = 42501 SQLSTATE RETURN CODE
DSNT415I SQLERRP = DSNXOSC SQL PROCEDURE DETECTING ERROR
DSNT416I SQLERRD = -10 0 0 -1 0 0 SQL DIAGNOSTIC INFORMATION
DSNT416I SQLERRD = X'FFFFFFF6' X'00000000' X'00000000' X'FFFFFFFF' X'000
INFORMATION