On Mon, 28 Jan 2008 09:28:10 -0600, RPN01 <[EMAIL PROTECTED]> wrote: This is the problem. Normally you can expect that the list is sorted. Therefore a small hint (usage note) telling that you can not guarantee th at the list is sorted would have been useful.
BR Fox >The obvious answer being overlooked by everyone is.... Sort the list. > >If the disk has a small number of files (say, less than 1,000), just wri te a >bubble sort and put the list in order yourself. If the number of files i s >large, then you might have to write a more complex sort to do it >efficiently. > >I'm not sure what "LISTFILE" you're using, but mine, for my 191 minidisk , >does produce a sorted list of files. > >Also, I just read through the documentation for DMSOPDIR... Nowhere in t he >documentation does it suggest or imply that it might return the list of >files in any specific order whatsoever. Where did you get the impression >that it should return them in sorted order? > >-- > .~. Robert P. Nix Mayo Foundation > /V\ RO-OE-5-55 200 First Street SW > /( )\ 507-284-0844 Rochester, MN 55905 > ^^-^^ ----- > "In theory, theory and practice are the same, but > in practice, theory and practice are different." > > > > >On 1/27/08 2:04 AM, "Fox Blue" <[EMAIL PROTECTED]> wrote: > >> Kris, >> >> Well it is a R/W minidisk. It is the 191 of the machine. >> >> Yesterday, I was also playing around with the LISTFILE command. It see ms >> that it retrieves the file names in the same unordered way. >> >> Regarding to your proposal, I wanted to program a CMS module that shou ld >> not >> become dependent on external REXX EXEC(s). >> >> I think the documentation (CMS Application Development Guide SC24-6069 -02 >> ) >> should reflect that the directory is not sorted. I was browsing throug h i >> t >> and could not find any hint on this issue. Also the CMS Callable Servi ces >> >> Reference (SC24-6072-02) should contain a usage note referring to this . >> >> Thanks anyway for your proposal to overcome this problem. >> >> BR Fox. >> >> >> On Sat, 26 Jan 2008 20:11:25 +0100, Kris Buelens <[EMAIL PROTECTED] om> >> wrote: >> >>> I have no experience with DMSGETDF... >>> Is this a R/W minidisk? Only for R/O minidisks CMS keeps the FST's s ort >> ed. >>> >>> I would make the program call a REXX EXEC that in its turn executes a >>> PIPE that contains a LISTFILE and SORT stage. The PIPE could pass th e >>> sorted list of files in the stack where your program retrieves them. >>> Or, more elegant, your assembler program allocates a buffer large >>> enough to store the result of the LISTFILE, prepares the PIPE command >>> with the LISTFILE and SORT, the last stage would be a STORAGE stage t o >>> write the result in your program's buffer. >>> >>> Kris Buelens, >>> IBM Belgium, VM customer support >>> ======================= = >> ======================== = >> ========================