Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!zephyr.ens.tek.com!uw-beaver!mit-eddie!snorkelwacker.mit.edu!apple!usc!samsung!rex!uflorida!gatech!ncsuvx!news From: kirk@hobbes.catt.ncsu.edu (Kirk Krauss) Newsgroups: comp.lang.rexx Subject: Re: REXX, VM/CMS Message-ID: <1991Jan22.022019.5280@ncsuvx.ncsu.edu> Date: 22 Jan 91 02:20:19 GMT Reply-To: kirk@hobbes.catt.ncsu.edu (Kirk Krauss) Organization: Computer and Technologies Theme Program Lines: 37 In article 388, Steve Siperas asks how to pull files successively from a minidisk (in the VM environment). Here's a quickie that should do the job: /* Get filename, filetype, and filemode of each file on mdisk */ makebuf queue 'SNAME#FILE' 'FILEL' dropbuf X = 0 do forever X = X + 1 'EXECIO 1 DISKR 'userid()' FILELIST A 'X if RC > 0 then leave pull FN.X FT.X FM.X . end NUMFILES = X - 1 The above EXEC places all the filename, filetype, and filemode information into an array sorted by filename. You may choose to type any or all of the files to your terminal, print them, send them to another account, etc. For instance, to type all the files to your terminal screen, just add something like the following: do Y = 1 to NUMFILES 'TYPE 'FN.Y FT.Y FM.Y end Kirk kirk@catt.ncsu.edu