Last Saturday, after:
> It takes about 4 lines of code, and no intrinsic calls are required:
> let (WHATEVER) = <your timeout value in seconds>;
> file(control) FILENAME,code=4,parm=WHATEVER;
> <<note: no parentheses around the variable>>
> find(serial) FILENAME,list=(...),status;
> if status = 22 then <<the read timed out>>
> (this is off the top of my head, so the usual disclaimers apply)
Steve asked me to:
> ... grab the INVIPC-read code block out of BLINVIPC.BASELINE;
> I think it's a little simpler than the code in DOCIPC.
.... I've been having more than the usual fun lately, so just noticed
I left this in "pending".... Anyway, four days late but for whatever
it's still worth if anything: From our BUINVIPC.BASELINE.XXXX:
Ken Sletten
=====================================
........... SNIP other code .......
LET (TV)=1;
LOOP:
............. SNIP other code .........
MOVE (RECTYP) = " ";
FILE(CONTROL) INVIPC, CODE=45, PARM=TV;
<<extended wait: code=45, parm=1>>
FILE(CONTROL) INVIPC, CODE=6; <<post EOF status>>
GET INVIPC,LIST=(RECTYP,PERUPD,DATUPD,TIMUPD,PARTID,DOC,CONDD,RI),
STATUS;
IF STATUS = -1 THEN GO TO LOOP
ELSE IF STATUS <> 0 THEN DO
LIST ERROR; LET (ERROR)=STATUS;
DISPLAY "FILE ERROR ON INVIPC":ERROR;
EXIT;
DOEND;
========================================
|