User Tools

Site Tools


cdc:nos2.source:nam5871:readsr

READSR

Table Of Contents

  • [00002] PROC READSR ( (FET),(WSA), LENGTH , STATIS )
  • [00062] PROC READ
  • [00063] PROC RECALL

Source Code

READSR.txt
  1. *DECK READSR
  2. PROC READSR ( (FET),(WSA), LENGTH , STATIS );
  3. BEGIN # READSR #
  4. *IF DEF,IMS
  5. #
  6. **
  7. *
  8. * 1. PROC NAME AUTHOR DATE
  9. * READSR M. D. PICKARD 77/01/13
  10. *
  11. * 2. FUNCTIONAL DESCRIPTION
  12. * READSR WILL READ ON RECORD FROM A FILE TO A WORKING STORAGE
  13. * AREA.
  14. *
  15. * 3. METHOD USED
  16. * IF THE FET IS A SEQUENTIAL FILE FET THEN FIRST, IN, OUT AND
  17. * LIMIT ARE SET AND READ IS CALLED TO READ THE RECORD. THE
  18. * RETURN STATUS IS SET.
  19. *
  20. * 4. ENTRY PARAMETERS
  21. * FET ADDRESS OF FILE ENVIRONMENT TABLE
  22. * WSA READ BUFFER ADDRESS
  23. * LENGTH LENGTH OF READ BUFFER
  24. *
  25. * 5. EXIT PARAMETERS
  26. * STATIS RETURN STATUS FIELD
  27. * RDEOR - END-OF-RECORD, READ SUCESSFUL
  28. * RDBFULL - BUFFER FULL, PART REC. READ
  29. * RDEOF - END-OF-FILE, NO RECORD READ
  30. * RDEOI - END-OF-INFORMATION, NO REC. READ
  31. * CRDEOR - EOR CODED FILE, READ SUCCESSFUL
  32. * CRDEOF - EOF CODED FILE, NO RECORD READ
  33. * CRDEOI - EOI CODED FILE, NO RECORD READ
  34. * CRDBFULL - BUFFER FULL CODED FILE,
  35. * PART RECORD READ
  36. * SEQRRAN - SEQUENTIAL REQ. ON RANDOM FILE
  37. *
  38. * 6. COMDECKS CALLED
  39. * SIODEFS SUPIO SYMPL DEFS
  40. * SIOBASE SUPIO BASED ARRAY DEFINITIONS
  41. *
  42. * 7. ROUTINES CALLED
  43. * READ READ MACRO SYMPL INTERFACE ROUTINE
  44. * RECALL ISSUE CPU RECALL TIL IO IS COMPLETE
  45. *
  46. * 8. DAYFILE MESSAGES
  47. * NONE.
  48. *
  49.  #
  50. *ENDIF
  51. CONTROL NOLIST; # STOP LIST OF SIODEFS AND SIOBASE #
  52. *CALL SIODEFS
  53. *CALL SIOBASE
  54. CONTROL LIST;
  55. ITEM
  56. FET U, # FET ADDRESS #
  57. WSA U, # READ BUFFER #
  58. LENGTH U, # LENGTH OF READ BUFFER #
  59. STATIS U; # STATUS WORD #
  60. XREF
  61. BEGIN
  62. PROC READ;
  63. PROC RECALL;
  64. END
  65. P<SIOFET> = FET; # FORMAT FET #
  66. IF NOT FETRAN[0]
  67. THEN # THIS IS A SEQUENTIAL FILE #
  68. BEGIN
  69. FETFST[0] = WSA; # SET FIRST #
  70. FETIN[0] = WSA; # SET IN FOR BUFFER EMPTY #
  71. FETOUT[0] = WSA; # SET OUT #
  72. FETLMT[0] = WSA + LENGTH + 1; # SET LIMIT #
  73. READ(SIOFET); # READ THE RECORD #
  74. RECALL(SIOFET); #WAIT TIL COMPLETE BIT IS SET #
  75. STATIS = FETSTAT[0]; # SET RETURN STATUS #
  76. LENGTH = FETIN[0] - FETFST[0]; # SET LENGTH OF RECORD READ #
  77. END
  78. ELSE # CAN NOT READSR ON A RANDOM FILE #
  79. STATIS = SEQRRAN; # SEQUENTIAL REQUEST ON RANDOM FILE #
  80. RETURN;
  81. END
  82. TERM # READSR #
cdc/nos2.source/nam5871/readsr.txt ยท Last modified: 2023/08/05 17:23 by Site Administrator