Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Sub-program: SORT INPUT PROCEDURE accross accross calls?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Sub-program: SORT INPUT PROCEDURE accross accross calls?
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

Site Director


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

PostPosted: Sat Feb 06, 2010 3:42 am    Post subject:
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    Post subject:
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: 2150
Location: At my coffee table

PostPosted: Sat Feb 06, 2010 6:04 am    Post subject: Re: Sub-program: SORT INPUT PROCEDURE accross accross calls?
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm
No new posts I can not compile my program PL1 V3.R... Miguel Fernandez PL/I & Assembler 13 Tue Dec 06, 2016 8:30 pm
No new posts Performing arithmetic on input field zh_lad DFSORT/ICETOOL 31 Tue Dec 06, 2016 8:04 pm
No new posts High CPU consumption Job using IAM fi... aswinir JCL & VSAM 15 Thu Dec 01, 2016 8:28 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us