Re: COBOL ? Re: SORT selection question

2020-09-17 Thread Farley, Peter x23353
ay from us, so I personally wouldn’t want to be the one filing such an RCF. Peter -Original Message- From: IBM Mainframe Discussion List On Behalf Of Paul Gilmartin Sent: Thursday, September 17, 2020 12:06 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: COBOL ? Re: SORT selection questio

Re: COBOL ? Re: SORT selection question

2020-09-17 Thread Seymour J Metz
Mainframe Discussion List on behalf of Paul Gilmartin <000433f07816-dmarc-requ...@listserv.ua.edu> Sent: Thursday, September 17, 2020 2:56 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: COBOL ? Re: SORT selection question On Thu, 17 Sep 2020 17:17:35 +, Seymour J Metz wrote: >It m

Re: COBOL ? Re: SORT selection question

2020-09-17 Thread Paul Gilmartin
On Thu, 17 Sep 2020 17:17:35 +, Seymour J Metz wrote: >It may depend on how you define support. There are some utilities that work >but for which the documentation doesn't mention it. The DD: recognition is >unsupported in the sense that if it breaks IBM will not consider that an error. >

Re: COBOL ? Re: SORT selection question

2020-09-17 Thread Seymour J Metz
From: IBM Mainframe Discussion List on behalf of Paul Gilmartin <000433f07816-dmarc-requ...@listserv.ua.edu> Sent: Thursday, September 17, 2020 12:05 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: COBOL ? Re: SORT selection question On Thu, 17 Sep 2020

Re: COBOL ? Re: SORT selection question

2020-09-17 Thread Sri h Kolusu
>>> Note that I changed your EQ to GE. So it would stop after reading no > more than 1001 irrelevant records, much improving the performance > for the OP's "very large" SORTIN. Note also that the OP said SORTIN > had previously been sorted, so no records having key LT,'ABC' would > precede the

Re: [EXTERNAL] Re: COBOL ? Re: SORT selection question

2020-09-17 Thread Nash, Jonathan S.
: SORT selection question On Thu, 17 Sep 2020 14:58:44 +, Farley, Peter x23353 wrote: >Of course that is an option, particularly the COBOL one. I am personally very >familiar with awk and z/OS awk does support "classic" datasets via DD, ... > Citation needed. Ac

Re: COBOL ? Re: SORT selection question

2020-09-17 Thread Paul Gilmartin
On Thu, 17 Sep 2020 14:58:44 +, Farley, Peter x23353 wrote: >Of course that is an option, particularly the COBOL one. I am personally very >familiar with awk and z/OS awk does support "classic" datasets via DD, ... > Citation needed. According to what IBM document? On Thu, 17 Sep 2020

Re: SORT selection question

2020-09-17 Thread Sri h Kolusu
> Can you set an a priori upper bound on the number of 'ABC' records? > Suppose you're confident that there are at most 1000. Gil, Unfortunately that wouldn't work. If your input have less than 1000 records for the key 'ABC' and you code STOPAFT=1001, then it would read the entire file as we

Re: SORT selection question

2020-09-17 Thread Farley, Peter x23353
PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: SORT selection question You could also use an E15 and return an 8 when you get past the interesting data. Chris Blaicher Technical Architect Precisely.com -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU

Re: COBOL ? Re: SORT selection question

2020-09-17 Thread Farley, Peter x23353
: IBM-MAIN@LISTSERV.UA.EDU Subject: COBOL ? Re: SORT selection question Why not just write a small program ? COBOL ? AWK ? :-) SED :-) -Original Message- From: IBM Mainframe Discussion List On Behalf Of Scott Barry Sent: Wednesday, September 16, 2020 6:36 PM To: IBM-MAIN@LISTSERV.UA.E

Re: SORT selection question

2020-09-17 Thread Farley, Peter x23353
: Wednesday, September 16, 2020 8:20 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: SORT selection question Hi Peter, If you have IBM File Manager you could do what you need with the Data Set Copy (DSC) function and an enhanced processing procedure: $$FILEM DSC INPUT=DDIN, $$FILEM OUTPUT=DDOUT

Re: SORT selection question

2020-09-17 Thread Farley, Peter x23353
Wednesday, September 16, 2020 9:16 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: SORT selection question On Thu, 17 Sep 2020 08:20:07 +0800, Peter Van Dyke wrote: > >If you have IBM File Manager you could do what you need with the Data >Set Copy (DSC) function and an enhanced processing pr

Re: SORT selection question

2020-09-16 Thread Paul Gilmartin
C ') > >Peter > >-Original Message- >From: IBM Mainframe Discussion List On Behalf Of >Sri h Kolusu >Sent: Wednesday, September 16, 2020 3:54 PM >To: IBM-MAIN@LISTSERV.UA.EDU >Subject: Re: SORT selection question > >EXTERNAL EMAIL > >>>> When

Re: SORT selection question

2020-09-16 Thread Sri h Kolusu
>>> Does that meet the OP's requirement to copy selected records to OUTPUT? > Is another command necessary? Gil, DSC (Data Set Copy) function will copy from the input DDIN to output DDOUT and as soon as it finds record greater than ABC it stops reading and all the records read before that are

Re: SORT selection question

2020-09-16 Thread Paul Gilmartin
On Thu, 17 Sep 2020 08:20:07 +0800, Peter Van Dyke wrote: > >If you have IBM File Manager you could do what you need with the Data Set >Copy (DSC) function and an enhanced processing procedure: > >$$FILEM DSC INPUT=DDIN, >$$FILEM OUTPUT=DDOUT, >$$FILEM PROC=* >IF FLDI(1,3,C,'GT',"ABC")

Re: SORT selection question

2020-09-16 Thread Wayne Bickerdike
frame Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On > Behalf Of Peter Van Dyke > Sent: Wednesday, September 16, 2020 8:20 PM > To: IBM-MAIN@LISTSERV.UA.EDU > Subject: Re: SORT selection question > > [ External - This message originated Externally. Use proper judgement

Re: SORT selection question

2020-09-16 Thread Christopher Y. Blaicher
:20 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: SORT selection question [ External - This message originated Externally. Use proper judgement and caution with attachments, links, or responses. ] Hi Peter, If you have IBM File Manager you could do what you need with the Data Set Copy (DSC

Re: SORT selection question

2020-09-16 Thread Peter Van Dyke
Hi Peter, If you have IBM File Manager you could do what you need with the Data Set Copy (DSC) function and an enhanced processing procedure: $$FILEM DSC INPUT=DDIN, $$FILEM OUTPUT=DDOUT, $$FILEM PROC=* IF FLDI(1,3,C,'GT',"ABC") THEN RETURN STOP IMMEDIATE/* Stop processing

COBOL ? Re: SORT selection question

2020-09-16 Thread Nash, Jonathan S.
Why not just write a small program ? COBOL ? AWK ? :-) SED :-) -Original Message- From: IBM Mainframe Discussion List On Behalf Of Scott Barry Sent: Wednesday, September 16, 2020 6:36 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: [EXTERNAL] Re: SORT selection question With DFSORT

Re: SORT selection question

2020-09-16 Thread Paul Gilmartin
On Thu, 17 Sep 2020 08:58:59 +1000, Wayne Bickerdike wrote: >Not sure how a sequential file has a "KEY". It may be a value in fixed >columns. > I find "KEY" used apparently in that sense in numerous places in: z/OS Version 2 Release 4 DFSORT Application Programming Guide IBM SC23-6878-40

Re: SORT selection question

2020-09-16 Thread Farley, Peter x23353
d see how it performs. All in my copious spare time of course . . . :) Peter -Original Message- From: IBM Mainframe Discussion List On Behalf Of Scott Barry Sent: Wednesday, September 16, 2020 6:36 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: SORT selection question With DFSORT/SYNCSORT in mind

Re: SORT selection question

2020-09-16 Thread Wayne Bickerdike
I should have read the OP more carefully. Mea culpa. E15 exit? Used to do this to get keyranges from CA-Datacom using GETIT. Just pass the desired value to the exit to tell sort to finish. On Thu, Sep 17, 2020 at 8:58 AM Wayne Bickerdike wrote: > Not sure how a sequential file has a "KEY". It

Re: SORT selection question

2020-09-16 Thread Wayne Bickerdike
Not sure how a sequential file has a "KEY". It may be a value in fixed columns. I'm sure it's why we've been sorting files for donkeys years. On Thu, Sep 17, 2020 at 8:53 AM Sri h Kolusu wrote: > > With DFSORT/SYNCSORT in mind, possibly a two-step process where the > > first step interrogates

Re: SORT selection question

2020-09-16 Thread Wayne Bickerdike
For unordered data you need to read every record to have that feature. If you have the resources, put it into a DB2 table and apply deltas to the table. Or a VSAM KSDS. On Thu, Sep 17, 2020 at 8:36 AM Scott Barry wrote: > With DFSORT/SYNCSORT in mind, possibly a two-step process where the first

Re: SORT selection question

2020-09-16 Thread Sri h Kolusu
> With DFSORT/SYNCSORT in mind, possibly a two-step process where the > first step interrogates an input data stream (no output generated, > mostly for optimization) to detect a relative-record# where the > limit-key-value (COND-argument) is then passed to a second step Scott, I think you missed

Re: SORT selection question

2020-09-16 Thread Scott Barry
With DFSORT/SYNCSORT in mind, possibly a two-step process where the first step interrogates an input data stream (no output generated, mostly for optimization) to detect a relative-record# where the limit-key-value (COND-argument) is then passed to a second step (necessary control statement

Re: SORT selection question

2020-09-16 Thread Paul Gilmartin
On Wed, 16 Sep 2020 20:17:10 +, Farley, Peter x23353 wrote: >Thanks Sri, I am aware of the STOPAFT parameter, but it uses a hard-coded >count. When the goal is to find ALL records with the selected values and one >does not know in advance how many there are, it is not as helpful as it

Re: SORT selection question

2020-09-16 Thread Sri h Kolusu
> When the goal is to find ALL records with the selected > values and one does not know in advance how many there are, it is > not as helpful as it could be. Peter, Unfortunately Sort does not have that feature. Thanks, Kolusu DFSORT Development IBM Corporation

Re: SORT selection question

2020-09-16 Thread Farley, Peter x23353
, something like: STOPWHEN COND=(key value greater than this stop reading) E.G., STOPWHEN(1,3,'AC ') Peter -Original Message- From: IBM Mainframe Discussion List On Behalf Of Sri h Kolusu Sent: Wednesday, September 16, 2020 3:54 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: SORT selection

Re: SORT selection question

2020-09-16 Thread Sri h Kolusu
>>> When using SORT (either DFSORT or SYNCSORT) to select a relatively > small sample of records by (a) particular key value(s) from a *very > large* sequential file, Peter, You can use STOPAFT parm to stop reading the input once you get to a threshold value. For example if you have file with