image of READY prompt

Wang2200.org

Listing of file='ASK?327A' on disk='vmedia/bsc_3271_rel_1.14.04.wvd.zip'

# Sector 752, program filename = 'ASK?327A'
0010 REM ASK?327A 01/22/86 3270 Attach Screen 1
   : GOTO 1500
   : ON AGOTO 2010,2030
1490 REM %Prompt screen 1
1500 B$=" "
   : P0=11
   : SELECT @PART"3270UNIV"
1501 DIM A1$1
   : BIN(A1$)=#TERM+48
   : IF A1$>"9"THEN ADD(A1$,07)
1502 DIM Y$(4)62
   : MAT REDIM Y$(4)62
   : A=VAL(STR(@C$,24))-65
   : DATA LOAD DC OPEN T#0,"3270CALL"
   : IF A<1OR A>14THEN 1504
   : DSKIP #0,AS
1504 DATA LOAD DC #0,Y$()
   : MAT REDIM Y$(15)16
1505 IF STR(@A$,40,1)="L"OR @C$=" "THEN 1800
1506 FOR C=1 TO 12
   : $TRAN(STR(Y$(C),9,8)," .")R
   : IF STR(Y$(C),9,8)=" "THEN STR(Y$(C),9,1)=A1$
   : NEXT C
   : REM /.Set valid terminals
1510 STR(Z$,12,12)="11111111"
   : REM /.Initialize prompts
1520 P=1
   : GOSUB '33
   : REM /.Prompt for attachment
1530 P=0
   : GOSUB 2890
   : REM /.Set attachment parameters
1550 IF C$(1)=HEX(02)THEN 1700
   : REM /.Jump if PRINT stream
1565 REM .Attach Station
1570 B$="T"
   : IF P1=0THEN 1590
   : REM /.jump if terminal only
1580 DIM P1$64
   : REM .Attach printer 1st
   : A=C
   : REM ./TEMP SAVE
   : C=P1
   : REM /.C=Printer 1-4
   : P1=A
   : REM /.Station 1-8
   : A=#PART
   : A$=P1$
   : GOSUB 3290
   : REM /.Attach printer
   : C=P1
   : B$="B"
1590 A$=STR(Y$(C),9)
   : C$=" "
   : IF A$<>" "THEN BIN(C$)=LEN(A$)+48
   : N$=STR(Y$(C),,8)
   : GOSUB 3600
1600 REM .N$=I.D. A$=Terminal type B$=T/P/B
1610 LOAD DC T#0,"B327020"
1700 REM .Attach PRINT stream
   : IF P=-2THEN 1710
   : IF STR(N$,41)<>" "THEN 1500
   : REM /.jump if autoload
   : GOTO 1810
1710 REM .PC terminal mode printing on 204
   : B$="P"
   : GOSUB 3290
   : GOTO 1610
1790 IF STR(N$,41)<>" "THEN 1500
   : REM /.jump if autoload
   : GOTO 1810
1800 GOSUB '99(10,"T.C. Board not yet fully Loaded and cycling")
1810 $CLOSE#5
   : LOAD DC T#0,N$(1)
1990 REM %..ASKAPARM - 3270 question interface
2000 REM ...3270  Ask Parameters
2010 ON P GOSUB 2230
   : RETURN
2030 ON P GOSUB 2210
   : RETURN
2040 REM . A$  -  DESCRIPTION
2050 REM . D$(    DESCRIPTION OF VALUE
2060 REM .@A$  Attachment data
2070 REM .@C$  Configuration data
2080 REM . Z$  Configuration data and attachment prompts
2090 REM .01 02 .. 04 05 .. 07 08 .. 10 11 Printers
2100 REM .12-19   Attachment prompts
2110 REM .21-23   Printer address
2120 REM .24-25   Form length
2130 REM .31    < 3270 Emulation
2140 REM .33   ?2 No. Stations
2150 REM .34   ?3 No. Printers
2160 REM .41 42 .. 44 45 .. 47 48 .. 50 51  Stations  1-4
2170 REM .53 54 .. 56 57 .. 59 60 .. 62 63  Stations  5-8
2180 REM ."3270CALL" contains EQUATES information
2190 REM .For each station and printer -- 8 byte ID and 8 byte access validity
     .
2200 REM %^...QUESTIONS
2210 D$="3 2 7 1  A t t a c h m e n t  -- Key SF '0 to exit"
   : P=1
   : P9=9
2220 IF STR(Z$,34,1)="0"THEN P9=5
2230 INIT(20)D$()
   : ON A GOTO 2250,2440,2460,2474,2490,2620,2720,2760,2790
2232 REM .....  ? 1, Ln2, Ln3, Ln4, ? 5, ? 6, ? 7, ? 8, ? 9
2240 REM .? 1
2250 A$="ATTACH DEVICE"
2260 IF P1>0THEN PRINT AT(8,8);"ATTACH PRINTER";STR(P1$,9,10);STR(@P$(P1),1,2)
     ;AT(2,8)
2270 D$(2)="Printer"
   : IF STR(Z$,34,1)="0"THEN D$(2)="No Action"
2275 REM .See if partition already attached
2280 BIN(B$)=#PART+48
   : C4=POS(STR(@A$,13,8)=B$)
   : REM /.Station?
   : C=POS(STR(@A$,21,4)=B$)
   : REM /.Printer?
2290 IF C4+C=0THEN 2340
   : IF C4=0THEN 2320
   : IF C=0THEN 2330
2300 REM %0 C5 ?1 Station flag
2301 REM .=1 Reattach this station -- if partition is already assigned.
2302 REM .=2 Restricted terminal   -- Terminal denied access.
2303 REM .=3 Specific terminal
2304 REM .=4 Next available        -- if Terminal number is specified.
2305 REM .=5 Reattach Stat.& Prntr -- if partition is already assigned.
2306 REM .=6 Attach Stat.& ReAt.Prntr
2308 REM .EQUATES Terminal field contains legal terminals 1-9,A-D
2309 REM .If Terminal field is spaces it is accessible to all.
2310 D$(1)="Reattach Station & Printer"
   : C5=5
   : GOTO 2325
2320 D$(1)="Attach Station & Reattach Print"
   : C5=6
2325 BIN(C$(9))=1
   : IF VAL(C$(1))=2THEN RETURN
   : BIN(C$(6))=C
   : BIN(C$(9))=2
   : RETURN
2330 D$(1)="Reattach this Station"
   : C5=1
   : RETURN
2340 E=VAL(STR(Z$,33))-48
   : B$=A1$
   : FOR C=1 TO E
   : IF STR(Y$(C),9,8)=" "THEN STR(Y$(C),9,1)=B$
   : IF POS(STR(Y$(C),9,8)=B$)>0THEN 2380
   : NEXT C
   : GOTO 2390
2380 C=E
   : NEXT C
   : D$(1)="Next available station"
   : C5=4
2390 FOR C=1TO E
   : IF STR(Y$(C),9,8)<>" "THEN IF POS(STR(Y$(C),9,8)=B$)=0THEN STR(Y$(C),9,1)
     ="R"
   : NEXT C
2400 C4=0
   : FOR C=ETO 1STEP -1
   : IF STR(Y$(C),9,1)<>"R"THEN IF STR(@A$,C*3+38,1)=" "THEN C4=C
   : NEXT C
2405 FOR C=9TO VAL(STR(Z$,34))-48+8
   : IF STR(Y$(C),9,8)<>" "THEN IF POS(STR(Y$(C),9,8)=A1$)=0THEN STR(Y$(C),9,1
     )="R"
   : NEXT C
2410 E=0
   : IF C4>0THEN 2420
   : C5=2
   : D$(1)="Terminal denied access"
   : RETURN
2420 D$(3)="Specific terminal"
   : IF STR(Z$,34,1)="0"THEN RETURN
   : D$(4)="Next Station + Printer"
   : D$(5)="Specific Station + Printer"
   : RETURN
2430 REM .Line 2 (No prompt)
2440 A$="YOU ARE"
   : E=-1
   : D$(1)="on Term.=# Part.=#"
   : STR(D$(1),10,1)=A1$
   : BIN(STR(D$(1),18,1))=#PART+48
   : RETURN
2450 REM .Line 3 No prompt
2460 A$=STR(Z$,33)
   : STR(A$,2)=" STATIONS CONFIGURED"
   : E=-1
2470 D$(1)=STR(Z$,41,((VAL(A$)-48)*3)-1)
   : RETURN
2472 REM .Line 4 No prompt
2474 A$=STR(Z$,34)
   : STR(A$,2)=" PRINTERS CONFIGURED"
   : E=-1
2476 IF STR(A$,1,1)>"0"THEN 2478
   : D$(1)="None"
   : RETURN
2478 D$(1)=STR(Z$,1,((VAL(A$)-48)*3)-1)
   : RETURN
2480 REM .? 5
2490 A$=" "
   : IF C$=HEX(08)THEN RETURN
   : A$="ATTACH STATION"
   : E=VAL(STR(Z$,33))-48
   : ON VAL(C$(1))GOTO 2500,110,,2500
   : C5=3
2500 ON C5 GOTO ,2530,2530,,,2530
2505 REM .Find next available unreserved port
2510 FOR C=1TO E
   : IF C4>0THEN 2570
   : IF STR(Y$(C),9,1)<>"R"THEN IF STR(@A$,C*3+38,1)=" "THEN 2560
   : NEXT C
2520 REM .Pick up station data from Z$ 41 on
2530 FOR C=1 TO E
   : D$(C)=STR(Z$,C*3+38,3)&STR(Y$(C),,8)
   : IF STR(@A$,C*3+38,1)=" "THEN 2540
   : STR(D$(C),13)="Attached  T="&STR(@A$,24+C,1)&"  P="&STR(@A$,12+C,1)
   : GOTO 2550
2540 IF STR(Y$(C),9,1)="R"THEN STR(D$(C),13)="Reserved for others"
2550 NEXT C
   : E=-2
   : RETURN
2560 C4=C
2570 C=C4
   : BIN(C$(5))=C
2580 D$(1)=STR(@C$,C*3+38,3)&STR(Y$(C),,8)
   : C=E
   : NEXT C
   : E=-1
   : RETURN
2620 IF VAL(C$(1))=2THEN 2640
   : IF C5<5THEN 2640
   : REM .Reattach printer then station
   : GOSUB 2670
   : C=POS(STR(@A$,21,4)=B$)
   : GOSUB 2705
   : RETURN
2630 REM .? 6
2640 IF STR(Z$,34,1)="0"THEN 110
   : ON VAL(C$(1))GOTO 110,,110
2660 REM .Pick up printer data from Z$ 1 on
2670 C4=C
   : FOR C=1 TO VAL(STR(Z$,34))-48
2675 D$(C)=STR(Z$,C*3-2,2)&" "&STR(Y$(C+8),,8)
   : REM /.Stream & ID
2676 IF STR(Y$(C+8),9,1)="R"THEN STR(D$(C),4)="Reserved for others"
2680 IF STR(@A$,C*3-2,1)<>" "THEN STR(D$(C),13)=" -- Attached "&STR(@P$(C),15,
     3)
2685 IF STR(Y$(C+8),9,8)=" "OR POS(STR(Y$(C+8),9,8)=A1$)>0THEN BIN(C$(6))=C
2690 NEXT C
2695 IF C$(1)>HEX(03)THEN 2700
   : A$="ATTACH PRINTER"
   : E=-2
   : C=C4
   : RETURN
2700 C=0
   : REM /.Find suitable print stream
2702 C=C+1
   : IF C=5THEN 3450
   : A$=D$(C)
   : IF A$=" "THEN 2702
   : IF STR(A$,4,1)="A"THEN 2702
   : A$=Y$(8+C)
   : IF STR(A$,9,8)=" "THEN 2705
   : IF POS(STR(A$,9,8)=A1$)=0THEN 2702
2705 A$=D$(C)
   : W$=STR(A$,13,3)
   : IF W$=" "THEN W$="204"
   : IF C$(1)>HEX(03)THEN W$="204"
   : STR(Z$,21,3),STR(A$,13,3)=W$
   : INIT(" ")D$()
   : D$(1)=A$
   : E=-1
   : A$="..AND PRINTER"
   : BIN(C$(6))=C
   : C=C4
   : RETURN
2710 REM .?7
2720 IF STR(@P$(5),41,2)="No"THEN 110
2730 IF C$(1)<>HEX(02)THEN 110
   : A$="SPOOL TO DISK?"
   : D$(1)="No"
   : D$(2)="Yes"
2740 RETURN
2750 REM .? 8
2760 IF C$(1)<>HEX(02)THEN 110
   : IF C$(7)<>HEX(01)THEN 110
2770 E=VAL(C$(6))
   : IF STR(Z$,21,3)=" "THEN STR(Z$,21,3)=STR(@P$(E),15,3)
   : GOSUB '203("PRINTER ADDRESS",21,3,STR(Z$,21,3))
   : RETURN
2780 REM .?9
2790 IF C5>4THEN 110
   : IF C$(1)<>HEX(02)THEN 110
   : IF C$(7)<>HEX(01)THEN 110
   : IF STR(Z$,C1,3)="204"THEN 110
2800 A$="RUN CODE IN"
   : D$(1)="Printer task"
   : D$(2)="Terminal task as system printer"
   : RETURN
2810 DEFFN'203(A$,C1,C2,D$(1))
   : E=3
   : BIN(C$)=1
2820 D$(3)="Key Printer Address"
   : STR(D$(),97)="215 216 217 218 204"
   : IF C5>4THEN STR(D$(),112)=" "
2830 RETURN
2840 DEFFN'99(A,A$)
   : REM /.Print and delay n seconds
2850 PRINT HEX(03);BOX(5,79);HEX(0A0A0E);TAB(40-LEN(A$)/2);A$
2860 IF A=0 THEN RETURN
2870 FOR A=ATO 0STEP -1
   : PRINT A;HEX(0C)
   : $GIO (75FF,A$)
   : NEXT A
   : RETURN
2880 REM %^.Set Attachment Values
2890 E=VAL(STR(Z$,33))-48
   : ON VAL(C$(1))GOTO ,3100,,3085,3085
2900 C=C4
   : ON C5GOTO 2950,2960,3020,2920,3085,3085
   : REM /.C5 is ?1 options flag
2910 REM .4=Next available
2920 IF C$(1)=HEX(03)THEN 2990
   : REM /.jump if specified else find next available
2930 FOR A=1TO E
   : IF STR(@A$,A*3+38,1)=" "THEN IF STR(Y$(A),9,1)<>"R"THEN 2970
   : NEXT A
2940 GOSUB '99(9,"All stations attached")
   : GOTO 3480
2950 A$="Reattaching this station"
   : C=VAL(C$(5))
   : GOTO 3030
2960 GOSUB '99(9,"Terminal restricted")
   : GOTO 3480
2970 C=A
   : A=E
   : NEXT A
   : GOTO 3020
2980 REM .Specific station
2990 C=VAL(C$(5))
   : IF STR(@A$,C*3+38,1)<>" "THEN 3450
3000 IF STR(Y$(C),9,1)="R"THEN 3460
3010 B$=A1$
   : IF POS(STR(@A$,25,8)=B$)>0THEN 3400
3020 A$="Attaching station to cluster"
3030 BIN(STR(@A$,C+12))=#PART+48
   : STR(@A$,C+24,1)=A1$
3040 STR(@A$,C*3+38,2)=STR(@C$,C*3+38,2)
3050 GOSUB '99(0,A$)
3060 PRINT AT(6,3);"Within station task use EDIT key to RESET       SF key '29
      for Utility"
3070 A$=STR(Y$(C),,8)
   : REM /.station equate
3075 RETURN
3080 REM %.Attach station + Printer
3085 BIN(C$(7))=1
   : GOSUB 3100
   : IF C5>4THEN C5=1
   : IF VAL(C$(1))=4THEN C=1
   : ELSE C=3
   : BIN(C$(1))=C
   : GOTO 2890
3090 REM %.Attach Print stream
3100 IF STR(Z$,34,1)="0"THEN RETURN
   : C=VAL(C$(6))
   : IF STR(Y$(C+8),9,1)="R"THEN 3460
   : IF STR(@A$,C+20,1)<>" "THEN 3440
   : IF C$(7)<>HEX(02)THEN 3130
3110 A$="Disk     xxx"
   : STR(A$,10,3)=STR(@P$(5),55,3)
3120 A=3
   : IF STR(@P$(5),24,9)<>"Delete"THEN 3290
   : GOSUB '99(9,"Delete in Progress")
   : GOTO 3480
3130 IF STR(@P$(5),24,6)="Delete"THEN IF STR(@P$(C),6,1)="D"THEN 3120
   : REM /.jump if temp Detached
3140 REM .Printer
3150 W$=STR(Z$,21,3)
3160 SELECT #5<W$>
   : ERRORGOTO 3420
3165 IF W$="204"THEN 3225
3166 A$=$PSTAT(3)
   : IF C$(9)=HEX(01)THEN IF STR(A$,17,7)<>"3270PRN"THEN 3425
3170 $IF OFF #5,3430
   : ERRORGOTO 3420
3180 $IF OFF #5,3410
   : $BREAK
3190 GOSUB 3214
3200 $GIO#5(010002011212400040004000,A$)
   : IF STR(A$,8,1)=HEX(00)THEN 3230
   : A$="Ready Printer "&W$
3210 KEYIN B$,3150,3480
   : GOSUB '99(1,A$)
   : GOTO 3150
3212 REM %.Test printer for attaching
3214 A9=1
   : IF W$="204"THEN A9=600
3216 A$="Testing printer "&W$
   : GOSUB '99(2,A$)
3218 A=A9+1
3220 $BREAK
   : $GIO#5(010002011212400040004000,A$)
   : A=A-1
   : IF STR(A$,8,1)=HEX(00)THEN 3222
   : IF A=A9OR A<1THEN 3224
   : GOTO 3220
3222 IF A9=1THEN RETURN
   : IF A>0 THEN 3220
   : RETURN
3224 IF A=A9THEN 3220
   : GOTO 3430
3225 GOSUB '99(0,"Assure Terminal Printer is Ready -- Key RETURN")
   : PRINT AT(2,17);
   : KEYIN A$,,3480
3229 REM %0 P1 Partition #, P1$ Attach data
   : REM .P=0 Non-printer  =1 Non-204.printer  =2 (204 printer)
3230 A$="Printer  "&W$
   : P=1
   : IF W$="204"THEN P=2
   : IF P=2THEN BIN(C$(9))=2
3240 A=3
   : IF VAL(C$(9))=2THEN A=#PART
   : ELSE GOTO 3290
3250 REM .Hog printer now but attach when selecting terminal
3260 $OPEN #5
   : P1$=A$
   : P1=C
   : RETURN
3280 REM %.Set PRINT attach parameters
3290 $BREAK
   : STR(@P$(C),66)=STR(Y$(C+8),,8)
   : REM /.Printer equate
3300 STR(@P$(C),35,11)=HEX(0000FF0000FF0000FF0000)
   : REM /.binary counts
3310 STR(@P$(C),6,18)=A$
3320 STR(@A$,C*3-2,2)=STR(@C$,C*3-2,2)
3330 BIN(STR(@A$,C+20))=A+48
   : REM /.Partition
3340 STR(@A$,C+32,1)=A1$
   : REM /.Terminal
3350 STR(A$,15)="Attaching on stream "&STR(@P$(C),1,2)
   : GOSUB '99(0,A$)
3360 IF P1=0THEN 3390
3370 STR(@P$(C),24,10)="Attached"
   : STR(@P$(C),18,2)="-"&A1$
   : BIN(STR(@P$(C),34))=#TERM
   : RETURN
3380 STR(@D$(C+8),2)=HEX(C0)
   : @T$(C+8)=HEX(03)
   : RETURN
3390 IF STR(@D$(C+8),2,1)=HEX(C0)THEN RETURN
   : A=A+1
   : $BREAK
   : IF A<4^7THEN 3390
   : PRINT
   : STOP "  ATTACH FAILED -- Check Partition 3. "#
3395 REM %.CRT messages
3400 GOSUB '99(9,"This station is already attached")
   : GOTO 3480
3410 GOSUB '99(9,"Printer selected is currently being used")
   : GOTO 3480
3420 GOSUB '99(9,"Printer selected has not been configured")
   : GOTO 3480
3425 GOSUB '99(9,"Printer task not loaded in partition 3")
   : GOTO 3480
3430 GOSUB '99(5,"Printer selected is not ready")
   : GOTO 3480
3440 IF C5>4THEN IF C$(1)=HEX(01)THEN 3130
3450 GOSUB '99(9,"Stream selected is already attached")
   : GOTO 3480
3460 GOSUB '99(9,"Stream address selected is reserved")
3480 RETURN  CLEAR
   : GOTO 1520
3590 REM %.Test terminal type
3600 $IF OFF /001,3610
   : KEYIN C$
   : GOTO 3600
3610 PRINT HEX(0208090F)
   : A=0
   : A$=" 2236D"
   : PRINT AT(7,5);"Using a Wang Terminal ";
3620 A=A+1
   : IF A>5000THEN 3630
   : $IF OFF /001,3620
   : INPUT A$
3630 RETURN