User Tools

Site Tools


cdc:nos2.source:nam5871:hputf

Table of Contents

HPUTF

Table Of Contents

  • [00018] PRGM HPUTF
  • [00073] PROC XCTLW
  • [00074] PROC HRELWWL
  • [00075] PROC MGETS
  • [00076] PROC OMOVE
  • [00077] PROC OSCCALL
  • [00078] PROC OSCHAPP
  • [00079] PROC MRELS
  • [00080] PROC OVLCALL
  • [00081] PROC XTRACE

Source Code

HPUTF.txt
  1. *DECK HPUTF
  2. USETEXT NIPDEF
  3. USETEXT ACB
  4. USETEXT APPSTAT
  5. USETEXT AT
  6. USETEXT AWLNTRY
  7. USETEXT DRHDR
  8. USETEXT FLIST
  9. USETEXT FREETAB
  10. USETEXT MEM
  11. USETEXT NP$TAA
  12. USETEXT NWLHEAD
  13. USETEXT NWLNTRY
  14. USETEXT OVERLAY
  15. USETEXT PARAMP
  16. USETEXT PARAMS
  17. USETEXT PT
  18. PRGM HPUTF; # PROCESS NETPUTF REQUEST #
  19. STARTIMS;
  20. #
  21. *1DC HPUTF
  22. *
  23. * 1. PROC NAME AUTHOR DATE
  24. * HPUTF P.C.TAM 77/05/11
  25. *
  26. * 2. FUNCTIONAL DESCRIPTION.
  27. * USE TEXT ARRAY PROVIDED BY APP TO READ TEXT INTO NWL FOR
  28. * HPUTBLK
  29. *
  30. * 3. METHOD USED.
  31. * EDIT NA, SIZE FIELDS OF NWL.
  32. * GET BUFFER BIG ENOUGH FOR FLHEAD, DATA BLOCK AND REST OF
  33. * NWL.
  34. * SET UP FLHEAD AND FLENTRIES FOR SF.LIST IN OLD NWL.
  35. * CALL SF.LIST
  36. * IF EVERYTHING IS OK, COPY REST OF NWL OVER.
  37. *
  38. * 4. ENTRY PARAMETERS.
  39. * ACBADDR APPLICATION"S ACB
  40. * WLADDR WORKLIST ENTRY
  41. *
  42. * 5. EXIT PARAMETERS.
  43. * DONE TRUE
  44. * PARAMS1 REASON,IF LGL/ERR
  45. * ACBUCPFSNS TRUE,IF NOT ENOUGH SPACE FOR MESSAGE.
  46. * ACBUCPFSSO TRUE,IF SFREAD RC IS RCSWAPPEDOUT
  47. * PARAMP1 FLAG TO INDICATE IF VALID NETPUTF REQUEST
  48. * = 0 IF INVALID REQUEST.
  49. * = 1 IF VALID REQUEST
  50. *
  51. * 6. COMDECKS CALLED AND SYMPL TEXTS USED.
  52. * ACB APPSTAT AT DRHDR
  53. * FLIST FREETAB MEM NIPDEF NP$TAA
  54. * PT NWLHEAD NWLNTRY OVERLAY PARAMS
  55. * PARAMP1 BUFFER FOR PASSING PARAMETERS FROM PRI OVL
  56. *
  57. * 7. ROUTINES CALLED.
  58. * HLGLERR OVL ISSUE ERR/LGL SUP MSG
  59. * HRELWWL RELEASE WHOLE NWL
  60. * XCTLW CALCULATE TEXT LENGTH FROM TLC, ACT.
  61. * MGETS ALLOCATE BUFFER SPACE
  62. * OMOVE COPY INFORMATION
  63. * OSCCALL SCP CALL
  64. * OSCHAPP SCHEDULE APPLICATION
  65. * MRELS RELEASE FREE BUFFER SPACE
  66. * XTRACE RECORD PROCEDURE CALLS
  67. *
  68. * 8. DAYFILE MESSAGES. NONE
  69.  #
  70. STOPIMS;
  71.  
  72. XREF BEGIN
  73. PROC XCTLW; #CALCULATE TEXT LENGTH FROM TLC #
  74. PROC HRELWWL; # RELEASE WHOLE NWL #
  75. PROC MGETS; #ALLOCATE BUFFER SPACE #
  76. PROC OMOVE; # COPY INFORMATION #
  77. PROC OSCCALL; #SCP CALL #
  78. PROC OSCHAPP; #SCHEDULE APPLICATION #
  79. PROC MRELS; #RELEASE FREE BUFFER SPACE #
  80. PROC OVLCALL; #OVERLAY SUBROUTINE #
  81. PROC XTRACE;
  82. LABEL RJMAIN; # RETURN ADDRESS IN OVLCALL TO RETURN TO #
  83. END
  84.  
  85. ITEM LENGTH I,
  86. TXTLN1 I,
  87. TXTLN2 I,
  88. SIZE I,
  89. BUFADDR U,
  90. LEFT I,
  91. TMP I,
  92. I I,
  93. START0 U,
  94. START1 U;
  95.  
  96.  
  97. BEGIN #NWL FOR NETPUTF #
  98. CONTROL IFEQ DEBUG,1;
  99. XTRACE("HPUTF") ;
  100. CONTROL FI;
  101. CONTROL OVERLAP;
  102. DONE = FALSE; # PRESET STATUS #
  103. P<ACB> = ACBADDR; # ESTABLISH ADDRESS. #
  104. P<NWLENTRY> = WLADDR; # #
  105. P<TAA> = WLADDR + FLSIZE;
  106. P<DRHDRWD> = 0;
  107.  
  108. TMP = 0;
  109. LENGTH = 0;
  110. XCTLW(NWLEABH,TXTLN1);
  111. TXTLN2 = TXTLN1;
  112.  
  113. FOR I = 1 STEP FLESIZE UNTIL NWLELTAA #GET ACTUAL SIZE #
  114. DO # GET ACTUAL SIZE OF TEXT FROM TAA DESC. #
  115. BEGIN # AND CHECK IF EACH FRAGMENT SIZE GR 63 #
  116. LENGTH = LENGTH + TAASIZE[I];
  117. IF TAASIZE[I] GR 63
  118. THEN
  119. TMP = 1;
  120. END
  121.  
  122. IF (LENGTH GQ TXTLN1) AND # TEXT LENGTH ACTUAL LS BUFFER #
  123. (TMP NQ 1) AND # SIZE FRAGMENTS LS 63 #
  124. (NWLELTAA LQ MAXNA) # NO OF TA ENTRIES LS 40 #
  125. THEN
  126. BEGIN
  127. MGETS(ACBWLLWA[0]-WLADDR+TXTLN1, # GET BUFFER SPACE #
  128. BUFADDR, FALSE); # FOR DATA BLOCK #
  129.  
  130. MGETS(NWLEBS[0], START0, TRUE); # GET BUF FOR FLIST.#
  131. SIZE = BLKBS[BUFADDR]; #SAVE THE SIZE OF B#
  132. MEMORY[BUFADDR] = MEMORY[WLADDR]; # AIP HEAD #
  133. MEMORY[BUFADDR+AIPHSIZE] = MEMORY[WLADDR+AIPHSIZE];
  134.  
  135. # PREPARE FL HEADER FOR SF.LIST CALL #
  136.  
  137. P<FLHEAD> = START0;
  138. FLID = FLIDVALUE; #SF.FUNCTION BLK ID#
  139. FLAN = ACBAN[0];
  140. FLJOBID = ACBJNWD[0]; #FILL 3RD WORD #
  141. FLSCPA = START0 + FLSIZE; # CALCULATE SCP ADDR#
  142. FLFC = SFLIST; #FUNCTION CODE #
  143. P<FLE> = FLSCPA;
  144.  
  145. P<TAA> = WLADDR + FLSIZE;
  146. FOR I = 0 STEP FLESIZE WHILE TXTLN2 GR 0
  147. DO #LOOP TO FILL #
  148. BEGIN #SF.READ ENTRIES #
  149. FLEFC[I] = SFREAD;
  150. FLEFP[I] = TAASIZE[I+1];
  151. FLEUCPA[I]= TAADDR[I+1];
  152. FLESCPA[I]= BUFADDR + AIPHSIZE + ABHSIZE + TXTLN1 -
  153. TXTLN2;
  154. TXTLN2 = TXTLN2 - TAASIZE[I+1];
  155. END
  156.  
  157. FLEFP[I-1] = FLEFP[I-1] + TXTLN2;
  158. FLFP = I;
  159. P<FLE> = START0 + FLHSIZE;
  160. OSCCALL(FLE);
  161. #CHECK FOR NORMAL #
  162. IF FLRC NQ 0 #COMPLETION #
  163. THEN
  164. BEGIN
  165.  
  166. IF FLRC EQ RCSWAPPEDOUT #USER JOB SWAPPED #
  167. THEN #SET APP. SWP OUT #
  168. BEGIN #BIT, SCHEDULE #
  169. ATASBS[ACBAN[0]] = TRUE; #APPLICATION #
  170. OSCHAPP(ACBADDR);
  171. END
  172.  
  173. ELSE
  174. IF FLRC EQ RCUCPAOOR #UCPA OUT OF RANGE #
  175. THEN ABTAPPF = XFLERR;
  176. ELSE FAILADR = ACBADDR; #OTHER SCP ERROR #
  177. BLKBS[BUFADDR] = SIZE; # RESTORE ORIGINAL BUFFER SIZE #
  178. MRELS(BUFADDR);
  179. MRELS(START0);
  180. END
  181.  
  182. ELSE #SCP REQUEST COMP. #
  183. BEGIN
  184. MRELS(START0);
  185. DONE = TRUE; #COPY REST OF NWL #
  186. BLKBS[BUFADDR] = TXTLN1 + AIPHSIZE + ABHSIZE;
  187. MSIZE = ACBWLLWA[0] - WLADDR - AIPHSIZE
  188. - ABHSIZE - NWLELTAA[0];
  189. MNEW = BUFADDR + BLKBS[BUFADDR];
  190. MOLD = WLADDR + AIPHSIZE + ABHSIZE + 1 + NWLELTAA[0];
  191. OMOVE;
  192. HRELWWL; # RELEASE WHOLE NWL #
  193. ACBWLLWA[0] = BUFADDR + SIZE - 1; # UPDATE ACB FIELDS #
  194. ACBWLFWA[0] = BUFADDR;
  195. ACBWLADR[0] = BUFADDR;
  196. BLKID[BUFADDR] = NWLEIDVALUE;
  197. NEXTWLA = BUFADDR + BLKBS[BUFADDR]; # #
  198. WLADDR = BUFADDR;
  199. END
  200. PARAMP1 = 1; # GOOD NETPUTF REQUEST WAS PROCESSED #
  201. END
  202. ELSE
  203. #TOTAL SIZE IN TAA DESCRIPTION TOO SMALL #
  204. BEGIN
  205. CMWORD[WLADDR+AIPHSIZE+ABHSIZE] = TAAWORD[0]; # RESTORE NWL #
  206. PARAMS1 = RLG"RES";
  207. OVLNAME = HLGLERRP;
  208. OVLCALL;
  209. DONE = TRUE;
  210. PARAMP1 = 0; # ERR/LGL WAS GENERATED FOR BAD NETPUTF RQ#
  211. END
  212. GOTO RJMAIN; # RETURN TO CALLING PROGRAM #
  213. END #HPUTF#
  214. TERM
cdc/nos2.source/nam5871/hputf.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator