Reading data with Sunsort

Using the GUI to read data

If you're using the Graphical User Interface to read data then the sequence of actions listed below. Unless otherwise specified, the controls are on the Sunsort main window.

  1. Select the appropriate sort medium. If it's a tape based medium then:
    1. Select any options you require.
    2. Select the appropriate drive.
    3. enter the volume name (or NONANSI if it's not an ANSI tape).
    4. Press Mount.
  2. Ensure you have the correct data format selected in the Sunsort tool window.
  3. Enter the filename (or system name or command name).
  4. Press Open.
  5. Enter the number of records to skip (usually 0).
  6. Enter the number of records to read (use 0 or -1 to indicate all the records in a file).
  7. Press Read.

If you need to end the data read before it would naturally finish, then press the Stop button.

If you want to continue reading the same file, then ensure the Skip and Stop fields are set correctly and press Read.

When you've finished reading a file, press Close.

If you're reading files off tape then you may open another file on the same tape without remounting it. Only press Unmount when you have finished with the tape, this will cause the tape to be rewound and ejected.

Reading data from the command line or batch file

The sequence of commands is:

  1. If you want to read a file from tape, then you must mount it first. The syntax is:
            tapemount volume_name_or_NONANSI drive_number r
    	  
  2. Select the appropriate data format with the command:
            setsenv format format_name
    	  
  3. Open the data file with:
            open medium_name[/options] file_system_or_command_name
    	  
  4. Start sorting data with:
            sort number_of_records_to_skip number_of_records_to_sort
    	  

When you are opening a file on tape, you can specify options after the word tape. The options are:

no other sort media take options.

Once sorting has commenced, any commands you type will be passed to the sort process unless they are preceeded by a dollar sign. The two commands you are most likely to want to do this to are $killsort and $status. These commands cannot be used in a batch file.

You can stop sorting early by pressing Control-C though it may take a while to respond if the sort rate is low. This cannot be done within a batch file.

After you've stopped sorting, you may continue sorting on the same file by entering a sort command.

When you have finished reading a file use the command close to close it. This takes an optional argument which is the medium you wish to close but this is ignored at the moment so may be safely omitted.

When you've finished with a tape, use the command

        tapeumount r
      
This will rewind and eject the tape.

An example sequence of commands is:

        tapemount ANU01 0 r
        setsenv format megha
        open tape run03
        sort 0 -1
        close
        open tape run04
        sort 0 -1
        close
        tapeumount r
      

Steven M. Singer
Last modified: Fri Sep 3 16:00:11 BST 1999