User Tools

Site Tools


cdc:nos2.source:nam5871:npinind

NPININD

Table Of Contents

  • [00006] PRGM NPININD
  • [00016] FUNC GETFIL
  • [00017] PROC OMSG
  • [00018] PROC ROUTE
  • [00019] PROC XTRACE

Source Code

NPININD.txt
  1. *DECK NPININD
  2. USETEXT NIPDEF
  3. USETEXT NBT
  4. USETEXT NHEADER
  5. USETEXT PARAMP
  6. PRGM NPININD; # PROCESS INID/MDI FROM PIP #
  7.  
  8. STARTIMS;
  9. STOPIMS;
  10.  
  11. #
  12.   EXTERNAL REFERENCES
  13. #
  14. XREF
  15. BEGIN
  16. FUNC GETFIL; # GET A DIRECT ACCESS PERMANENT FILE #
  17. PROC OMSG; # DAYFILE ERROR MESSAGE #
  18. PROC ROUTE; # ROUTE JOB FILE TO INPUT QUEUE #
  19. PROC XTRACE; # TRACE CALL #
  20. LABEL RJMAIN;
  21. END
  22. #
  23.   LOCAL DEFINITIONS
  24. #
  25. DEF PFN$IND # "ZZININD" #; # PFN OF THE INITMDI JOB FILE #
  26. #
  27.   LOCAL VARIABLES
  28. #
  29. ITEM FOUND B; # NBT ENTRY FOUND INDICATOR #
  30. ITEM I I; # NBT ENTRY INDEX #
  31. ITEM INDJOBF C(7); # PFN FOR GETFIL CALL #
  32. ITEM RSTATUS U; # RETURN STATUS OF GETFIL CALL #
  33.  
  34. ARRAY DSPERRMSG S(4);
  35. BEGIN
  36. ITEM DSPERRTEXT C(0,0,30) = [" DSP ERROR NNB, LFN = ZZININD."];
  37. ITEM DSPERRNN U(1,6,12); # ERROR CODE FIELD IN DAY MSG #
  38. ITEM DSPERREND U(3,0,60) = [0];
  39. END
  40.  
  41. ARRAY RPARAM P(7);
  42. BEGIN # ROUTE JOB PARAMETER BLOCK #
  43. ITEM RPAR$JOBF C(00,00,07); # NAME OF INITMDI JOB FILE #
  44. ITEM RPAR$EC U(00,42,06); # ERROR CODE RESPONSE #
  45. ITEM RPAR$F B(00,48,01); # FORCED ORIGIN FLAG #
  46. ITEM RPAR$OT U(00,53,06); # FORCED JOB ORIGIN TYPE #
  47. ITEM RPAR$CB B(00,59,01); # COMPLETION BIT #
  48. ITEM RPAR$DISP C(01,24,02); # FILE DISPOSITION #
  49. ITEM RPAR$EP B(01,47,01); # ERROR PROCESSING FLAG #
  50. ITEM RPAR$FSC B(01,39,01); # FORCE SERVICE CLASS #
  51. ITEM RPAR$ID B(01,58,01); # ROUTE TO CENTRAL SITE #
  52. ITEM RPAR$DCF B(01,55,01); # DISPOSITION CODSET FLAG #
  53. ITEM RPAR$SC C(04,12,02); # SERVICE CLASS #
  54. ITEM RPAR$WD0 U(00,00,60) = [0];
  55. ITEM RPAR$WD1 U(01,00,60) = [0];
  56. ITEM RPAR$WD2 U(02,00,60) = [0];
  57. ITEM RPAR$WD3 U(03,00,60) = [0];
  58. ITEM RPAR$WD4 U(04,00,60) = [0];
  59. ITEM RPAR$WD5 U(05,00,60) = [0];
  60. ITEM RPAR$WD6 U(06,00,60) = [0];
  61. END
  62.  
  63. ARRAY INDMSG1 S(5);
  64. BEGIN # ERROR MESSAGE #
  65. ITEM MSG1$TEXT C(00,00,48) =
  66. ["NIP/NO INITMDI STARTUP - ZZININD NOT FOUND."];
  67. ITEM MSG1$END U(04,48,12) = [0];
  68. END
  69.  
  70. ARRAY INDMSG2 S(5);
  71. BEGIN # ERROR MESSAGE #
  72. ITEM MSG2$TEXT C(00,00,48) =
  73. ["NIP/BAD MDI INITIATION REQUEST RECEIVED."];
  74. ITEM MSG2$END U(04,48,12) = [0];
  75. END
  76.  
  77. CONTROL EJECT;
  78.  
  79. BEGIN # NPININD #
  80.  
  81. CONTROL IFEQ DEBUG,1;
  82. XTRACE("NPIND"); # TRACE CALL #
  83. CONTROL FI;
  84.  
  85. P<NHEADER> = PARAMP1 + BLKHSIZE; # NETWORK HEADER WORD #
  86. FOUND = FALSE;
  87.  
  88. FOR I = 0 STEP NBTFETNO WHILE NOT FOUND AND I LQ NBTMAXID
  89. DO # SEARCH NBT FOR MATCHING COUPLER NODE #
  90. BEGIN # FRONT END MUST BE A ND DEVICE #
  91. IF NBTIUF[I] # NBT ENTRY IS IN USE #
  92. AND NBTHN[I] EQ DN[0]
  93. THEN # FOUND MATCHING COUPLER NODE #
  94. BEGIN
  95. FOUND = TRUE;
  96.  
  97. IF NBTET[I] EQ "ND"
  98. THEN # NBT ENTRY IS A MDI DEVICE #
  99. BEGIN # INITIATE INITMDI TO LOAD A DOWN MDI #
  100. INDJOBF = PFN$IND; # SET INITMDI JOB FILE PFN #
  101. RSTATUS = GETFIL(INDJOBF,INDJOBF); # GET PFN #
  102.  
  103. IF RSTATUS NQ 0
  104. THEN # INITMDI JOB NOT FOUND #
  105. OMSG(INDMSG1,0); # DAYFILE ZZININD FILE NOT FOUND #
  106.  
  107. ELSE # ZZININD EXISTS, NOW ROUTE JOB TO SYSTEM #
  108. BEGIN
  109. RPAR$JOBF[0] = PFN$IND; # SET JOB FILE FILENAME #
  110. RPAR$F[0] = TRUE; # SET TO SYSTEM ORIGIN #
  111. RPAR$OT[0] = SYOT; # SET SYSTEM ORIGIN JOB TYPE #
  112. RPAR$CB[0] = FALSE; # CLEAR COMPLETION BIT #
  113. RPAR$DISP[0] = "IN"; # SET FILE DISPOSITION #
  114. RPAR$FSC[0] = TRUE; # SET FORCED SERVICE CLASS FLAG #
  115. RPAR$DCF[0] = TRUE; # SET DISPOSITION CODE SET #
  116. RPAR$EP[0] = TRUE; # SET ERROR PROCESSING FLAG #
  117. RPAR$ID[0] = TRUE; # SET ROUTE TO CENTRAL SITE #
  118. RPAR$SC[0] = "NS"; # SET NETWORK SERVICE CLASS #
  119. ROUTE(RPARAM,1); # ROUTE ZZININD TO INPUT QUEUE #
  120. IF RPAR$EC[0] NQ 0
  121. THEN # DSP DETECTED ERROR - FILE NOT ROUTED #
  122. BEGIN
  123. DSPERRNN[0] = RPAR$EC[0] - (RPAR$EC[0]/8)*8 +
  124. (RPAR$EC[0]/8)*64 + O"3333";
  125. OMSG(DSPERRMSG,0); # ISSUE DAYFILE MESSAGE #
  126. END
  127. END
  128. END
  129.  
  130. ELSE # PIP ERROR, INIT/MDI SENT ON A NON-MDI #
  131. OMSG(INDMSG2,0); # DAYFILE BAD INIT/MDI RECEIVED #
  132. END
  133. END # END FOR LOOP #
  134.  
  135. GOTO RJMAIN;
  136. END
  137. TERM
cdc/nos2.source/nam5871/npinind.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator