View previous topic :: View next topic
|
Author |
Message |
Dennis1SOIL
New User
Joined: 30 Jun 2009 Posts: 15 Location: Missouri, USA
|
|
|
|
(I'm posting this question in this "Mainframe COBOL" forum - but I guess it could also go in the "DFSORT/Icetool" forum.)
I want to use the "INPUT PROCEDURE" capability of the internal SORT capability. The complication (at least I think this may be a "complication") - is that the RELEASE statements will be executed in <MANY SUCCESSIVE INVOCATIONS> of the sub-program which contains the SORT statement with the INPUT PROCEDURE clause.
For instance :
A Driver program reads an input file and sometimes calls the Sub-Program in question. The Sub-Program may (or may not) RELEASE another record to the SORT when it is called, and it may be called as much as multiple million times.
I look for answers to the kinds of questions I've been asking today in IBM publications ... but I guess I'm losing my touch about how to pick correct search words...
(For the good folks helping me over in the DFSORT forum today - yes, this is in regard to the same program I have been talking about over there)
-Dennis |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Suggest a redefiniton of the process is in order. . .
When the sort is invoked, it "takes over" . . . If the code is "ungracefully exited" (i.e. before the sort completes), it will abend. Unless i missed some memo
The driver module should probably write to a qsam file and when the driver "input" is all processed, a subsequent process would do whatever with the extracted data. |
|
Back to top |
|
|
Dennis1SOIL
New User
Joined: 30 Jun 2009 Posts: 15 Location: Missouri, USA
|
|
|
|
Thanks again Dick,
Sadly, that's pretty much what I was thinking might be the case.
I was hoping we'd found a way to skip the overhead of having to re-read the extracted data.
Perhaps I could move the SORT into the Driver program (along with any selection filtering logic currently in the Sub-program) -- but then -- I would be asking whether it's OK to pass the RETURNed record to a Sub-program from OUTPUT PROCEDURE code!
-Dennis |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
Dennis1SOIL wrote: |
A Driver program reads an input file and sometimes calls the Sub-Program in question. The Sub-Program may (or may not) RELEASE another record to the SORT when it is called, and it may be called as much as multiple million times. |
The 'off the cuff' answer I think of is a status return from the sub to the caller with either an "do not release and I'm done", "release and I'm done" or "release and return to me". |
|
Back to top |
|
|
|