*DECK HSCAND USETEXT NIPDEF USETEXT ACB USETEXT ACNB USETEXT ACNT USETEXT APPSTAT USETEXT DUMPFLG USETEXT MSGIDX USETEXT OVERLAY USETEXT PARAMS PROC HSCAND(ACNALN,LIST,FOUND,ACNBADR); # SCAN FOR DATA # STARTIMS; # *1DC HSCAND * * 1. PROC NAME AUTHOR DATE * HSCAND E. GEE 85/04/10 * * 2. FUNCTIONAL DESCRIPTION. * SCAN FOR UPLINE DATA QUEUED FOR APPLICATION. * * 3. METHOD USED. * IF GETTING DATA FROM LIST, * SCAN CONNECTION DATA RING FOR ACNB WITH MATCHING LIST * NUMBER. * ELSE (GETTING DATA FOR A SPECIFIC CONNECTION), * CHECK FOR DATA RING IN CORRESPONDING ACNB. * * 4. ENTRY PARAMETERS. * ACBADDR ADDRESS OF APPLICATION CONTROL BLOCK * ACNALN APPLICATION LIST OR CONNECTION NUMBER * LIST TYPE OF CALL * TRUE = SCAN FOR DATA ON LIST ACNALN * FALSE = SCAN FOR DATA ON CONNECTION ACNALN * * 5. EXIT PARAMETERS. * FOUND RESULT OF SEARCH * TRUE = FOUND MSG TO DELIVER * FALSE = NO MSG FOUND TO DELIVER * ACNBADR ADDRESS OF ACNB CONTAINING DATA TO DELIVER * * 6. COMDECKS CALLED AND SYMPL TEXTS USED. * ACB APPLICATION CONTROL BLOCK * ACNB APPLICATION CONNECTION BLOCK * ACNT APPLICATION CONNECTION TABLE * APPSTAT NETWORK WORKLIST PROCESSING TABLE * DUMPFLG REASON CODES FOR DUMPING NIP-S FIELD LENGTH * MSGIDX DAYFILE MESSAGE CODES * NIPDEF CONSTANT DEFINITIONS * OVERLAY OVERLAY PROCESSING COMMON BLOCK * PARAMS OVERLAY PARAMETER PASSING COMMON BLOCK * * 7. ROUTINES CALLED. * NONE * * 8. DAYFILE MESSAGES. * NONE # STOPIMS; # INPUT VARIABLES # ITEM ACNALN; # APPLICATION LIST/CONNECTION NO# ITEM LIST B; # LIST OR CONNECTION TYPE CALL # # OUTPUT VARIABLES # ITEM FOUND B; # RESULT OF SEARCH # ITEM ACNBADR; # ADDRESS OF ACNB IF FOUND MSG # XREF BEGIN PROC OVLCALL; # LOAD AND EXECUTE OVERLAY # PROC XTRACE; # TRACE PROCEDURE CALL # END # LOCAL VARIABLES # ITEM ENDSEARCH B; # SEARCH ACNB LOOP TERMINATOR # ITEM I; # LOOP INDUCTION VARIABLE # CONTROL IFEQ DEBUG,1 ; ITEM PNAME C(10) = "HSCA"; CONTROL FI; #**********************************************************************# CONTROL EJECT; BEGIN CONTROL IFEQ DEBUG,1 ; XTRACE("HSCND") ; CONTROL FI; P = ACBADDR; # ADDRESS OF ACB # FOUND = FALSE; # ASSUME NO MSG WILL BE FOUND # IF LIST THEN # GET FROM LIST TYPE CALL # BEGIN IF ACBLSTBLKS[0] NQ 0 THEN # MAY BE DELIVERABLE DATA # BEGIN P = ACBCDRP[0]; # ACNB IN CONNECTION DATA RING # ENDSEARCH = FALSE; # INITIALIZE LOOP TERMINATOR # FOR I = I WHILE NOT ENDSEARCH DO # SCAN FOR DATA ON LIST # BEGIN IF (ACNALN EQ ACNBALN[0]) AND # LIST NUMBERS MATCH # (NOT ACNBLO[0]) AND # NOT LIST OFF # (NOT ACNBTLO[0]) # NOT TEMPORARY LIST OFF # THEN # FOUND ACNB WITH DATA # BEGIN CONTROL IFEQ DEBUG,1; IF ACNBDRFP[0] EQ 0 THEN # NO DATA QUEUED TO THIS ACNB # BEGIN DMPFLG = DHSCAN1; # REASON CODE FOR DUMPING FL # PARAMS1 = DFMSG01; # NIP FATAL ERROR PROC=XXXX. # PARAMS6 = PNAME; # PROC NAME = HSCA # OVLNAME = XERRMSGP; OVLCALL; END CONTROL FI; FOUND = TRUE; # HAVE DATA TO DELIVER TO APP # ENDSEARCH = TRUE; # TERMINATE FOR LOOP # END ELSE # ACNB IS ON DIFFERENT LIST # BEGIN P = ACNBCDRFP[0]; # NEXT ACNB IN CON DATA RING # IF P EQ ACBCDRP[0] THEN # CHECKED EVERY ACNB IN CDR # BEGIN ENDSEARCH = TRUE; # TERMINATE FOR LOOP # END END END END END ELSE # SEARCH FOR DATA ON CONNECTION # BEGIN P = ACBACNT[0]; # ADDR OF APP CONNECTION TABLE # P = ACNTACNB[ACNALN+ACNTHSIZE-ACNTMINACN[0]]; IF ACNBDRFP[0] NQ 0 THEN # DATA AVAIL ON THIS CONNECTION # BEGIN FOUND = TRUE; END END ACNBADR = P; RETURN; END TERM