View previous topic :: View next topic |
Author |
Message |
spalanis Beginner
Joined: 19 Jul 2006 Posts: 32 Topics: 15
|
Posted: Fri Dec 08, 2006 12:41 pm Post subject: General query on SORT SYNTAX |
|
|
Dear friends,
Is there any difference between the following two statements in the way it executes?.
//STEP020 EXEC PGM=SORT,COND=(0,LT)
and
//STEP020 EXEC SORT,COND=(0,LT)
Please advise. |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Fri Dec 08, 2006 12:43 pm Post subject: |
|
|
spalanis,
//STEP020 EXEC PGM=SORT is invoking the SORT program directly whereas //STEP020 EXEC SORT is invoking a catlagoued procedure named sort which inturn will invoke the pgm sort.
Either way it does not make any difference.
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
spalanis Beginner
Joined: 19 Jul 2006 Posts: 32 Topics: 15
|
Posted: Fri Dec 08, 2006 1:18 pm Post subject: |
|
|
Thanks Kolusu!!! |
|
Back to top |
|
 |
Sqlcode Intermediate
Joined: 15 Dec 2006 Posts: 157 Topics: 38
|
Posted: Wed Jan 10, 2007 9:17 am Post subject: |
|
|
Hi Kolusu,
While using EXEC SORT do we need to give STEPLIB?
If yes then would it be the library where my PROC is residing? |
|
Back to top |
|
 |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Wed Jan 10, 2007 9:32 am Post subject: |
|
|
although it does not effect the execution, executing a PROC means you need to investigate (look at it) the PROC to see what symbolics are used, if any, as well as the DD statements' references names for override purposes (e.g. SORTIN, SORTIN1??, SORTOUT, and the control cards - whether they can be overriden or placed in a file for SYSIN).
as with any PROC, you have to look at it (or have documentation) to know how to properly invoke the SORT.
If you use PGM=SORT, then you must insure that your JCL contains all the control cards necessary. _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
 |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Wed Jan 10, 2007 9:47 am Post subject: |
|
|
By the way, your title for this thread was very poor. Had nothing to do with SORT Syntax. _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
 |
Frank Yaeger Sort Forum Moderator

Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
|
Posted: Wed Jan 10, 2007 12:22 pm Post subject: |
|
|
Quote: | While using EXEC SORT do we need to give STEPLIB?
If yes then would it be the library where my PROC is residing? |
You would only need the STEPLIB if it's required for the library containing DFSORT. Normally, the site sets things up so you don't need a STEPLIB to get to DFSORT. But if you do need a STEPLIB for DFSORT, and the SORT PROC does not include that STEPLIB, then you'd need to specify the STEPLIB. _________________ 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 |
|
 |
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Thu Feb 08, 2007 11:35 am Post subject: |
|
|
Quote: |
While using EXEC SORT do we need to give STEPLIB?
If yes then would it be the library where my PROC is residing?
|
SORT - the program - lives in a program load libray which is referenced by STEPLIB (if necessary). SORT - the procedure - lives in a procedure library (PROCLIB for short). A PROCLIB is an entirely different thing from a STEPLIB - go and browse a member from each and you will see! _________________ Utility and Program control cards are NOT, repeat NOT, JCL. |
|
Back to top |
|
 |
|
|