Page 1 of 1

Calling SORT from REXX

PostPosted: Fri Oct 05, 2012 5:06 pm
by LasseH
Is it possible to call DFSORT from REXX with "DDname substitution list"?

//Lasse

Found this for IEBGENER:

Parm = ""                           /* No PARM= parm   */   
DDlist = copies( '00'x, 8 )    !!,  /* DD  1: SYSLIN   */   
         copies( '00'x, 8 )    !!,  /* DD  2: n/a      */   
         copies( '00'x, 8 )    !!,  /* DD  3: SYSLMOD  */   
         copies( '00'x, 8 )    !!,  /* DD  4: SYSLIB   */   
         left( SysinDD, 8 )    !!,  /* DD  5: SYSIN    */   
         left( SysprintDD, 8 ) !!,  /* DD  6: SYSPRINT */   
         copies( '00'x, 8 )    !!,  /* DD  7: SYSPUNCH */   
         left( Sysut1DD, 8 )   !!,  /* DD  8: SYSUT1   */   
         left( Sysut2DD, 8 )   !!,  /* DD  9: SYSUT2   */   
         copies( '00'x, 8 )    !!,  /* DD 10: SYSUT3   */   
         copies( '00'x, 8 )    !!,  /* DD 11: SYSUT4   */   
         copies( '00'x, 8 )    !!,  /* DD 12: SYSTERM  */   
         copies( '00'x, 8 )    !!,  /* DD 13: n/a      */   
         copies( '00'x, 8 )         /* DD 14: SYSCIN   */   
                                                           
/* Call IEBGENER with two pointers: the first to a null PARM
string and the second to the DD name substitution list */   
                                                           
address LINKMVS "IEBGENER Parm DDlist"

Re: Calling SORT from REXX

PostPosted: Fri Oct 05, 2012 7:03 pm
by NicC
What happened when you tried?

Re: Calling SORT from REXX

PostPosted: Fri Oct 05, 2012 7:07 pm
by LasseH
Haven't tried it cause I don't now in what order the ddnames should be
//L

Re: Calling SORT from REXX

PostPosted: Fri Oct 05, 2012 8:13 pm
by steve-myers
LasseH wrote:Is it possible to call DFSORT from REXX with "DDname substitution list"? ...
Does the DFSORT manual say, anywhere, that DFSORT accepts a DD name override list similar to the list accepted by many IBM utiliity and language processing programs such as the Cobol compiler? The same place, if it exists, will tell you the contents of the override list.

Re: Calling SORT from REXX

PostPosted: Fri Oct 05, 2012 8:46 pm
by skolusu
LasseH,

Check this link for an example of invoking DFSORT from Rexx

http://publibz.boulder.ibm.com/cgi-bin/ ... 1ca60/11.3?

Check this link for overriding the DDnames (SORTIN , SORTOUT, MSGDD)

http://publibz.boulder.ibm.com/cgi-bin/ ... 1ca60/3.14?

Re: Calling SORT from REXX

PostPosted: Mon Oct 15, 2012 4:52 pm
by LasseH
steve-myers wrote:
LasseH wrote:Is it possible to call DFSORT from REXX with "DDname substitution list"? ...
Does the DFSORT manual say, anywhere, that DFSORT accepts a DD name override list similar to the list accepted by many IBM utiliity and language processing programs such as the Cobol compiler? The same place, if it exists, will tell you the contents of the override list.


Hi Steve, Sorry for asking.....

Re: Calling SORT from REXX

PostPosted: Mon Oct 15, 2012 5:21 pm
by steve-myers
There's no harm in asking, but you really should be doing this research before you ask.

When an Assembler program calls a program that provides DD overrides, the code is something like -
         LINK  SF=(E,LINKPARM),MF=(E,PGMPARM)
         ...
LINKPARM LINK  SF=L,EP=load-module-name
PGMPARM  CALL  ,(PARMTEXT,DDLIST),VL,MF=L
PARMTEXT DC    H'length',C'blah,blah'
DDLIST   DC    H'length'
         DC    CL8'ddname'
         DC    CL8'ddname'
         ...
         DC    CL8'ddname'
If you had bothered to look at DFSORT documentation, which evidently you did not do, something like this is not discussed anywhere.