SUBROUTINE ASNRST ( dodev, douic, dev, lendev, + uic, lenuic, defdev, lendv, + defuic, lenuc, ids ) C+ C SUBROUTINE ASNRST C C Environment: System Utility DEF C Env. Vsn: 01.00 C C Subroutine/Function Description: C C Sets up and spawns the ASN =KMS$CURRENT and ASN =KMS$LAST C commands. C C Parameter List: C Name Type I/O Purpose C -------------------------- ------------- ------ ------------------------ C C dodev Logical I Changed devices? C douic Logical I Changed UICs? C dev Character*80 I Destination device C lendev Integer*2 I Length of DEV C uic Character*80 I Destination UIC C lenuic Integer*2 I Length of UIC C defdev Character*80 I Default device C lendv Integer*2 I Length of DEFDEV C defuic Character*80 I Default UIC C lenuc Integer*2 I Length of DEFUIC C ids Integer*2 O Error flag C C Data Structures: C COMMON Blocks: NONE C C C Side effects: NONE C C C------------------------------------------------------------------------- C Environmental Requirements C C Re-compile Procedure: See MOVEBLD.CMD C Compile Command: F4P ASNRST=ASNRST/NOTR/RO C Library: MOVE.OLB C Modules called: MCRCMD ( MOVE.OLB ) C C Test Procedures: C Test Data Files: NONE C Test Scripts: NONE C Documents: NONE C C Module Documentation: C Help File: NONE C Document File: C C Required Logicals: NONE C C Required Files: NONE C C C Written By: Robert Hays C KMS Fusion, Inc. C P.O. Box 1567 C Ann Arbor, Mich. 48106 C C Ident: RLH001 C Date: September 29, 1986 C C C Change Log: C Date Initials Ident Description C [dd-mmm-yy] [tbs] [tbs] [tbs......] C---------------------------------------------------------------------------- C- C IDENT /01.00/ C CHARACTER*80 dev, ! Device. + uic ! UIC. CHARACTER*80 defdev, ! Last device. + defuic ! Last UIC. CHARACTER*80 asncur, ! String for ASN command ! CURRENT. + asnlst ! String for LAST ASN command. CHARACTER*12 cur ! Constants. CHARACTER*9 lst ! C LOGICAL dodev, douic ! Change device or UIC? C INTEGER*2 lendev, lenuic, ids ! Lengths and error flag. INTEGER*2 lenasn, lencur, lenlst ! More lengths. INTEGER*2 lentot ! And more... INTEGER*2 lendv, lenuc ! And more! INTEGER*2 curlen, lstlen ! Do you believe it... C DATA asncur/'ASN '/, ! + asnlst/'ASN '/ ! DATA cur/'=KMS$CURRENT'/ ! DATA lst/'=KMS$LAST'/ ! DATA lenasn/4/ ! DATA lencur/12/ ! DATA lenlst/9/ ! C C Executable begins here. C asncur(lenasn+1:lenasn+lendev) = dev(1:lendev) ! Push current device curlen = lenasn + lendev ! into command. asncur(curlen+1:curlen+lenuic) = uic(1:lenuic) ! Push current UIC in. curlen = curlen + lenuic ! IF ( dodev .OR. douic ) THEN ! If we changed either, asncur(curlen+1:curlen+lencur) = cur(1:lencur)! push CURRENT on and lentot = curlen + lencur ! then CALL MCRCMD ( asncur, lentot, trmunt, ! spawn the command. + trmmne, ids ) ! asnlst(lenasn+1:lenasn+lendv) = ! Push default device + defdev(1:lendv) ! onto command. lstlen = lenasn + lendv ! asnlst(lstlen+1:lstlen+lenuc) = ! Push default UIC in. + defuic(1:lenuc) ! lstlen = lstlen + lenuc ! asnlst(lstlen+1:lstlen+lenlst) = lst(1:lenlst)! Push LAST onto string lentot = lstlen + lenlst ! and CALL MCRCMD ( asnlst, lentot, trmunt, ! spawn command. + trmmne, ids ) ! END IF ! RETURN ! END