Symptoms
PREP_PROCESS_FILENAME provides no ascending or descending alphabetical order
Cause
PREP_PROCESS_FILENAME is not designed to provide any sort order.
There is an error in Automic documentation: "The file names are listed in alphabetically ascending order."
This function is not given and will be removed in future versions of documentation.
Resolution
The most efficient way to get a alphabetically sorted output is to use the prep_process command with appropriate OS parameters.
Example for a WIN system:
:SET &HND# = PREP_PROCESS("[WINagent]","WINCMD","*.*.*:*DIR*","CMD=DIR C:","UC_LOGIN=[LOGIN]")
:process &HND#
: set &ret# = get_process_line(&HND#,1)
: p &ret#
:endprocess
This method uses less resources and is flexible.