MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Can DFSORT be called in a REXX program?

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
jim haire
Beginner


Joined: 30 Dec 2002
Posts: 140
Topics: 40

PostPosted: Wed Nov 19, 2008 1:40 pm    Post subject: Can DFSORT be called in a REXX program? Reply with quote

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
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Wed Nov 19, 2008 1:54 pm    Post subject: Reply with quote

Yes. See this example in "z/OS DFSORT Application Programming Guide":

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA20/10.3?DT=20060615185603

and the "REXX calls to DFSORT and ICETOOL" Smart DFSORT Trick at:

www.ibm.com/systems/support/storage/software/sort/mvs/tricks/
_________________
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
View user's profile Send private message Send e-mail Visit poster's website
jim haire
Beginner


Joined: 30 Dec 2002
Posts: 140
Topics: 40

PostPosted: Thu Nov 20, 2008 10:05 am    Post subject: Reply with quote

Thanks, Frank. I'll look at these links.
Back to top
View user's profile Send private message
warp5
Intermediate


Joined: 02 Dec 2002
Posts: 429
Topics: 18
Location: Germany

PostPosted: Fri Nov 21, 2008 1:42 am    Post subject: Reply with quote

I looked at those links and put them in my favorites.
Back to top
View user's profile Send private message Visit poster's website
jim haire
Beginner


Joined: 30 Dec 2002
Posts: 140
Topics: 40

PostPosted: Fri Nov 21, 2008 11:03 am    Post subject: Reply with quote

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
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Fri Nov 21, 2008 12:33 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group