View previous topic :: View next topic |
Author |
Message |
jim haire Beginner
Joined: 30 Dec 2002 Posts: 140 Topics: 40
|
Posted: Wed Nov 19, 2008 1:40 pm Post subject: Can DFSORT be called in a REXX program? |
|
|
I did a search on DFSORT AND REXX together trying to find a hit. Most of the things I read were using one of these tools as an alternate to the other.
My question is if I can call DFSORT from a REXX program. My REXX routine currently is doing some sorting via REXX, but it is extremely slow when you get even a moderate number of records.
I could submit a job containing DFSORT, but I don't want to have to waiit for an initiator and monitor the job for a finish before the REXX routine gets control back.
Are there any DDNAMEs which DFSORT understands to be designated as INPUT and OUTPUT where I could read the records into a file and get the sorted results back in another file by executing DFSORT within the REXX program itself? |
|
Back to top |
|
 |
Frank Yaeger Sort Forum Moderator

Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
|
|
Back to top |
|
 |
jim haire Beginner
Joined: 30 Dec 2002 Posts: 140 Topics: 40
|
Posted: Thu Nov 20, 2008 10:05 am Post subject: |
|
|
Thanks, Frank. I'll look at these links. |
|
Back to top |
|
 |
warp5 Intermediate

Joined: 02 Dec 2002 Posts: 429 Topics: 18 Location: Germany
|
Posted: Fri Nov 21, 2008 1:42 am Post subject: |
|
|
I looked at those links and put them in my favorites. |
|
Back to top |
|
 |
jim haire Beginner
Joined: 30 Dec 2002 Posts: 140 Topics: 40
|
Posted: Fri Nov 21, 2008 11:03 am Post subject: |
|
|
Frank, worked like a charm!
If anyone wants to sort a file in their REXX routine and has access to DFSORT this is the way to go.
A couple of additional hints:
1. I added a SORT FIELDS=(1,3,CH,A) as sort parameters. ICEMAN could not determine it and flagged it as an error. I remembered from past experiences that the SYSIN cannot start in position 1, so I put a space before the SORT statement and it worked.
2. Whoever is using your command may not be interested in all the SYSOUT from the SORT. If you direct your SYSOUT to a dataset instead of coding DA(*), you won't see it at execution time.
I don't know if there is a way DFSORT allows you to suppress all that output if you don't want it?
Thanks again, Frank! |
|
Back to top |
|
 |
Frank Yaeger Sort Forum Moderator

Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
|
Posted: Fri Nov 21, 2008 12:33 pm Post subject: |
|
|
If you don't want DFSORT to print the messages and control statements, you can use these control statements in DFSPARM:
Code: |
OPTION NOLIST,MSGPRT=NONE
|
Or more prdudently, if you only want DFSORT to print any error messages:
Code: |
OPTION NOLIST,MSGPRT=CRITICAL
|
_________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort |
|
Back to top |
|
 |
|
|