*DECK HPGETMM USETEXT NIPDEF USETEXT ACB USETEXT ACNT USETEXT APPSTAT USETEXT AHEADER USETEXT AWLNTRY USETEXT DBGBUF USETEXT DRHDR USETEXT GETMM USETEXT OVERLAY USETEXT PARAMS PROC HPGETMM; STARTIMS; # *1DC HPGETMM * * 1. PROC NAME AUTHOR DATE * HPGETMM E. GEE 85/05/01 * * 2. FUNCTIONAL DESCRIPTION. * PROCESS AIP NETGETMM WORKLIST ENTRY * * 3. METHOD USED. * VALIDATE GETMM WORKLIST ENTRY. * IF NOT VALID, * CALL HLGLERR TO SEND ERR/LGL SUP MSG TO APP. * ELSE (VALID GETMM WORKLIST ENTRY), * SET UP INITIAL GETMM AWL ENTRY IN ACB. * IF DATA MESSAGES TO DELIVER, * CALL MGETS TO GET BUFFER FOR HOLDING DATA MESSAGES. * LOOP GETTING DATA MESSAGES UNTIL BUFFER FULL OR NO MORE. * CALL HGETDA TO GET DATA MESSAGE. * IF DATA MESSAGE IS TOO LARGE FOR BUFFER, * DISCONTINUE LOOP. * IF DATA MESSAGES WERE FOUND, * CREATE SCP FUNCTION LIST TO WRITE DATA BACK TO APP. * CALL HWRTDA TO WRITE DATA BACK TO APP. * UPDATE GETMM AWL ENTRY WITH DELIVERED DATA INFORMATION. * * 4. ENTRY PARAMETERS. * ACBADDR ACB ADDRESS * WLADDR NWL NETMM WORKLIST ENTRY ADDRESS * * 5. EXIT PARAMETERS. * DONE TRUE IF WORKLIST PROCESSING COMPLETED * * 6. COMDECKS CALLED AND SYMPL TEXTS USED. * ACB APPLICATION CONTROL BLOCK * DBGBUF DEBUG TRACE BUFFER * MEM MEMORY LOCATION TEMPLATE * APPSTAT NETWORK WORKLIST PROCESSING TABLE * AT APPLICATION TABLE * AWLHEAD APPLICATION WORKLIST HEADER WORD * AWLNTRY APPLICATION WORKLIST ENTRY TEMPLATE * APPSTAT NETWORK WORKLIST PROCESSING TABLE * DRHDR BUFFER HEADER WORD TEMPLATE * FLIST SCP FUNCTION LIST TEMPLATE * GETMM GETMM WORKLIST TEMPLATE * NIPDEF CONSTANT DEFINITIONS * * 7. ROUTINES CALLED. * BDELINK DELINK DATA BLK FROM ACB/ACNB DATA RING * HBSMABH COMPUTE LENGTH OF SUP MSG * HGETDA GET DATA MESSAGE TO DELIVER * HLGLERR OVL ISSUE ERR/LGL SUPERVISORY MESSAGE * MGETS ALLOCATE EMPTY BUFFER * MRELS RELEASE BUFFER SPACE * OSCCALL ISSUE SCP FUNCTION * OSCHAPP SCHEDULE APPLICATION * XTRACE RECORD PROCEDURE CALLS * * 8. DAYFILE MESSAGES. NONE * # STOPIMS; # EXTERNAL VARIABLES # XREF PROC HGETDA; # GET DATA MESSAGE FOR DELIVERY # XREF PROC HWRTDA; # WRITE DATA TO APP FIELD LENGTH # XREF PROC MGETS; # GET BUFFER # XREF PROC MRELS; # RETURN BUFFER # XREF PROC OVLCALL; # LOAD AND EXECUTE OVERLAYS # XREF PROC XTRACE; # INTERNAL VARIABLES # ITEM ABHWD U; # WORD FOR SAVING ABH OF DELINKED MSGS # ITEM ACNBADR; # ADDRESS OF ACNB # ITEM ACNALN ; # APPLICATION LIST OR CONNECTION NUMBER # ITEM BUFADDR; # ADDR OF BUF FOR HOLDING DATA MSGS # ITEM BUFSIZE; # SIZE OF BUF SPECIFIED BY APP # ITEM FLSIZ; # SIZE OF SCP FUNCTION REQUEST # ITEM FOUND B; # TRUE IF DATA MSG DELINKED # ITEM LIST B; # LIST NUMBER SCAN FLAG # ITEM NDEL; # NUMBER OF DATA MSGS DELIVERED # ITEM NEXT; # ADDR OF NEXT FREE LOCATION IN BUFFER # ITEM NWDS; # NUMBER OF WORDS TO WRITE BACK TO APP # ITEM SIZE; # SIZE OF DELINKED DATA BLOCKS # ARRAY FLW P(3); # ARRAY FOR ISSUING SCP CALL # BEGIN ITEM FLWRC U(00,00,06); # RETURN CODE FROM SCP CALL # ITEM FLWFP U(00,06,12); # NUMBER OF WORDS TO READ # ITEM FLWUCPA U(00,18,18); # UCP ADR FOR SF.WRITE SCP FUNC # ITEM FLWSCPA U(00,36,18); # SCP ADR FOR SF.WRITE SCP FUNC # ITEM FLWFC U(00,54,06); # SCP FUNCTION CODE # ITEM FLWCB U(00,59,01); # SCP FUNCTION COMPLETION BIT # ITEM FLWWD0 U(00,00,60) = [0]; # WORD 0 OF SCP FUNCTION BUFFER # ITEM FLWJSNWD U(01,00,60); # UCP JSN / EJT ORDINAL WORD # ITEM FLWXUCPA U(02,12,24); # UCP ADR FOR SF.XWRITE SCP FUNC# ITEM FLWXSCPA U(02,36,24); # SCP ADR FOR SF.XWRITE SCP FUNC# ITEM FLWWD2 U(02,00,60) = [0]; # WORD 2 OF SCP FUNCTION BUFFER # END #**********************************************************************# BEGIN CONTROL IFEQ DEBUG,1 ; XTRACE("HPGMM") ; CONTROL FI; DONE = FALSE; # ASSUME FUNC NOT COMPLTE UNLESS OTHERWISE# LIST = FALSE; # ASSUME NOT GETTING DATA FROM LIST # P = WLADDR; # WORKLIST ADDRESS # P = ACBADDR; # ACB ADDRESS # P = ACBACNT[0] ; NDEL = 0; NWDS = 0; # COPY NEEDED INFORMATION FROM GETMM WORKLIST ENTRY # BUFSIZE = GETMMSZ[0]; # SIZE OF APP MULTIPLE MSG BUFFER # ACNALN = GETMMACN[0]; # GET MULTIPLE MSGS CONNECTION NUMBER # IF ACNALN EQ 0 THEN # GET MULTIPLE MSGS FROM LIST # BEGIN LIST = TRUE; ACNALN = GETMMALN[0]; # LIST NUMBER FOR GETTING MULTIPLE MSGS # END # VALIDATE GETMM WORKLIST ENTRY # IF ( NOT LIST ) AND ( ( ACNALN GR ACNTHCN[0] ) OR # CONNECTION NO TOO LARGE # ( ACNALN LS ACNTMINACN[0] ) OR # CONNECTION NO TOO SMALL # ( ACNTACNB[ACNALN+ACNTHSIZE-ACNTMINACN[0]] EQ 0 ) ) THEN # INVALID CON NUMBER WAS SPECIFIED # BEGIN PARAMS1 = RLG"ACN"; # REASON CODE FOR ERR/LGL SM # OVLNAME = HLGLERRP; # NAME OF OVERLAY TO LOAD # OVLCALL; # LOAD AND EXECUTE OVERLAY # END ELSE # VALID CON NUMBER OR GETTING FROM LIST # BEGIN # COPY NETGETMM WORKLIST ENTRY TO AWL # P = LOC(ACBAWL2[0]); AWLEAIPH[0] = GETMMWD0[0]; # AIP OPCODE WORD # AWLEWD1[0] = GETMMWD1[0]; # SECOND WORD OF GETMM ENTRY # P = P; # BASED ARRAY NOW POINTS TO AWL ENTRY # IF (BUFSIZE NQ 0) AND (ACBBLKSQ[0] NQ 0) THEN # THERE ARE DATA MSGS TO DELIVER # BEGIN MGETS(BUFSIZE+BLKHSIZE+1,BUFADDR,FALSE); # GET BUF FOR DATA # P = BUFADDR; BLKID[0] = MOUTIDVALUE; NEXT = BUFADDR + BLKHSIZE; # FWA TO WRITE DATA MESSAGE TO # # GET DATA MESSAGES # FOUND = TRUE; # INITIALIZE FLAG TO DATA MSG FOUND # FOR ACNALN=ACNALN WHILE FOUND DO # LOOP UNTIL NO MORE MSGS OR BUF FULL # BEGIN SIZE = BUFSIZE - ABHSIZE; # NO OF WDS LEFT TO HOLD TEXT # HGETDA(NEXT,SIZE,ACNALN,LIST,ABHWD); P = NEXT; # ADDR OF WORD TO HOLD ABH # ABHWORD[0] = ABHWD; # COPY ABH WORD TO BUFFER # IF (ABHWD EQ 0) OR # NO DATA MSG FOUND # (ABHIBU[0] NQ 0) # DATA MSG WAS NOT DELIVERABLE # THEN # DISCONTINUE LOOPING # BEGIN FOUND = FALSE; END ELSE # FOUND DATA MSG TO DELIVER # BEGIN CONTROL IFEQ DEBUG,1; PNVALUE[0] = ACBAN[0]; # APPL. NUMBER # BGETW[BGETP] = PNWORD[0] ; BGETP = BGETP + 1 ; IF BGETP GR 999 THEN BEGIN BGETP = 0; END P = NEXT; FOR TRAPINDEX = 0 STEP 1 UNTIL SIZE DO BEGIN BGETW[BGETP] = WORD[TRAPINDEX] ; BGETP = BGETP + 1; IF BGETP GR 999 THEN BEGIN BGETP = 0; END END CONTROL FI; NDEL = NDEL + 1; NWDS = NWDS + SIZE; # NO OF WORDS TO WRITE BACK # NEXT = NEXT + SIZE; # ADDR OF NEXT FREE WORD IN BUFFER # BUFSIZE = BUFSIZE - SIZE; # REMAINING SIZE OF BUFFER # END END IF NWDS NQ 0 THEN # DATA MESSAGES TO WRITE BACK TO APP BUF # BEGIN # CREATE SCP FUNCTION LIST TO WRITE MSGS BUFFER TO UCP FL # FLWFP[0] = NWDS; # NO OF WORDS TO WRITE TO UCP FL # FLWJSNWD[0] = ACBJNWD[0]; # JOB ID WORD # IF NWDS GR 64 THEN # SCP WRITE FUNCTION USED TO WRITE MSGS # BEGIN FLSIZ = FLXSIZE; # SIZE OF SCP FUNCTION REQUEST # FLWXUCPA[0] = GETMMTA[0]; # AIP GETMM BUF ADDRESS # FLWXSCPA[0] = BUFADDR + BLKHSIZE; # ADDR OF FIRST SUP MSG# FLWFC[0] = SFXWRT; END ELSE # SCP EXTENDED WRITE FUNCTION MUST BE USED# BEGIN FLSIZ = FLSIZE; # SIZE OF SCP FUNCTION REQUEST # FLWUCPA[0] = GETMMTA[0]; # AIP GETMM BUF ADDRESS # FLWSCPA[0] = BUFADDR + BLKHSIZE; # ADDR OF FIRST SUP MSG # FLWFC[0] = SFWRITE; END HWRTDA(FLW,FLSIZ,BUFADDR); END ELSE # NO DATA MESSAGES TO WRITE TO APP FL # BEGIN MRELS(BUFADDR); # RELEASE GETMM BUFFER # DONE = TRUE; END END # BUFFER SIZE IS NOT ZERO # ELSE BEGIN DONE = TRUE; # SET FUNCTION-COMPLETED FLAG # END END # FILL AWL NETGETMM ENTRY # GETMMND[0] = NDEL; # NO OF DATA MSGS WRITTEN TO UCP FL # GETMMCB[0] = 1; # SET WORKLIST ENTRY COMPLETION BIT # GETMMNW[0] = NWDS; # NO OF WDS WRITTEN TO AIP SUP MSG BUF # GETMMALN[0] = ACNALN ; RETURN; END TERM