On Mon, 05 May 2008 22:54:23 -0700, Rob van der Heij wrote:
>What you do is you add an extra field to the record to sort them on,
>and then drop that extra field again. Like this:
>spec ws = fs . substr f2 of w1 1.10 r 1-* n | sort 1.10 | substr 11-*

Thanks Rob,

Is SUBSTR something I need to get from somewhere else? 

FPLSCB027E Entry point SUBSTR not found  
FPLSCA003I ... Issued from stage 12 of pipeline 1  
FPLSCA001I ... Running "SUBSTR 11-*"  
   148 *-*    'PIPE REXXVARS' ,  
                '|BUFFER'                     ,/* Get all input records 
now  */
                '|DROP 1'                     ,/* Discard first line   */
                '|CHANGE 1.2 /v /=/'          ,/*   */
                '|JOIN 1'                     ,/* Combine varname with 
value */
                '|LOCATE 1.2 /n /'            ,/* Only lines with 
var=value  */
                '|CHANGE 1.2 /n //'           ,/*   */
                '|CASEI LOCATE /'varname'/'   ,/* Only lines with our 
varname*/
                '|CASEI NLOCATE /VARNAME=/'   ,/* But not with this string 
  */
                '|SPEC WS = FS . SUBSTR F2 OF W1 1.10 R 1-* N' ,  
                '|SORT 1.10'   ,  
                '|SUBSTR 11-*' ,  
                '|CONSOLE'                     /* Output to the terminal  
*/
       +++ RC(-27) +++  

Regards,
Fred Schmidt
Department of Corporate and Information Services (DCIS)
Data Centre Services (DCS)
Northern Territory Government, Australia

Reply via email to