If you're wanting a simple sort tool, I wrote a very simple one several 
     years ago. It uses S36E BLDINDEX to sort the file.... looks something 
     like:
     .............................................................
     PGM PARM(&FILE &LIB &MBR &POS1 &LEN1 &POS2 &LEN2 &POS3 &LEN3)
     
     dcl ...
     
     BLDFILE TEMPF1,S,RECORDS,1,4096,,T,,,NDFILE
     
     CPYF FROMFILE(&LIB/&FILE)    
          TOFILE(QS36F/TEMPF1)  
          FROMMBR(&MBR)        
          TOMBR(*FIRST)     
          CRTFILE(*NO)
     
     CHGVAR VAR(&PARM)                                           
           VALUE('TEMPF2,' *CAT &POS1 *CAT ',' *CAT &LEN1 *CAT +
           ',TEMPF1,,DUPKEY,,' *CAT &POS2 *CAT ',' *CAT &LEN2 +
           *CAT ',' *CAT &POS3 *CAT ',' *CAT &LEN3)    
     
     STRS36PRC PRC(BLDINDEX)  
               PARM(&PARM)     
     
     CPYF FROMFILE(QS36F/TEMPF2)
          TOFILE(&LIB/&FILE)    
          FROMMBR(*FIRST)       
          TOMBR(&MBR)           
          MBROPT(*REPLACE)      
          FROMKEY(1 (X'00'))    
          FMTOPT(*NOCHK)
        
     cleanup tempfiles, etc......
     
     
     ENDPGM
     ..............................
     I may not have gotten everything, but you should get the idea. This works 
     because of the way BLDINDEX attaches the keyfields to the end of the 
     record format. When you copy tempf2 by key order back into your original 
     file and member, it cuts off the added fields, leaving you with your 
     sorted file. Worked great for what we needed it for. Main problem is the 
     three field limit, though its enough for most needs.
     
     hth
     eric.delong@pmsi-services.com
             

______________________________ Reply Separator 
_________________________________
Subject: RE: REXX 
Author:  <MIDRANGE-L@midrange.com> at INET_WACO
Date:    3/21/00 8:51 AM


Nothing that life altering, I simply needed a sort within SEU and was 
reminiscent of the (clearing throat) good old mainframe days with ISPF and 
XEDIT where you could do a bit more with the editor. What happened was I wrote 
a little CL to extract the file names for a reorg and later discovered that 
there were duplicates! (The operator was not happy after 7 hours of reorg!)  
so since they were not in "people order" I needed to sort them and drop the 
duplicates. 
     
> ----------
> From:         Peter Dow[SMTP:pcdow@yahoo.com] 
> Sent:         Monday, March 20, 2000 8:22 PM 
> To:   MIDRANGE-L@midrange.com
> Subject:      Re: REXX
> 
> Sounds like you're getting ready to rewrite the FMTDTA command. 
> 
>       ----- Original Message ----- 
>       From: Weatherly, Howard 
>       To: 'MIDRANGE-L@midrange.com' 
>       Sent: Monday, March 20, 2000 11:26 AM 
>       Subject: RE: REXX
> 
> 
>       Well ok since no one jumped in here, I wrote a generalized sort
> utility that does what I needed immediately. If anyone needs to sort 
> things outside of the normal key-ordered file method, let me know. 
> 
>               ---------- 
>       From:   Weatherly, Howard[ SMTP:hweatherly@dlsc.dla.mil] 
>       Sent:   Tuesday, March 14, 2000 11:01 AM 
>       To:     'MIDRANGE-L@midrange.com' 
>       Subject:        REXX 
> 
>               Any of you folks that have worked with VM/CMS(Xedit) will
> understand exactly what I want to do here but for those that have not I
> will just give a one liner: Rexx and Xedit share a symbiotic relationship 
> in that it is very easy to switch environments and enter commands that
> each understand, Rexx is a high level command interpreter that makes 
> string manipulation a breeze and Xedit is a powerful editor.
> 
>               With this affinity for each other it is quit simple and
> commonplace to perform operations on source code, which gets me to my 
> question:
> 
>               Does anyone have any CL code that calls QREXX/QSYS invoking 
> a Rexx program? 
> 
>               -- or -- 
> 
>               What I really need/want to do is have the ability to sort
> lines that may exist in a source member be it CL or DATA, I want to choose 
> the fields e.g.... startpos,len or some such! for this I was going to use 
> Rexx to manipulate the strings and need a way to hook things together.
> 
>               I am looking at Rexx because from time to time I find myself
> missing the ability to do things to source members but if there is another 
> way to accomplish this I am open to that also.
> 
>               Tia, Howard 
> 
> 
> 


+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.