53. SCAIO Command The SCAIO command reads and writes a SCA MAD file. The SCAINPUT command reads and writes a SCA FSV file. The FSV file format is used within b34s to save data. This file format is also used with the MATRIX command. The SCA MAD format is substantially slower but is useful to provide another way to move data between SCA and B34S and between the SCA Work Bench and B34S. The SCA MAD file format is used by the PGMCALL command to move data into SCA and run commands. The WRITESCA option of the SCAIO command is used to just create the data file. The SCAIO command supports missing data and the redefine option. Form of command. B34SEXEC SCAIO$ VAR variable list$ B34SEEND$ SCAIO sentence options. READSCA - Reads a SCA dataset. This is the default. WRITESCA - WRITES a SCA dataset. REWIND - Places data at top of file. This is the default. ADD - Adds data to end of file. SCAIO sentence parameters. FILE(' ') - Sets name of file. Required. DATASET( ) - Sets dataset name. If omitted, for a read uses dataset # 1. For a write uses name B34SDAT. VAR sentence. The VAR sentence lists variables to save. If the VAR sentence is not present, all variables are saved. The VAR sentence is not used for a read. This means that < 99 series must be in the file. Note: In the unlikely event that the file contains more that 99 series, the appropriate way to proceed is to read the mad file into the matrix command with call getsca( ); and build an subset of the series into the b34s data step using the command call makedata( ); Example 1. simple job B34SEXEC DATA NOHEAD NOOB=6$ INPUT X Y Z$ DATACARDS$ 11 33 55 22 99 99 33 23 14 01 44 88 01 33 77 22 24 25 B34SRETURN$ B34SEEND$ B34SEXEC scaio writesca file('mydata.mad') dataset(test); b34srun; Example # 2 Read the dataset from example 1. b34sexec scaio readsca file('mydata.mad') dataset(test); b34srun; Example # 3 Make a file containing both REAL*8 and Character*8 Data b34sexec data $ input name number phone room start$ character name$ datacards$ Rebeccah 11 424 112 1 Carol 4 450 112 2 Louise 9 409 110 3 Gina 6 474 110 4 Mimi 10 410 109 5 Alice 1 411 106 6 Brenda 3 414 105 7 David 5 438 141 8 Betty 2 464 141 9 Holly 8 466 140 10 Gretel 7 465 140 11 b34sreturn$ b34srun$ b34sexec scaio writesca file('mydata.mad') add dataset(people); b34srun;