STL Crashes Comet


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]

Posted by Grant Foraker on January 07, 2019 at 09:59:52:

Wrote this to count the number of employees in a job. Thought I'd follow pre-POSITION style of code.

==============================================================
GetJobEmployeeCount:
LET JobEmployeeCount = 0
LET SORTKEY$ = PJOBNO$

LET MBMSG$ = 'A ' + PJOBNO$
MSGBOX MBMSG$

LET STLDATA$ = stlGet(PDER12STL, SORTKEY$, EXCP = GJC70) ! POSITION TO JOB
GJC10:
LET STLDATA$ = stlRead(PDER12STL)

LET MBMSG$ = 'C ' + STLDATA$
MSGBOX MBMSG$

IF SUB(STLDATA$,1,4) NE PJOBNO$ GOTO GJC90 ! END OF JOB
LET JobEmployeeCount = JobEmployeeCount + 1

MSGBOX 'D'

stlNext(PDER12STL) EXCP = GJC80 ! ADVANCE STL POINTER
GOTO GJC10
GJC70:

LET MBMSG$ = 'B ' + STR(EXCP)
MSGBOX MBMSG$

IF EXCP NE 50 GOTO ProgramError ! E50 is E32 for STL
stlNext(PDER12STL) EXCP = GJC80 ! ADVANCE STL POINTER
GOTO GJC10
GJC80:

LET MBMSG$ = 'E ' + STR(EXCP)
MSGBOX MBMSG$

IF EXCP EQ 2 GOTO GJC90 ! END OF STL
GOTO ProgramError
GJC90:
RETURN
========================================================

Program gets to "A" and then "B". Comet was bent, folded, stapled and mutilated at the "stlRead(PDER12STL)". Tried "C" in front and it got there OK.

Since the number of records in the STL is usually under a few hundred, I rewrote the routine to read from front to back and count the matches.


Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

What is the name of the main Signature System's Product?  

Comments:

Optional Link URL:
Link Title:
Optional Image URL:

You may attach up to 5 files to your followup (see below):





Each file can be a maximum of 1MB in length Uploaded files will be purged from the server on a regular basis.


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]