83 lines
2.5 KiB
Plaintext
83 lines
2.5 KiB
Plaintext
$ set noverify
|
|
$!==============================================================================
|
|
$! Author: Anselm Hofer
|
|
$!
|
|
$! Diese Commandoprozedur erlaubt es, die ACCEL- oder MUTRACK-Files
|
|
$! "AC_nnn1.'P3'" bis "AC_nnn2.'P3'" (bzw. "MU_nnn1.'P3'" bis "MU_nnn2.'P3'"
|
|
$! mit nnn1 = 'P4' und nnn2 = 'P5' auf neue Files zu kopieren, deren
|
|
$! fortlaufende Nummer um jeweils 'P6' erhoeht ist.
|
|
$!
|
|
$! Aufzurufen ueber '$ ACCOPY von bis offset' bzw. '$ MUCOPY von bis offset'
|
|
$!==============================================================================
|
|
$ if P6.EQS.""
|
|
$ then
|
|
$ say = "write sys$output "
|
|
$ say "==============================================================================="
|
|
$ say "ACCOPY extension firstNumber lastNumber offset"
|
|
$ say "MUCOPY extension firstNumber lastNumber offset"
|
|
$ say "==============================================================================="
|
|
$ exit
|
|
$ endif
|
|
$ progr = P1 ! = 'MUTRACK' oder 'ACCEL'
|
|
$ Kuerzel = P2 ! = 'MU_' oder 'AC_'
|
|
$
|
|
$ extension = P3
|
|
$ Firstindx = P4
|
|
$ Lastindx = P5
|
|
$ IndxOffset = P6
|
|
$!------------------------------------------------------------------------------
|
|
$
|
|
$ write sys$output " "
|
|
$ oldIndx = firstIndx
|
|
$
|
|
$ next:
|
|
$ newIndx = 0 + oldIndx + indxOffset ! '0 + ' notwendig, damit als Dezimal-
|
|
$ ! zahl interpretiert
|
|
$! -----------------------------------------------------------------------------
|
|
$ if oldIndx.LT.10
|
|
$ then
|
|
$ oldFile = "''progr'$outDirectory:''kuerzel'_000''oldIndx'.''extension'."
|
|
$ goto label1
|
|
$ endif
|
|
$ if oldIndx.LT.100
|
|
$ then
|
|
$ oldFile = "''progr'$outDirectory:''kuerzel'_00''oldIndx'.''extension'."
|
|
$ goto label1
|
|
$ endif
|
|
$ if oldIndx.LT.1000
|
|
$ then
|
|
$ oldFile = "''progr'$outDirectory:''kuerzel'_0''oldIndx'.''extension'."
|
|
$ goto label1
|
|
$ endif
|
|
$ oldFile = "''progr'$outDirectory:''kuerzel'_''oldIndx'.''extension'."
|
|
$! -----------------------------------------------------------------------------
|
|
$ label1:
|
|
$ if newIndx.LT.10
|
|
$ then
|
|
$ newFile = "''progr'$outDirectory:''kuerzel'_000''newIndx'.''extension'."
|
|
$ goto label2
|
|
$ endif
|
|
$ if newIndx.LT.100
|
|
$ then
|
|
$ newFile = "''progr'$outDirectory:''kuerzel'_00''newIndx'.''extension'."
|
|
$ goto label2
|
|
$ endif
|
|
$ if newIndx.LT.1000
|
|
$ then
|
|
$ newFile = "''progr'$outDirectory:''kuerzel'_0''newIndx'.''extension'."
|
|
$ goto label2
|
|
$ endif
|
|
$ newFile = "''progr'$outDirectory:''kuerzel'_''newIndx'.''extension'."
|
|
$! -----------------------------------------------------------------------------
|
|
$ label2:
|
|
$ cop /log 'oldFile' 'newFile'
|
|
$
|
|
$ if oldIndx.LT.LastIndx
|
|
$ then
|
|
$ oldIndx = oldIndx + 1
|
|
$ goto next
|
|
$ endif
|
|
$
|
|
$ write sys$output " "
|
|
$
|