E15 does NOT have to provide all data to the sort.  FIRST TIME the E15 exit is 
called the code at +0 in the parameter list is +0 to indicate "first time", 
allowing you to do any "one time setup" your program needs, then code = +4 for 
every other record that SORT reads for you and +8 at EOF on SORTIN.

Your return codes TO the SORT at exit from E15 logic say whether to accept, 
delete, add before, or modify the record that SORT read from SORTIN, or to stop 
processing even though not EOF on SORTIN yet.

Yes, you can override the input DD name as Binyamin said, but usually not 
needed in my experience.

I use this exit in a lot of cases where I need application-dependent logic to 
select or omit or pre-process records because SORT is so much better / faster 
at reading input than any I/O program I can write.

In many cases, SORT's control card IFTHEN logic provides all the selection 
logic you need, but not always.

HTH

Peter

-----Original Message-----
From: IBM Mainframe Discussion List <[email protected]> On Behalf Of 
Joseph Reichman
Sent: Monday, September 14, 2020 1:13 PM
To: [email protected]
Subject: Re: Syncsort E15 not receiving records

That page is misleading thank you 

> On Sep 14, 2020, at 1:10 PM, Binyamin Dissen <[email protected]> 
> wrote:
> 
> On Mon, 14 Sep 2020 12:56:21 -0400 Joseph Reichman 
> <[email protected]>
> wrote:
> 
> :>I have a really stupid question in chapter 6 of the syncsort manual 
> invoking syncsort from a program on the second page of that chapter 
> there is listed DD statements for invoked sort merge. There is listed 
> sortin as one of the DD statements. If I am doing the reading then 
> when does it have to be called sortin
> 
> It doesn't.
> 
> In fact, the input data need not be read from a file. It can be data 
> from memory, a DB2 table, etc.
> 
> :>> On Sep 14, 2020, at 12:47 PM, Binyamin Dissen 
> <[email protected]> wrote:
> 
> :>> ?On Mon, 14 Sep 2020 11:29:54 -0400 Joseph Reichman 
> <[email protected]> :>> wrote:
> 
> :>> :>I have a VB file I’m trying to process :>> :>I calling syncsort 
> from a program and have a E15 exit
> 
> :>> :>I’m running this all under test to get the kinks out
> 
> :>> :>The first time The exit is invoke Register one :>> :>At +0 is 0 
> meaning I am not selecting anything. I checked by include and it looks 
> right. I wondering about the record statement. I gave it coded as such
> 
> :>> :>RECORD TYPE=V,LENGTH=(31996,,,8) would this record control 
> statement get me every record on SORTIN
> 
> :>> It would depend on how you are calling SORT, but if you pass an 
> E15 address :>> SORT will not read SORTIN - you code is responsible for 
> providing the records.
> :>> You must provide a record address with R15=12 until you are done 
> providing the :>> input, in which case you pass R15=8.
> 
> :>> Always best to read the manuals.
> 
--

This message and any attachments are intended only for the use of the addressee 
and may contain information that is privileged and confidential. If the reader 
of the message is not the intended recipient or an authorized representative of 
the intended recipient, you are hereby notified that any dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please notify us immediately by e-mail and delete the message and any 
attachments from your system.


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to