Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

STEM sort

Status
Not open for further replies.

DBASP

MIS
Apr 11, 2003
4
MY
Hi,

I'm using IBM OS/390 and run REXX as interactive session,
ex TSO %SRT. My problem is how can I utilize MVS SORT/DFSORT to sort my STEM var contents ? I manage to write all the stem var into the SORTIN dataset BUT fail to do the sorting (calling this utility .... tried address LINKMVS SORT or address MVS SORT or ADDRESS ISPEXEC "SELECT PGM(SORT)" - it seems doesn't work to me). Thanks in advance for your help/code.

Azahary.

 
MVS SORT expects a conventional dataset. A stem array exists in main storage. The easiest way to get from here to there is to EXECIO the stem into a sequential dataset, SORT the dataset, and read the dataset back into the stem.

This might also be the most efficient way to do it (depending) -- as opposed to you writing your own sort-code.



Frank Clarke
Tampa Area REXX Programmers' Alliance
REXX Language Assn Listmaster
 
I call the following after allocating Sortin and Sortout:

SORTER:
"ALLOCATE DA('Userid.PGSORT') F(SYSIN) SHR REU"
"CALL 'SYS1.SORTLIB(IERRCO00)'"
return

You will have to call your shop's sort pgm.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top