Table of Contents

SETCHT

Table Of Contents

  • [00004] SETCHT - SET INPUT CHARACTER TYPE.
  • [00019] SET CHARACTER TYPE.

Source Code

SETCHT.txt
  1. IDENT SETCHT
  2. ENTRY SETCHT
  3. SYSCOM B1
  4. TITLE SETCHT - SET INPUT CHARACTER TYPE.
  5. *COMMENT SETCHT - SET INPUT CHARACTER TYPE.
  6. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  7. SETCHT SPACE 4,10
  8. ***** SETCHT - SET CHARACTER TYPE.
  9. *
  10. * W.E. MARTIN. 77/05/05.
  11. SPACE 4,10
  12. * COMMOM TEXT DEFINITION.
  13.  
  14.  
  15. *CALL COMCMAC
  16. *CALL COMKMAC
  17. *CALL COMSPRD
  18. SPACE 4,30
  19. *** SETCHT - SET CHARACTER TYPE.
  20. *
  21. * SET CHARACTER TYPE ALLOWS A TASK TO CHANGE THE CHARACTER
  22. * TYPE ASSOCIATED WITH A PARTICULAR TERMINAL. THE ARGUMENTS
  23. * ARE CHECKED FOR VALIDITY AND A *CTI* CALL IS MADE IN ORDER
  24. * TO PASS THE REQUEST ON TO THE NETWORK SUPERVISOR.
  25. *
  26. * CALL FORMAT -
  27. * FORTRAN EXTENDED - CALL SETCHT(TERMINAL,STATUS,ACT)
  28. *
  29. * COBOL - ENTER SETCHT USING TERMINAL, STATUS, ACT.
  30. *
  31. * TERMINAL = TERMINAL WHICH IS TO HAVE ITS ATTRIBUTES
  32. * CHANGED. TERMINAL IS 1 - 7 CHARACTERS,
  33. * ZERO OR BLANK FILLED. IF A BINARY ZERO
  34. * IS SUPPLIED, THE OPERATION APPLIES TO
  35. * ORIGINATING TERMINAL.
  36. *
  37. * STATUS = LOCATION WHICH IS TO HAVE THE TERMINAL
  38. * LOGGIN STATUS RETURNED.
  39. *
  40. * ACT = INTEGER VALUE FOR FORTRAN AND COMP-1 FOR
  41. * COBOL, VALUE RANGING FROM 2 - 4, OR THE
  42. * CHARACTER STRINGS - *ASCII7*, *ASCII5* AND
  43. * *DISPLAY*.
  44.  
  45. VFD 42/0LSETCHT,18/SETCHT
  46.  
  47. SETCHT SUBR ENTRY/EXIT
  48. SX6 A0 SAVE (A0)
  49. MX0 42
  50. SA6 SCTA
  51. SB1 1
  52.  
  53. * PROCESS TERMINAL NAME.
  54.  
  55. SA3 X1
  56. UX2,B3 X3
  57. ZR X1,SCT8 IF NO ARGUMENTS - ABORT TASK
  58. NZ B3,SCT1 IF NOT COBOL COMPUTATIONAL-1 ARGUMENT
  59. BX1 X1-X1
  60. ZR X2,SCT2 IF ZERO TERMINAL NAME
  61. SCT1 BX1 X0*X3
  62. ZR X1,SCT2 IF ZERO TERMINAL NAME
  63. RJ ZFN ZERO FILL NAME
  64. SCT2 BX5 X1
  65.  
  66. * PROCESS STATUS PARAMETER.
  67.  
  68. SA1 A1+B1 READ NEXT ARGUMENT
  69. ZR X1,SCT8 IF NO *STATUS* ARGUMENT - ABORT TASK
  70. SX7 X1 SET STATUS RETURN ADDRESS
  71.  
  72. * PROCESS ACT PARAMETER.
  73.  
  74. SA2 A1+B1
  75. SA7 SCTB+1
  76. ZR X2,SCT5 IF NO *ACT* ARGUMENT
  77. SA1 X2
  78. BX7 X0*X1
  79. UX3,B3 X1 UNPACK POSSIBLE COBOL ARGUMENT
  80. ZR B3,SCT3 IF NOT COBOL COMPUTATIONAL-1
  81. NZ X7,SCT6 IF CHARACTER ARGUMENT
  82. SCT3 SX4 X3-5
  83. PL X4,SCT8 IF ARGUMENT TOO LARGE
  84. SX4 X3-2
  85. NG X4,SCT8 IF TASK *ACT* SETS MODE TO BINARY
  86. SCT4 BX6 X5+X3 SET TERMINAL NAME AND CHARACTER TYPE
  87. SA6 SCTB
  88. SETCHT A6
  89. SCT5 SA1 SCTA RESTORE (A0)
  90. SA0 X1+
  91. EQ SETCHTX RETURN
  92.  
  93.  
  94. * PERFORM TABLE LOOKUP FOR DISPLAY ARGUMENTS.
  95.  
  96. SCT6 RJ ZFN ZERO FILL NAME
  97. SB3 TSCTL (B3) = TABLE SIZE
  98. SCT7 SA3 TSCT-1+B3
  99. BX4 X0*X3
  100. SB3 B3-B1
  101. BX7 X4-X1
  102. SX3 X3
  103. ZR X7,SCT4 IF ARGUMENT FOUND
  104. GE B3,SCT7 IF TABLE NOT EXHAUSTED
  105.  
  106. * ABORT TASK FOR ARGUMENT ERROR.
  107.  
  108. SCT8 SA1 SETCHT READ TRACE-BACK WORD
  109. MX0 30
  110. LX1 30
  111. SA2 X1-1 READ *RJ* FROM CALLING PROGRAM
  112. BX6 -X0*X2
  113. SA6 SCTB
  114. ARGERR A6 EXIT TO EXECUTIVE
  115.  
  116. SCTA BSS 1 TEMPORARY STORAGE (A0)
  117. SCTB BSS 2 LOCATION FOR MESSAGE HEADER
  118.  
  119. * TABLE OF TERMINAL CHARACTER TYPES.
  120. *T 42/ CHARACTER TYPE, 18/ NETWORK REQUIRED VALUE
  121.  
  122. TSCT BSS 0 TABLE OF CHARACTER TYPES
  123. VFD 42/0LASCII7,18/2
  124. VFD 42/0LASCII5,18/3
  125. VFD 42/0LDISPLAY,18/4
  126. TSCTL EQU *-TSCT LENGTH OF CHARACTER TYPE TABLE
  127.  
  128.  
  129.  
  130. * COMMON DECK.
  131.  
  132.  
  133. *CALL COMKZFN
  134.  
  135.  
  136. END