Specifications

184 Chapter 8
Save and Recall Files
Example Programs for Saving/Recalling a File
[Y/N]",Inp_chr$
1630 IF UPC$(Inp_chr$)="N" THEN
1640 IF UPC$(File_type$[1,1])="A" THEN
1650 OUTPUT @Agte4991a;"MMEM:STOR:TRAC:ASCII "&File$
1660 ELSE
1670 OUTPUT @Agte4991a;"MMEM:STOR:TRAC "&File$
1680 END IF
1690 OUTPUT @Agte4991a;"SYST:ERR?"
1700 ENTER @Agte4991a;Err_no,Err_mes$
1710 IF Err_no<>0 THEN
1720 BEEP
1730 PRINT Err_mes$&" occured"
1740 PRINT
1750 GOTO Input_name
1760 ELSE
1770 PRINT "save done"
1780 PRINT
1790 END IF
1800 ELSE
1810 GOTO Input_name
1820 END IF
1830 SUBEND
1840 !
1850 SUB Recall_data(@Agte4991a)
1860 DIM File$[256],Inp_chr$[30],Err_mes$[50]
1870 INTEGER Err_no
1880 !
1890 Input_name:!
1900 INPUT "Input binary data file name without extension you
wish to recall.",File$
1910 File$=""""&File$&""""
1920 PRINT "file name : "&File$
1930 PRINT
1940 INPUT "Do you want to change file name again?
[Y/N]",Inp_chr$
1950 IF UPC$(Inp_chr$)="N" THEN
1960 OUTPUT @Agte4991a;"MMEM:LOAD:TRAC "&File$
1970 OUTPUT @Agte4991a;"SYST:ERR?"
1980 ENTER @Agte4991a;Err_no,Err_mes$
1990 IF Err_no<>0 THEN
2000 BEEP
2010 PRINT Err_mes$&" occured"
2020 PRINT
2030 GOTO Input_name
2040 ELSE
2050 PRINT "recall done"
2060 PRINT
2070 END IF
2080 ELSE
2090 GOTO Input_name
2100 END IF
2110 SUBEND
2120 !
2130 SUB Save_citi(@Agte4991a)
2140 DIM File$[256],Inp_chr$[30],File_type$[30],Err_mes$[50]
2150 INTEGER Model,Err_no
2160 !
2170 PRINT "Select the model of the CITIfile as follows;"