\cancel mode verify 

! Description:  Set filename and write a vis5d file with up to 8 variables.
!  Data is written to a scratch file, then appended to the data in the file.


! Script usage:
!                arg 1     arg 2      arg 3       arg 4           arg 9   
!      GO wv5d [file-name]  variable1 [variable2] [variable3] ... [variable8]

!       defaults: file-name="vis5d_out.v5d"
!    
!  Must have at least one variable
!  Default to 0 any more variables not specified.

! test argument before performing any actions

query/ignore $2"<vis5d_append writes at least one variable to the file. Supply variable name"


!  Write the scratch file with new time records.
 
let vflag = writev5d($2, $3%0%, $4%0%, $5%0%, $6%0%, $7%0%, $8%0%, $9%0%, "appnd_scratch.v5d")
LOAD/TEMPORARY vflag

!  v5dappend utility appends the new file onto the old.

MESSAGE/CONTINUE !
sp v5dappend appnd_scratch.v5d $1%vis5d_out.v5d%
sp rm appnd_scratch.v5d

SAY To view the file with Vis5D say:   GO vis5d_start $1%vis5d_out.v5d%


set mode/last verify


