One of our customers needed a way to convert Copylib members into individual files. Here is a command file called Libsplit that performs this task:
parm copylibfile parm outfile file copylib=!copylibfile purge tempfile file tempfile;dev=disc;nocctl;rec=-80,,f,ascii;save /set list page off name off /listq $dev tempfile (@) reset tempfile /text tempfile /set left 1; set right 8 /holdq all /set right 16; set left 9 /replaceq $hold all /set left; set right /changeq 9 ");keep " all /changeq 1 "text (" all purge !outfile :/keep !outfile
You invoke the command file by typing its name, followed by the name of your Copylib and the name of the second command file you want to create. For example,
/libsplit copylib.source xyzzy
Then you need to edit the resulting file ("xyzzy" in this case) to verify that the file names in the Keep statements are all valid names. E.g., you may have to remove hyphens, underscores, etc. Once you have made the changes, you execute the series of commands just by "using" the file.