/* Get the current command. */ cmd=upcase(word(1)); /* Execute any custom commands. */ if cmd='KEEP' then link keepvals; else if cmd = 'RETRIEVE' then link retvals; /**********************************************************************/ keepvals: /* Open a temporary data set containing all */ /* variables on the data set being edited with */ /* the FSEDIT procedure. */ pubskel=open('work.pubskel','U'); call set(pubskel); /* Get the second observation (the first is used */ /* for sending letters). */ rc=fetchobs(pubskel,2,'NOSET'); /* Push the current value of all variables */ /* into the observation. */ if update(pubskel) then do; end; /* We no longer want the DSID to be set, */ /* so close and then reopen the data set. */ rc=close(pubskel); pubskel=open('work.pubskel','U'); /* Again fetch the second observation ... */ rc=fetchobs(pubskel,2); /* ... for all variables. VAR is an SCL list */ /* that contains character elements, each of */ /* which names a variable to be duplicated */ i=0; do while(i