User Tools

Site Tools


cdc:nos2.source:nam5871:lfggpn

LFGGPN

Table Of Contents

  • [00007] GET PARTITION NAME.

Source Code

LFGGPN.txt
  1. *DECK LFGGPN
  2. USETEXT LFGIOD,LFGHDRC,LFGIB
  3. PROC LFGGPN(PN,RC,MRES,ON,EOI,SUCCESS);
  4. BEGIN # GET PARTITION NAME #
  5. *IF DEF,IMS
  6. #
  7. ** LFGGPN - GET PARTITION NAME.
  8. *
  9. * M. E. VATCHER 81/02/19
  10. *
  11. * LFGGPN GETS A PARTITION NAME FROM A SYSTEM HEADER RECORD
  12. * AND CONVERTS THE NAME TO DISPLAY CODE.
  13. *
  14. * PROC LFGGPN(PN,RC,MRES,ON,EOI,SUCCESS)
  15. *
  16. * ENTRY NONE.
  17. *
  18. * EXIT PN PARTITION NAME IN DISPLAY CODE
  19. * RC MODULE COUNT FOR MEMORY RESIDENT PARTITION
  20. * MRES MEMORY RESIDENT INDICATOR
  21. * ON OVERLAY NAME IN ASCII
  22. * EOI END OF INFORMATION ENCOUNTERED
  23. * SUCCESS SUCCESSFUL COMPLETION INDICATOR
  24. *
  25. * METHOD
  26. *
  27. * READ RECORD AT CURRENT FILE POSITION
  28. * IF EOI ENCOUNTERED
  29. * THEN
  30. * SET EOI AND RETURN
  31. * SET OR CLEAR MEMORY RESIDENT FLAG
  32. * IF ITS NOT MEMORY RESIDENT
  33. * THEN
  34. * READ ANOTHER RECORD TO GET SYSTEM HEADER RECORD
  35. * CONVERT PARTITION NAME TO DISPLAY CODE
  36. * IF ITS A MEMORY RESIDENT PARTITION
  37. * THEN
  38. * SET MODULE COUNT
  39. * ELSE
  40. * SET OVERLAY NAME IN ASCII
  41. * IF ITS AN OVERLAY
  42. * THEN
  43. * SKIP OVER OVERLAY AREA HEADER RECORD
  44. * END
  45. *
  46. #
  47. *ENDIF
  48.  
  49. #
  50. **** PROC LFGGPN - XREF LIST BEGIN.
  51. #
  52.  
  53. XREF
  54. BEGIN
  55. ITEM IFET U; # FWA OF INPUT FILE FET #
  56. PROC LFGRDER; # PRINT READ ERROR MESSAGE #
  57. PROC LFGRDSR; # READ SEQUENTIAL RECORD #
  58. END
  59.  
  60. #
  61. ****
  62. #
  63.  
  64. *CALL LFGASCI
  65.  
  66. ITEM EOI B; # END OF INFORMATION FLAG #
  67. ITEM MRES B; # MEMORY RESIDENT FLAG #
  68. ITEM NAME2 U; # CONCATENATE NAME2A AND NAME2B #
  69. ITEM ON U; # OVERLAY NAME IN ASCII #
  70. ITEM PN C(6); # PARTITION NAME #
  71. ITEM RC U; # RECORD COUNT #
  72. ITEM STATIS U; # STATUS RETURNED FROM READ #
  73. ITEM SUCCESS B; # SUCCESSFUL COMPLETION INDICATOR #
  74.  
  75. SUCCESS = TRUE;
  76. LFGRDSR(LOC(IFET),STATIS);
  77. IF STATIS EQ RDEOI
  78. THEN
  79. BEGIN
  80. EOI = TRUE;
  81. RETURN; # ***** EXIT ***** #
  82.  
  83. END
  84. IF STATIS NQ RDEOR
  85. THEN
  86. BEGIN
  87. LFGRDER(STATIS);
  88. SUCCESS = FALSE;
  89. RETURN; # ***** EXIT ***** #
  90.  
  91. END
  92. IF B<0,16>IBUF[0] EQ 0
  93. THEN
  94. MRES = TRUE;
  95. ELSE
  96. MRES = FALSE;
  97. IF NOT MRES # IF ITS AN OVERLAY PARTITION #
  98. THEN # GET SYSTEM HEADER RECORD #
  99. BEGIN
  100. LFGRDSR(LOC(IFET),STATIS);
  101. IF STATIS NQ RDEOR
  102. THEN
  103. BEGIN
  104. LFGRDER(STATIS);
  105. SUCCESS = FALSE;
  106. RETURN; # ***** EXIT ***** #
  107.  
  108. END
  109. END
  110. P<HEADER> = LOC(IBUF[0]);
  111. C<0,1>PN = C<NAME1,1>ASCIITAB;
  112. NAME2 = 0;
  113. B<53,3>NAME2 = NAME2A;
  114. B<56,4>NAME2 = NAME2B;
  115. C<1,1>PN = C<NAME2,1>ASCIITAB;
  116. C<2,1>PN = C<NAME3,1>ASCIITAB;
  117. C<3,1>PN = C<NAME4,1>ASCIITAB;
  118. C<4,1>PN = C<NAME5,1>ASCIITAB;
  119. C<5,1>PN = C<NAME6,1>ASCIITAB;
  120. IF MRES
  121. THEN # SET NUMBER OF MODULES #
  122. RC = MCNT[0];
  123. ELSE # OVERLAYS HAVE ONLY ONE INPUT RECORD #
  124. BEGIN
  125. RC = 1;
  126. ON = 0;
  127. B<37,7>ON = NAME1;
  128. B<45,7>ON = NAME2;
  129. B<53,7>ON = NAME3;
  130. END
  131. IF NOT MRES
  132. THEN # ITS AN OVERLAY #
  133. BEGIN # SKIP OVERLAY AREA HEADER RECORD #
  134. LFGRDSR(LOC(IFET),STATIS);
  135. END
  136.  
  137. END TERM
cdc/nos2.source/nam5871/lfggpn.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator