User Tools

Site Tools


cdc:nos2.source:nam5871:lfgrdhr

LFGRDHR

Table Of Contents

  • [00007] READ HEADER RECORD.

Source Code

LFGRDHR.txt
  1. *DECK LFGRDHR
  2. USETEXT LFGIOD,LFGHDRC,LFGIB
  3. PROC LFGRDHR(PICBF,WC,BEGADDR,SUCCESS);
  4. BEGIN
  5. *IF DEF,IMS
  6. #
  7. ** LFGRDHR - READ HEADER RECORD.
  8. *
  9. * M. E. VATCHER 81/02/23
  10. *
  11. * LFGRDHR READS A MODULE HEADER RECORD FROM THE CURRENT INPUT
  12. * FILE AT THE CURRENT POSITION.
  13. *
  14. * PROC LFGRDHR(PICBF,WC,BEGADDR,SUCCESS)
  15. *
  16. * ENTRY NONE.
  17. *
  18. * EXIT PICBF SET IF THIS IS A PICB
  19. * WC 16 BIT WORD COUNT OF DATA IN FOLLOWING RECORD
  20. * BEGADDR BEGINNING ADDRESS
  21. * SUCCESS SUCCESSFUL COMPLETION INDICATOR
  22. *
  23. * METHOD
  24. *
  25. * READ A RECORD
  26. * SET WORD COUNT
  27. * SET OR CLEAR PICB INDICATOR
  28. * IF ITS NOT A PICB
  29. * THEN
  30. * SET BEGINNING ADDRESS
  31. *
  32. #
  33. *ENDIF
  34.  
  35. #
  36. **** PROC LFGRDHR - XREF LIST BEGIN.
  37. #
  38.  
  39. XREF
  40. BEGIN
  41. ITEM IFET; # FWA OF INPUT FILE FET #
  42. PROC LFGRDER; # SEND READ ERROR MESSAGE #
  43. PROC LFGRDSR; # READ SEQUENTIAL RECORD #
  44. END
  45.  
  46. #
  47. ****
  48. #
  49.  
  50.  
  51. ITEM PICBF B; # TRUE IF ITS A PICB #
  52. ITEM WC U; # 16 BIT WORD COUNT #
  53. ITEM BEGADDR U; # BEGINNING ADDRESS #
  54. ITEM STATIS;
  55. ITEM SUCCESS B;
  56.  
  57. P<HEADER> = LOC(IBUF[0]);
  58. SUCCESS = TRUE;
  59.  
  60. LFGRDSR(LOC(IFET),STATIS); # READ A HEADER RECORD #
  61. IF STATIS NQ RDEOR
  62. THEN
  63. BEGIN
  64. LFGRDER(STATIS); # SEND APPROPRIATE MESSAGE TO OUTPUT #
  65. SUCCESS = FALSE;
  66. RETURN; # ***** EXIT ***** #
  67.  
  68. END
  69. WC = WCOUNT; # SET WORD COUNT #
  70. IF NAME1[0] EQ O"120" AND # ASCII "P" #
  71. NAME2A[0] EQ 4 AND NAME2B EQ O"11" AND # ASCII "I" #
  72. NAME3[0] EQ O"103" AND # ASCII "C" #
  73. NAME4[0] EQ O"102" #ASCII "B" #
  74. THEN # ITS A PICB #
  75. PICBF = TRUE;
  76. ELSE
  77. PICBF = FALSE;
  78. IF NOT PICBF
  79. THEN # SET BEGINNING ADDRESS #
  80. BEGIN
  81. B<37,5>BEGADDR = PAGER[0];
  82. B<42,7>BEGADDR = PAGEN[0];
  83. B<49,11>BEGADDR = PAGED[0];
  84. END
  85. END TERM
cdc/nos2.source/nam5871/lfgrdhr.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator