parm file, group="Source" ## option list ## ## archive.xeq - Archives to TODAY's date, as calculated by the system ## Written by Alfredo Rego of Adager ## ## Modified by Tim Ericson: changed "!zero" to "0", ## checked for HpYear < 10 for future functionality, ## changed username from "Alfredo" to "Manager", ## changed "pass=..." to "pass=!HpJobType!HpJobNum". ## ## Note: This routine requires SM capability. ## SetVar nPoint, pos (".", "!file") if nPoint <> 0 then echo There is a dot in position !nPoint of the file's UNQUALIFIED name. echo The file's group name is the SECOND parameter, separated by a "," echo thus: ":archive file, group" (the default group is "source", echo the default account is aryymmdd, where "yymmdd" is today's date). return endif continue SetVar ArAcct "ar" if HpYear < 10 then SetVar ArAcct ArAcct + "0" endif SetVar ArAcct ArAcct + "!HpYear" if HpMonth < 10 then SetVar ArAcct ArAcct + "0" endif SetVar ArAcct ArAcct + "!HpMonth" if HpDate < 10 then SetVar ArAcct ArAcct + "0" endif SetVar ArAcct ArAcct + "!HpDate" continue NewAcct !ArAcct, Manager; pass=!HpJobType!HpJobNum continue NewGroup !Group.!ArAcct copy !file.!group, !file.!group.!ArAcct; ask echo echo copied !file.!group to !file.!group.!ArAcct