User Tools

Site Tools


cdc:nos2.source:nam5871:lfgmde

LFGMDE

Table Of Contents

  • [00006] MAKE DIRECTORY ENTRY.

Source Code

LFGMDE.txt
  1. *DECK LFGMDE
  2. PROC LFGMDE(PN,RSA,RECL,SUCCESS,DIRBUF);
  3. BEGIN # MAKE DIRECTORY ENTRY #
  4. *IF DEF,IMS
  5. #
  6. ** LFGMDE - MAKE DIRECTORY ENTRY.
  7. *
  8. * M. E. VATCHER 81/02/20
  9. *
  10. * LFGMDE MAKES A DIRECTORY ENTRY IN THE OPLD BUFFER.
  11. *
  12. * PROC LFGMDE(PN,RSA,RECL,SUCCESS,DIRBUF)
  13. *
  14. * ENTRY PN PARTITION NAME
  15. * RSA RELATIVE SECTOR ADDRESS
  16. * RECL RECORD LENGTH
  17. * DIRBUF DIRECTORY BUFFER ARRAY ADDRESS
  18. *
  19. * EXIT SUCCESS SUCCESSFUL COMPLETION INDICATOR
  20. *
  21. * METHOD
  22. *
  23. * PUT PARTITION NAME,RELATIVE SECTOR ADDRESS, AND RECORD LENGTH
  24. * IN CURRENT POSITION IN THE DIRECTORY BUFFER.
  25. *
  26. #
  27. *ENDIF
  28.  
  29. #
  30. **** PROC LFGMDE - XREF LIST BEGIN.
  31. #
  32.  
  33. XREF
  34. BEGIN
  35. ITEM OUTPUT; # FWA OF OUTPUT FILE FET #
  36. PROC WRITEC; # WRITE LINE TO CIO BUFFER #
  37. PROC WRITER; # WRITE RECORD #
  38. END
  39.  
  40. #
  41. ****
  42. #
  43.  
  44. ITEM I U; # LOOP INDEX #
  45. ITEM PN C(6); # PARTITION NAME #
  46. ITEM RECL U; # RECORD LENGTH #
  47. ITEM RSA U; # RELATIVE SECTOR ADDRESS #
  48. ITEM SUCCESS B;
  49.  
  50. ARRAY DIRBUF [0:0] S(2);
  51. BEGIN # DIRECTORY BUFFER #
  52. ITEM NLFWC U(01,48,12); # ENTRY INDEX #
  53. ITEM RN C(00,00,06); # RECORD NAME #
  54. ITEM RLEN U(01,00,30); # RECORD LENGTH #
  55. ITEM RANINDX U(01,30,30); # RELATIVE SECTOR ADDRESS #
  56. END
  57.  
  58. ARRAY DUPRN [0:0] S(4);
  59. BEGIN
  60. ITEM DUPRN1 C(0,0,30) =
  61. [" DUPLICATE RECORD NAME XXXXXX."];
  62. ITEM DUPNAME C(2,18,6);
  63. ITEM DUPZ U(3,0,60) = [ 0 ];
  64. END
  65.  
  66. SUCCESS = TRUE;
  67. FOR I = 1 STEP 1 UNTIL NLFWC[0] DO
  68. BEGIN
  69. IF C<0,6>PN EQ C<0,6>RN[I]
  70. THEN # DUPLICATE RECORD NAME #
  71. BEGIN
  72. DUPNAME[0] = PN;
  73. WRITEC(OUTPUT,DUPRN);
  74. WRITER(OUTPUT,"R");
  75. SUCCESS = FALSE;
  76. RETURN; # ***** EXIT ***** #
  77.  
  78. END
  79. END
  80. NLFWC[0] = NLFWC[0] + 1;
  81. RN[NLFWC[0]] = PN; # PUT IN RECORD NAME #
  82. RLEN[NLFWC[0]] = RECL; # PUT IN RECORD LENGTH #
  83. RANINDX[NLFWC[0]] = RSA; # PUT IN RELATIVE SECTOR ADRESS #
  84. END TERM
cdc/nos2.source/nam5871/lfgmde.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator