SD - Save Document

(4/25/11)

PURPOSE

Saves a set of register variables or a comment in a document file. Up to 20 document files remain open until closed with 'SD E'.   Example.

SEE ALSO

SD E [Save Document - End]
SD IC [Save Document - In Core, Save registers]
DOC SORT [Sort Document file]
DOC CREATE [Create Document file]
DOC REN [Renumber Document file keys]
DOC SHUFFLE [Shuffle Document file]
VM [System call]

USAGE

.OPERATION: SD [key],[r1],[r2],[r3]
   <or>
SD -5,[r1],[r2],[r3]
   <or>
SD /NEW COMMENT FOR DOC FILE
   <or>
SD //NEW COMMENT FOR DOC FILE

.DOCUMENT FILE: DOC001
[Enter the name of the file where the register contents are to be placed.]

[There are four somewhat different methods of calling 'SD':
SD   [k],[r1],[r2],[r3]
[Using this method the value of [k] is used as a key for storing this register variable set ([r1],[r2],[r3]) in the file. If the contents of the register variables are: [k]=4, [r1]=30, [r2]=1.5, [r3]=270, then the document file DOC001 will be appended with a text record containing:
  4   3   30.0   1.5   270.0
where "4" is the key, "3" is the number of registers following the key, and "30.0", " 1.5", and "270.0" are the contents of the register variables [r1],[r2],[r3] in the same sequence as they appear in the 'SD' operation.]

SD   [k],[r1],[r2],[r3]
[Using this method when the value of [k] is negative (and greater than -100000000) then the absolute value of [k] is used as a key and this line of registers is placed in the document file proceeded by a semicolon similar to a comment. This allows the input and later retrieval of a limited set of values such as rotation angles which are somehow associated with the contents of the file. These lines will be treated like comments upon retrieval unless you request the retrieval of the appropriate negative key using 'UD'. This method is referred to as storing a comment key in the doc. file. ]

SD   /NEW COMMENT FOR DOC FILE
[Using this method, a new comment is added to the document file at the end of the previous contents.

SD   //NEW COMMENT FOR DOC FILE
[Using this method, a new comment is added to the document file at the end of the previous contents. The comment can contain variables whose values will be substituted (similar to the usage described in the 'VM' operation). Final comment length limited to 160 char.]

NOTES

  1. Any number of register values can be saved by one operation. However, the total number of characters on the operation line may not exceed 80.

  2. The key may be specified directly as a number, e.g.
        SD 15,[r1],[r2],[r3]
    No other registers may be specified in this manner.
    Example of an invalid operation:
        SD 15,27.0,[r2],[r3]

  3. The document file can be listed and edited with a text editor as long as one or more blanks are retained between each column of data. Each update via a run of SPIDER is marked by the date and time of the SPIDER session, as well as the project and data codes used.

  4. The key may also be the index of a DO-loop. However, do not use 'X' as an index, as an error will result.

  5. Information on the actual names of the register variables is lost in the document file.

  6. Up to 20 document files can be accessed concurrently. A document file is closed with the 'SD E' operation.

  7. To decrease the amount of information printed in the results file when using this operation use the 'MD' operation with OPTION: 'VERBOSE OFF'.

  8. Alternating use of 'SD' and 'UD' for the same file may cause SPIDER to get confused as to which document files are open. You will have to use 'SD E' and 'UD E' to overcome this confusion.

  9. Following release: 19.08 the register variables are written with 13 characters, this should allow more exact specification for integers up to a little beyond: 9,999,999.

SUBROUTINES

SAVDOCQ, OPENDOC, LUNDOC

CALLER

DRIV3

© Copyright Notice /       Enquiries: spider@wadsworth.org