========================================================================
#frame
#push AF AN cmd parts pext sext temploc partfile fvar fname
#push work_vol1 work_vol2 tfile tloc tgt_file done1 inp yy mm dd hh ss mi
#push temp done #exit count #inlineprefix #informat stime etime isDef
#def myarr STRUCT begin subvol vol_part(0:63); end;
#set #inlineprefix +
#set #informat tacl
#output +----------------------------------------------------------+
#output ! @Copyright 2011 Hewlett Packard !
#output ! Tool to do a guided down-coversion of Enscribe 64 archive!
#output ! file to a legacy 16 partition Enscribe file !
#output +----------------------------------------------------------+
#output
#setmany yy mm dd hh mi ss, [#contime [#timestamp]]
#set stime [mm]\[dd]\[yy] [hh]:[mi]:[ss]
#output Start time: [stime]
#output
#set #exit 0
#output Before proceeding further, please get the following info
#output 1. Name of the PAKFILE or the tape where the archive exists
#output 2. 3 volumes where no partition of the target would exist
#output 3. Create the target file with partitions and the appropriate keys
#output 4. The number of secondary partitions in the archive
#output 5. The list of volumes where the source files (in archive) existed
#output You'll have an option to manually enter them or list them in a
file.
#output 6. The primary and secondary extents of the file in archive
#output
#output This tool is meant to convert one E64 file in to E16 file, at a time.
#output
#set done [#input Press enter when ready: ]
#set done 0
#output
== Get archive format
#set temp ==blank
#set done 0
[#loop |while| (done=0) |do|
#set temp [#input What is the archive format (Pak/Tape)? Enter P/T: ]
[#case [temp]
| P p T t |
#set done 1
#set AF [temp]
| otherwise |
#output Wrong or bad option ([temp]). Valid options: P/T.
]
]
#output
== Next step get archive name
#set done 0
[#loop |while| ((done = 0) AND ([#exit] <> 1)) |do|
[#case [AF]
| P p |
#set cmd UNPAK
#set AN [#input Give the name of the PAK file: ]
[#if ([#fileinfo /EXISTENCE/[AN] ]) |then|
#set done 1
|else|
#output Invalid PAK file name!
]
| T t |
RESTORE Guidelines and Examples 163