IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Sub-program: SORT INPUT PROCEDURE accross accross calls?


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Dennis1SOIL

New User


Joined: 30 Jun 2009
Posts: 15
Location: Missouri, USA

PostPosted: Sat Feb 06, 2010 3:23 am
Reply with quote

(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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sat Feb 06, 2010 3:42 am
Reply with quote

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 icon_smile.gif

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
View user's profile Send private message
Dennis1SOIL

New User


Joined: 30 Jun 2009
Posts: 15
Location: Missouri, USA

PostPosted: Sat Feb 06, 2010 4:01 am
Reply with quote

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
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Sat Feb 06, 2010 6:04 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Using API Gateway from CICS program CICS 0
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top