Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SPUFI: LOCATE ERROR LINE

Status
Not open for further replies.

JohnYingling

Programmer
Mar 24, 2001
3,742
US
I got sick and tired of looking for this SPUFI error so I did some QW lookups and some experimenting and determined that the 5th felid of the DSNT416I message is the relative offset of the 1st character of the error counting only 72 columns per line in TSO.
DSNT408I SQLCODE = -199, ERROR: ILLEGAL USE OF KEYWORD AND. TOKEN + - A
ORDER WAS EXPECTED
DSNT418I SQLSTATE = 42601 SQLSTATE RETURN CODE
DSNT415I SQLERRP = DSNHPARS SQL PROCEDURE DETECTING ERROR
DSNT416I SQLERRD = 506 0 0 -1 1668 0 SQL DIAGNOSTIC INFORMATION

The offset is from the start of the statement in error, i.e. since the last semi-colon if any.

My error was at 1668 and 1668 / 72 is 23 plus 12.
000001 SET SCHEMA = 'GDBA';
000002 SET SCHEMA = 'GDB2';
000003 SELECT PERSONAL_ID ID

000024 AND SE.EXCPT_TRIP_NBR = 2
000025 AND EXCPT_RLSE_LOC = EV.EMPL_IN_SIGNOFF_LOC)
000026 AND EXCPT_DUTY_CD NOT IN ('SBH','SBK','SBN','SBP')

So the ”AND” in error is on line (3 + 23) plus 12 characters and looking back I see that the parentheses after EV.EMPL_IN_SIGNOFF_LOC is the error.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top