Re: DF/SORT question (challenge?)

2014-08-21 Thread Martin Packer
Is this whole limiting number of DD's thing a (lack of) XTIOT thing?

By the way I've thought for some time DFSORT needs a BUCKET ICETOOL 
operator like this. But perhaps as a sample it'd be good. How about it Sri 
Hari?

Cheers, Martin

Martin Packer,
zChampion, Principal Systems Investigator,
Worldwide Banking Center of Excellence, IBM

+44-7802-245-584

email: martin_pac...@uk.ibm.com

Twitter / Facebook IDs: MartinPacker
Blog: 
https://www.ibm.com/developerworks/mydeveloperworks/blogs/MartinPacker



From:   Sri h Kolusu skol...@us.ibm.com
To: IBM-MAIN@LISTSERV.UA.EDU
Date:   21/08/2014 00:06
Subject:Re: DF/SORT question (challenge?)
Sent by:IBM Mainframe Discussion List IBM-MAIN@LISTSERV.UA.EDU



 Try adding close=free to the DD statement

Ed,

When using DFSORT applications, FREE=CLOSE cannot be used on any DD 
statements except DFSPARM. 

Thanks,
Kolusu

IBM Mainframe Discussion List IBM-MAIN@LISTSERV.UA.EDU wrote on 
08/20/2014 03:24:55 PM:

 From: Ed Gould edgould1...@comcast.net
 To: IBM-MAIN@LISTSERV.UA.EDU
 Date: 08/20/2014 03:28 PM
 Subject: Re: DF/SORT question (challenge?)
 Sent by: IBM Mainframe Discussion List IBM-MAIN@LISTSERV.UA.EDU
 
 On Aug 20, 2014, at 12:54 PM, TonyIcloud-OPERA wrote:
 
  I once allocated a PDSE, and using DF/SORT, wrote 1,000 members to 
  it in one pass of data.  I was tempted to try 10K output members 
  but my beverage wager was already won.  When I get a bit of time, 
  since I already have devised a technique to generate N number of DD 
  statements and OUTFIL statements I'll try 10,000.  I don't recall 
  the maximum number of DD cards??
 
 Try adding close=free to the DD statement
 
 Ed
 
 --
 For IBM-MAIN subscribe / signoff / archive access instructions,
 send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
 

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN



Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 
741598. 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: DF/SORT question (challenge?)

2014-08-21 Thread Paul Gilmartin
On Wed, 20 Aug 2014 19:21:00 -0500, Shane Ginnane wrote:

awk '{print  hlq.$1.file}' dfsort.input

Even OMVS should be able to achieve that. Can't see any reason for a sort.
 
Limit on number of open files?  OP said hundreds or thousands.

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: DF/SORT question (challenge?)

2014-08-21 Thread John McKown
On Thu, Aug 21, 2014 at 7:35 AM, Paul Gilmartin 
000433f07816-dmarc-requ...@listserv.ua.edu wrote:

 On Wed, 20 Aug 2014 19:21:00 -0500, Shane Ginnane wrote:

 awk '{print  hlq.$1.file}' dfsort.input
 
 Even OMVS should be able to achieve that. Can't see any reason for a sort.
 
 Limit on number of open files?  OP said hundreds or thousands.

 -- gil


Good point. Our OMVS MAXFILEPROC is limited to 64000. So hundreds might
not be a problem. But thousands could be since that is a system-wide
limit for all users.


-- 
There is nothing more pleasant than traveling and meeting new people!
Genghis Khan

Maranatha! 
John McKown

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: DF/SORT question (challenge?)

2014-08-21 Thread Shane Ginnane
On Thu, 21 Aug 2014 07:35:05 -0500, Paul Gilmartin wrote:

Limit on number of open files?  OP said hundreds or thousands.

Rebuke accepted - maybe I can (now) see a need for a sort.

Shane ...

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: DF/SORT question (challenge?)

2014-08-21 Thread Shmuel Metz (Seymour J.)
In op.xkwasag27u3...@hawk01.hsd1.il.comcast.net, on 08/20/2014
   at 09:34 AM, TonyIcloud-OPERA tonybabo...@icloud.com said:

I have a dataset that contains records with a field, by which I need
to create a separate dataset that would contain all occurrences of
that field.

ITYM a separate file for each value in that field. If I were doing
this, I'd sort on the field and have an output exit that allocated and
opened the dataset for each value, closed and freed it on a control
break and told the sort not to create any output.
 
-- 
 Shmuel (Seymour J.) Metz, SysProg and JOAT
 ISO position; see http://patriot.net/~shmuel/resume/brief.html 
We don't care. We don't have to care, we're Congress.
(S877: The Shut up and Eat Your spam act of 2003)

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: DF/SORT question (challenge?)

2014-08-21 Thread John McKown
On Thu, Aug 21, 2014 at 9:37 AM, Shmuel Metz (Seymour J.) 
shmuel+ibm-m...@patriot.net wrote:

 In op.xkwasag27u3...@hawk01.hsd1.il.comcast.net, on 08/20/2014
at 09:34 AM, TonyIcloud-OPERA tonybabo...@icloud.com said:

 I have a dataset that contains records with a field, by which I need
 to create a separate dataset that would contain all occurrences of
 that field.

 ITYM a separate file for each value in that field. If I were doing
 this, I'd sort on the field and have an output exit that allocated and
 opened the dataset for each value, closed and freed it on a control
 break and told the sort not to create any output.


You could even do that in, *gasp*, COBOL with an OUTPUT PROCEDURE IS phrase.



 --
  Shmuel (Seymour J.) Metz, SysProg and JOAT



-- 
There is nothing more pleasant than traveling and meeting new people!
Genghis Khan

Maranatha! 
John McKown

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: DF/SORT question (challenge?)

2014-08-21 Thread TonyIcloud-OPERA
 IBM-MAIN@LISTSERV.UA.EDU wrote on
08/20/2014 07:34:48 AM:


From: TonyIcloud-OPERA tonybabo...@icloud.com
To: IBM-MAIN@LISTSERV.UA.EDU
Date: 08/20/2014 07:35 AM
Subject: DF/SORT question (challenge?)
Sent by: IBM Mainframe Discussion List IBM-MAIN@LISTSERV.UA.EDU

I have a dataset that contains records with a field, by which I need to
create a separate dataset that would contain all occurrences of that
field. For example the file, FB100, looks like

value1 other data.
value1 other data.
value1 other data.
value2 other data.
value2 other data.
value2 other data.
value3 other data.
value3 other data.
value3 other data.
value4 other data.
value4 other data.
value4 other data.

My final product must be a series of datasets:

hlq.value1.records
hlq.value2.records
hlq.value3.records
hlq.value4.records

There may be hundreds/thousands of possible values, hence
hundreds/thousands of datasets.  I have accomplished this in 3 phases,
first pass reads the data, uses ICETOOL OCCUR to list the values, second



phase reads the OUTPUT and formats DD statements and OUTFIL OUTREC
statements, the third phase reads the original data to create the

numerous

output files.  I used a newly created PDSE as the output file whereupon
the third phase created several thousand members.

It works, after a fashion, but I'd like a more simple solution.


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN



--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN



--
Using Opera's mail client: http://www.opera.com/mail/

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: DF/SORT question (challenge?)

2014-08-21 Thread Hardee, Chuck
Okay, let me say up front, I know nothing about the abilities of SORT other 
than simple sort this file on these keys and give me the output in this file. 
Okay, we're good?

Here's my question. If (can) sort insert records into its output on a break in 
key?
If so, why not sort the input file and, on each key break, generate an IEBUPDTE 
add control card and the write the record that belong to that card until the 
next key break. Do this for each key break and the resulting output file would 
be an IEUPDTE input stream that would then be fed into an IEBUPDTE job step 
that allocates a new PDS(e) and populates the members.

No need to dynamically create a dataset/member for every key break, just a 
single PS type output file, in key sequence, with control cards as needed.

Admittedly the control cards needed may be a bit more than a simple add/insert 
(don't recall what terminology IEBUPDTE uses, haven't used it in a while), and 
then there's the termination signal for each member, but if the idea has merit, 
well, it's worth a try.

Of course, all bets are off if the OP needs a unique PS type file for each key 
versus a member in a PDS(e) for each key.

Thanks for entertaining this idea.

Chuck

Charles (Chuck) Hardee
Senior Systems Engineer/Database Administration
CCG Information Technology

Thermo Fisher Scientific
300 Industry Drive | Pittsburgh, PA 15275
Phone +1 (724) 517-2633 | Mobile +1 (412) 877-2809 | FAX: +1 (412) 490-9230
chuck.har...@thermofisher.com | www.thermofisher.com

WORLDWIDE CONFIDENTIALITY NOTE: Dissemination, distribution or copying of this 
e-mail or the information herein by anyone other than the intended recipient, 
or an employee or agent of a system responsible for delivering the message to 
the intended recipient, is prohibited. If you are not the intended recipient, 
please inform the sender and delete all copies.

-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of TonyIcloud-OPERA
Sent: Thursday, August 21, 2014 12:19 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: DF/SORT question (challenge?)

Before I tried the solution cited below (TYVM BTW), I set up a test  
manually with some interesting results.  The input file is not sorted, and  
I'm only doing SORT FIELDS=COPY.  All I want to do is to break up the file  
into a bunch of little files.

Test #1. Read my input file, 229,762 records, lrecl=200/27800 FB , 310 DD  
statements, 310 OUTFIL INCLUDE statements.  RC=0, 310 members created, all  
the data checks out.

Test #2. Read the same input file, 321 DD statements, 321 OUTFIL INCLUDE  
statements, abends:

10.09.26 JOB08830 IEC036I 002-B4,IGC0005E,IDSXSB7A,AA,VS09610,4BB9,SHRE16,  
452
  452 IDSX00S.IDSXSB7.SYSE.FIDX03.PDSE

ICE185A 0 AN S002 ABEND WAS ISSUED BY DFSORT, ANOTHER PROGRAM OR AN EXIT  
(PHASE C 3)
Quickref provides:
B4 - Unable to create a system buffer required for PDSE processing.

I retried with regions of 16M, 32M, 0M, same result.  Not sure if our  
local storage police exit chokes off my attempt at 0M.


Interestingly, even though the abend occurred the output PDSE was  
populated with all 321 members however the last 8 members contain 0  
records.  Looks like DF/SORT was tripped up at the 313 mark by some system  
limitation. I'm going to consult with my sysprogs before we go to IBM for  
help.

P.S. My old successful attempt at writing 1,000 members occurred at a  
different company, a much smaller shop, oddly enough.






On Wed, 20 Aug 2014 12:01:00 -0500, Sri h Kolusu skol...@us.ibm.com  
wrote:

 Tony,

 It is quite easy to split the group of records into multiple members.  
 Here
 is a sample JCL which will give you the desired results of splitting the
 first 999 groups of records into a PDSE each containing the group of
 records. I also assumed your Input is already sorted on the field you  
 want
 to split. I assumed that the split field is 44 bytes in length. If it is
 different then you can change it in ALL the places referred by KEYBEGIN.

 This job creates a dynamic JCL which will then be submitted via INTRDR.
 Take a look at the output from Step0200 and then if everything looks ok
 then change the statement
 //SORTOUT  DD SYSOUT=*  to  //SORTOUT  DD SYSOUT=(*,INTRDR),RECFM=FB
 If you have more than 999 groups of records we will copy the rest of the
 records into another file which will then be used as input file to  
 further
 split. I will show you how to build the dynamic JCL's based on that. I
 chose the split to be 999 groups as the maximum number of DD statements
 per job step is 3273, based on the number of single DD statements allowed
 for a TIOT (task input output table) control block size of 64K. This  
 limit
 can be different depending on the installation defined TIOT size. The
 IBM-supplied default TIOT size is 32K.

 //*
 //*  BUILD DYNAMIC OUTFIL CARDS AND DDNAMES FOR EACH GROUP OF RECORDS

Re: DF/SORT question (challenge?)

2014-08-21 Thread TonyIcloud-OPERA

Chuck, not only will I entertain the idea, I'll try it.
I always have had the option of creating PS datasets but over the years  
I've gotten spoiled for writing to a PDSE because the JCL is simpler.  I  
also became spoiled for getting a quick record count for each member by  
3.5ing the MSL.




On Thu, 21 Aug 2014 11:28:51 -0500, Hardee, Chuck  
chuck.har...@thermofisher.com wrote:


Okay, let me say up front, I know nothing about the abilities of SORT  
other than simple sort this file on these keys and give me the output in  
this file. Okay, we're good?


Here's my question. If (can) sort insert records into its output on a  
break in key?
If so, why not sort the input file and, on each key break, generate an  
IEBUPDTE add control card and the write the record that belong to that  
card until the next key break. Do this for each key break and the  
resulting output file would be an IEUPDTE input stream that would then  
be fed into an IEBUPDTE job step that allocates a new PDS(e) and  
populates the members.


No need to dynamically create a dataset/member for every key break, just  
a single PS type output file, in key sequence, with control cards as  
needed.


Admittedly the control cards needed may be a bit more than a simple  
add/insert (don't recall what terminology IEBUPDTE uses, haven't used it  
in a while), and then there's the termination signal for each member,  
but if the idea has merit, well, it's worth a try.


Of course, all bets are off if the OP needs a unique PS type file for  
each key versus a member in a PDS(e) for each key.


Thanks for entertaining this idea.

Chuck

Charles (Chuck) Hardee
Senior Systems Engineer/Database Administration
CCG Information Technology

Thermo Fisher Scientific
300 Industry Drive | Pittsburgh, PA 15275
Phone +1 (724) 517-2633 | Mobile +1 (412) 877-2809 | FAX: +1 (412)  
490-9230

chuck.har...@thermofisher.com | www.thermofisher.com

WORLDWIDE CONFIDENTIALITY NOTE: Dissemination, distribution or copying  
of this e-mail or the information herein by anyone other than the  
intended recipient, or an employee or agent of a system responsible for  
delivering the message to the intended recipient, is prohibited. If you  
are not the intended recipient, please inform the sender and delete all  
copies.


-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On  
Behalf Of TonyIcloud-OPERA

Sent: Thursday, August 21, 2014 12:19 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: DF/SORT question (challenge?)

Before I tried the solution cited below (TYVM BTW), I set up a test
manually with some interesting results.  The input file is not sorted,  
and
I'm only doing SORT FIELDS=COPY.  All I want to do is to break up the  
file

into a bunch of little files.

Test #1. Read my input file, 229,762 records, lrecl=200/27800 FB , 310 DD
statements, 310 OUTFIL INCLUDE statements.  RC=0, 310 members created,  
all

the data checks out.

Test #2. Read the same input file, 321 DD statements, 321 OUTFIL INCLUDE
statements, abends:

10.09.26 JOB08830 IEC036I  
002-B4,IGC0005E,IDSXSB7A,AA,VS09610,4BB9,SHRE16,

452
  452 IDSX00S.IDSXSB7.SYSE.FIDX03.PDSE

ICE185A 0 AN S002 ABEND WAS ISSUED BY DFSORT, ANOTHER PROGRAM OR AN EXIT
(PHASE C 3)
Quickref provides:
B4 - Unable to create a system buffer required for PDSE processing.

I retried with regions of 16M, 32M, 0M, same result.  Not sure if our
local storage police exit chokes off my attempt at 0M.


Interestingly, even though the abend occurred the output PDSE was
populated with all 321 members however the last 8 members contain 0
records.  Looks like DF/SORT was tripped up at the 313 mark by some  
system

limitation. I'm going to consult with my sysprogs before we go to IBM for
help.

P.S. My old successful attempt at writing 1,000 members occurred at a
different company, a much smaller shop, oddly enough.






On Wed, 20 Aug 2014 12:01:00 -0500, Sri h Kolusu skol...@us.ibm.com
wrote:


Tony,

It is quite easy to split the group of records into multiple members.
Here
is a sample JCL which will give you the desired results of splitting the
first 999 groups of records into a PDSE each containing the group of
records. I also assumed your Input is already sorted on the field you
want
to split. I assumed that the split field is 44 bytes in length. If it is
different then you can change it in ALL the places referred by KEYBEGIN.

This job creates a dynamic JCL which will then be submitted via INTRDR.
Take a look at the output from Step0200 and then if everything looks ok
then change the statement
//SORTOUT  DD SYSOUT=*  to  //SORTOUT  DD SYSOUT=(*,INTRDR),RECFM=FB
If you have more than 999 groups of records we will copy the rest of the
records into another file which will then be used as input file to
further
split. I will show you how to build the dynamic JCL's based on that. I
chose the split to be 999 groups as the maximum number of DD statements
per job step is 3273, based

Re: DF/SORT question (challenge?)

2014-08-21 Thread TonyIcloud-OPERA

Geez, I really should read:
1. the sample provided.
2. the book

RC=0

Now I need to find out more about ODMAXBF.  I feel like the guy who bought  
the toaster and didn't plug it in.







On Thu, 21 Aug 2014 11:35:25 -0500, Sri h Kolusu skol...@us.ibm.com  
wrote:



Tony,

Did you have the override of ODMAXBF?  In my sample JCL I have coded it  
as

ODMAXBF=100K overriding the default value of 2M. Can you rerun the job
with the ODMAXBF parm?

Thanks,
Kolusu
DFSORT Development
IBM Corporation

IBM Mainframe Discussion List IBM-MAIN@LISTSERV.UA.EDU wrote on
08/21/2014 09:18:40 AM:


From: TonyIcloud-OPERA tonybabo...@icloud.com
To: IBM-MAIN@LISTSERV.UA.EDU
Date: 08/21/2014 09:25 AM
Subject: Re: DF/SORT question (challenge?)
Sent by: IBM Mainframe Discussion List IBM-MAIN@LISTSERV.UA.EDU

Before I tried the solution cited below (TYVM BTW), I set up a test
manually with some interesting results.  The input file is not sorted,

and

I'm only doing SORT FIELDS=COPY.  All I want to do is to break up the

file

into a bunch of little files.

Test #1. Read my input file, 229,762 records, lrecl=200/27800 FB , 310

DD

statements, 310 OUTFIL INCLUDE statements.  RC=0, 310 members created,

all

the data checks out.

Test #2. Read the same input file, 321 DD statements, 321 OUTFIL INCLUDE



statements, abends:

10.09.26 JOB08830 IEC036I

002-B4,IGC0005E,IDSXSB7A,AA,VS09610,4BB9,SHRE16,

452
  452 IDSX00S.IDSXSB7.SYSE.FIDX03.PDSE

ICE185A 0 AN S002 ABEND WAS ISSUED BY DFSORT, ANOTHER PROGRAM OR AN EXIT



(PHASE C 3)
Quickref provides:
B4 - Unable to create a system buffer required for PDSE processing.

I retried with regions of 16M, 32M, 0M, same result.  Not sure if our
local storage police exit chokes off my attempt at 0M.


Interestingly, even though the abend occurred the output PDSE was
populated with all 321 members however the last 8 members contain 0
records.  Looks like DF/SORT was tripped up at the 313 mark by some

system

limitation. I'm going to consult with my sysprogs before we go to IBM

for

help.

P.S. My old successful attempt at writing 1,000 members occurred at a
different company, a much smaller shop, oddly enough.






On Wed, 20 Aug 2014 12:01:00 -0500, Sri h Kolusu skol...@us.ibm.com
wrote:

 Tony,

 It is quite easy to split the group of records into multiple members.
 Here
 is a sample JCL which will give you the desired results of splitting

the

 first 999 groups of records into a PDSE each containing the group of
 records. I also assumed your Input is already sorted on the field you
 want
 to split. I assumed that the split field is 44 bytes in length. If it

is

 different then you can change it in ALL the places referred by

KEYBEGIN.


 This job creates a dynamic JCL which will then be submitted via

INTRDR.

 Take a look at the output from Step0200 and then if everything looks

ok

 then change the statement
 //SORTOUT  DD SYSOUT=*  to  //SORTOUT  DD SYSOUT=(*,INTRDR),RECFM=FB
 If you have more than 999 groups of records we will copy the rest of

the

 records into another file which will then be used as input file to
 further
 split. I will show you how to build the dynamic JCL's based on that. I
 chose the split to be 999 groups as the maximum number of DD

statements

 per job step is 3273, based on the number of single DD statements

allowed

 for a TIOT (task input output table) control block size of 64K. This
 limit
 can be different depending on the installation defined TIOT size. The
 IBM-supplied default TIOT size is 32K.



//*

 //*  BUILD DYNAMIC OUTFIL CARDS AND DDNAMES FOR EACH GROUP OF RECORDS

*



//*

 //STEP0100 EXEC PGM=SORT
 //SYSOUT   DD SYSOUT=*
 //SORTIN   DD DISP=SHR,DSN=Your Input FB 100 Byte file
 //*
 //OFCARDS  DD DSN=C,DISP=(,PASS),SPACE=(CYL,(20,20),RLSE)
 //DDNAMES  DD DSN=D,DISP=(,PASS),SPACE=(CYL,(20,20),RLSE)
 //SORTOUT  DD DUMMY
 //SYSINDD *
   OPTION COPY,NULLOUT=RC4
   OUTREC IFTHEN=(WHEN=GROUP,KEYBEGIN=(1,44),PUSH=(101:ID=4))
  OUTFIL FNAMES=OFCARDS,REMOVECC,NODETAIL,BUILD=(80X),
   INCLUDE=(101,4,ZD,LT,1000),
   SECTIONS=(101,4,
   TRAILER3=(3:'OUTFIL FNAMES=OUTF',101,4,',BUILD=(1,100),',
C'INCLUDE=(101,4,ZD,EQ,',101,4,')')),
   TRAILER1=(3:'OUTFIL FNAMES=NGRP',101,4,',SAVE')
  OUTFIL FNAMES=DDNAMES,REMOVECC,NODETAIL,BUILD=(80X),
   INCLUDE=(101,4,ZD,LT,1000),
   SECTIONS=(101,4,
   TRAILER3=('//OUTF',101,4,' DD ',
 'DISP=SHR,DSN=Your.Split.PDSE(OUTF',101,4,')')),
   TRAILER1=('//NGRP',101,4,' DD ',
 'DSN=HLQ.TONYCLD.NGRP',101,4,','/,
 '//',15:'DISP=(NEW,CATLG,DELETE),',/,
 '//',15:'SPACE=(CYL,(100,40),RLSE)',/,
 '//*')
 //*


//*

 //*  SUBMIT THE SPLIT JOB TO INTRDR WITH THE ABOVE OUTPUT

Re: DF/SORT question (challenge?)

2014-08-21 Thread Sri h Kolusu
Tony,

ODMAXBF specifies the maximum buffer space DFSORT can use for each OUTFIL 
data set. Since you are creating so many OUTFIL files, it is a good idea 
to lower the buffer space for each OUTFIL.  Check this link which explains 
about ODMAXBF parameter in detail (search for ODMAXBF on that page)

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ice1ca60/3.14

Thanks
Kolusu
DFSORT Development
IBM Corporation



From:   TonyIcloud-OPERA tonybabo...@icloud.com
To: IBM-MAIN@LISTSERV.UA.EDU
Date:   08/21/2014 09:43 AM
Subject:Re: DF/SORT question (challenge?)
Sent by:IBM Mainframe Discussion List IBM-MAIN@LISTSERV.UA.EDU



Geez, I really should read:
1. the sample provided.
2. the book

RC=0

Now I need to find out more about ODMAXBF.  I feel like the guy who bought 
 
the toaster and didn't plug it in.






On Thu, 21 Aug 2014 11:35:25 -0500, Sri h Kolusu skol...@us.ibm.com 
wrote:

 Tony,

 Did you have the override of ODMAXBF?  In my sample JCL I have coded it 
 as
 ODMAXBF=100K overriding the default value of 2M. Can you rerun the job
 with the ODMAXBF parm?

 Thanks,
 Kolusu
 DFSORT Development
 IBM Corporation

 IBM Mainframe Discussion List IBM-MAIN@LISTSERV.UA.EDU wrote on
 08/21/2014 09:18:40 AM:

 From: TonyIcloud-OPERA tonybabo...@icloud.com
 To: IBM-MAIN@LISTSERV.UA.EDU
 Date: 08/21/2014 09:25 AM
 Subject: Re: DF/SORT question (challenge?)
 Sent by: IBM Mainframe Discussion List IBM-MAIN@LISTSERV.UA.EDU

 Before I tried the solution cited below (TYVM BTW), I set up a test
 manually with some interesting results.  The input file is not sorted,
 and
 I'm only doing SORT FIELDS=COPY.  All I want to do is to break up the
 file
 into a bunch of little files.

 Test #1. Read my input file, 229,762 records, lrecl=200/27800 FB , 310
 DD
 statements, 310 OUTFIL INCLUDE statements.  RC=0, 310 members created,
 all
 the data checks out.

 Test #2. Read the same input file, 321 DD statements, 321 OUTFIL 
INCLUDE

 statements, abends:

 10.09.26 JOB08830 IEC036I
 002-B4,IGC0005E,IDSXSB7A,AA,VS09610,4BB9,SHRE16,
 452
   452 IDSX00S.IDSXSB7.SYSE.FIDX03.PDSE

 ICE185A 0 AN S002 ABEND WAS ISSUED BY DFSORT, ANOTHER PROGRAM OR AN 
EXIT

 (PHASE C 3)
 Quickref provides:
 B4 - Unable to create a system buffer required for PDSE processing.

 I retried with regions of 16M, 32M, 0M, same result.  Not sure if our
 local storage police exit chokes off my attempt at 0M.


 Interestingly, even though the abend occurred the output PDSE was
 populated with all 321 members however the last 8 members contain 0
 records.  Looks like DF/SORT was tripped up at the 313 mark by some
 system
 limitation. I'm going to consult with my sysprogs before we go to IBM
 for
 help.

 P.S. My old successful attempt at writing 1,000 members occurred at a
 different company, a much smaller shop, oddly enough.






 On Wed, 20 Aug 2014 12:01:00 -0500, Sri h Kolusu skol...@us.ibm.com
 wrote:

  Tony,
 
  It is quite easy to split the group of records into multiple members.
  Here
  is a sample JCL which will give you the desired results of splitting
 the
  first 999 groups of records into a PDSE each containing the group of
  records. I also assumed your Input is already sorted on the field you
  want
  to split. I assumed that the split field is 44 bytes in length. If it
 is
  different then you can change it in ALL the places referred by
 KEYBEGIN.
 
  This job creates a dynamic JCL which will then be submitted via
 INTRDR.
  Take a look at the output from Step0200 and then if everything looks
 ok
  then change the statement
  //SORTOUT  DD SYSOUT=*  to  //SORTOUT  DD SYSOUT=(*,INTRDR),RECFM=FB
  If you have more than 999 groups of records we will copy the rest of
 the
  records into another file which will then be used as input file to
  further
  split. I will show you how to build the dynamic JCL's based on that. 
I
  chose the split to be 999 groups as the maximum number of DD
 statements
  per job step is 3273, based on the number of single DD statements
 allowed
  for a TIOT (task input output table) control block size of 64K. This
  limit
  can be different depending on the installation defined TIOT size. The
  IBM-supplied default TIOT size is 32K.
 
 
 //*
  //*  BUILD DYNAMIC OUTFIL CARDS AND DDNAMES FOR EACH GROUP OF RECORDS
 *
 
 //*
  //STEP0100 EXEC PGM=SORT
  //SYSOUT   DD SYSOUT=*
  //SORTIN   DD DISP=SHR,DSN=Your Input FB 100 Byte file
  //*
  //OFCARDS  DD DSN=C,DISP=(,PASS),SPACE=(CYL,(20,20),RLSE)
  //DDNAMES  DD DSN=D,DISP=(,PASS),SPACE=(CYL,(20,20),RLSE)
  //SORTOUT  DD DUMMY
  //SYSINDD *
OPTION COPY,NULLOUT=RC4
OUTREC IFTHEN=(WHEN=GROUP,KEYBEGIN=(1,44),PUSH=(101:ID=4))
   OUTFIL FNAMES=OFCARDS,REMOVECC,NODETAIL,BUILD=(80X),
INCLUDE=(101,4,ZD,LT,1000),
SECTIONS=(101,4,
TRAILER3=(3:'OUTFIL FNAMES=OUTF',101,4,',BUILD=(1,100

Re: DF/SORT question (challenge?)

2014-08-21 Thread Sri h Kolusu
Here's my question. If (can) sort insert records into its output on a 
break in key?
If so, why not sort the input file and, on each key break, generate an 
IEBUPDTE add control card and the write the record that belong to that 
card until the next key break. Do this for each key break and the 
resulting output file would be an IEUPDTE input stream that would then be 
fed into an IEBUPDTE job step that allocates a new PDS(e) and populates 
the members.

Chuck,

DFSORT is quite capable of generating the IEBUPDTE cards on key break. My 
sample JCL is doing a similar thing but generating the DFSORT OUTFIL 
control cards based on the key break.  If you want I can show you how to 
generate the IEBUPDTE sysin cards or for that matter any IBM utility 
control cards using DFSORT.  Send me an email and we can discuss it 
offline.

Thanks,
Kolusu
DFSORT Development

IBM Mainframe Discussion List IBM-MAIN@LISTSERV.UA.EDU wrote on 
08/21/2014 09:28:51 AM:

 From: Hardee, Chuck chuck.har...@thermofisher.com
 To: IBM-MAIN@LISTSERV.UA.EDU
 Date: 08/21/2014 09:29 AM
 Subject: Re: DF/SORT question (challenge?)
 Sent by: IBM Mainframe Discussion List IBM-MAIN@LISTSERV.UA.EDU
 
 Okay, let me say up front, I know nothing about the abilities of 
 SORT other than simple sort this file on these keys and give me the 
 output in this file. Okay, we're good?
 
 Here's my question. If (can) sort insert records into its output on 
 a break in key?
 If so, why not sort the input file and, on each key break, generate 
 an IEBUPDTE add control card and the write the record that belong to
 that card until the next key break. Do this for each key break and 
 the resulting output file would be an IEUPDTE input stream that 
 would then be fed into an IEBUPDTE job step that allocates a new PDS
 (e) and populates the members.
 
 No need to dynamically create a dataset/member for every key break, 
 just a single PS type output file, in key sequence, with control 
 cards as needed.
 
 Admittedly the control cards needed may be a bit more than a simple 
 add/insert (don't recall what terminology IEBUPDTE uses, haven't 
 used it in a while), and then there's the termination signal for 
 each member, but if the idea has merit, well, it's worth a try.
 
 Of course, all bets are off if the OP needs a unique PS type file 
 for each key versus a member in a PDS(e) for each key.
 
 Thanks for entertaining this idea.
 
 Chuck
 
 Charles (Chuck) Hardee
 Senior Systems Engineer/Database Administration
 CCG Information Technology
 
 Thermo Fisher Scientific
 300 Industry Drive | Pittsburgh, PA 15275
 Phone +1 (724) 517-2633 | Mobile +1 (412) 877-2809 | FAX: +1 (412) 
490-9230
 chuck.har...@thermofisher.com | www.thermofisher.com
 
 WORLDWIDE CONFIDENTIALITY NOTE: Dissemination, distribution or 
 copying of this e-mail or the information herein by anyone other 
 than the intended recipient, or an employee or agent of a system 
 responsible for delivering the message to the intended recipient, is
 prohibited. If you are not the intended recipient, please inform the
 sender and delete all copies.
 
 -Original Message-
 From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU
 ] On Behalf Of TonyIcloud-OPERA
 Sent: Thursday, August 21, 2014 12:19 PM
 To: IBM-MAIN@LISTSERV.UA.EDU
 Subject: Re: DF/SORT question (challenge?)
 
 Before I tried the solution cited below (TYVM BTW), I set up a test 
 manually with some interesting results.  The input file is not sorted, 
and 
 I'm only doing SORT FIELDS=COPY.  All I want to do is to break up the 
file 
 into a bunch of little files.
 
 Test #1. Read my input file, 229,762 records, lrecl=200/27800 FB , 310 
DD 
 statements, 310 OUTFIL INCLUDE statements.  RC=0, 310 members created, 
all 
 the data checks out.
 
 Test #2. Read the same input file, 321 DD statements, 321 OUTFIL INCLUDE 
 
 statements, abends:
 
 10.09.26 JOB08830 IEC036I 
002-B4,IGC0005E,IDSXSB7A,AA,VS09610,4BB9,SHRE16, 
 452
   452 IDSX00S.IDSXSB7.SYSE.FIDX03.PDSE
 
 ICE185A 0 AN S002 ABEND WAS ISSUED BY DFSORT, ANOTHER PROGRAM OR AN EXIT 
 
 (PHASE C 3)
 Quickref provides:
 B4 - Unable to create a system buffer required for PDSE processing.
 
 I retried with regions of 16M, 32M, 0M, same result.  Not sure if our 
 local storage police exit chokes off my attempt at 0M.
 
 
 Interestingly, even though the abend occurred the output PDSE was 
 populated with all 321 members however the last 8 members contain 0 
 records.  Looks like DF/SORT was tripped up at the 313 mark by some 
system 
 limitation. I'm going to consult with my sysprogs before we go to IBM 
for 
 help.
 
 P.S. My old successful attempt at writing 1,000 members occurred at a 
 different company, a much smaller shop, oddly enough.
 
 
 
 
 
 
 On Wed, 20 Aug 2014 12:01:00 -0500, Sri h Kolusu skol...@us.ibm.com 
 wrote:
 
  Tony,
 
  It is quite easy to split the group of records into multiple members. 
  Here
  is a sample JCL which will give you the desired results

Re: DF/SORT question (challenge?)

2014-08-21 Thread Shmuel Metz (Seymour J.)
In 0944307717662460.wa.paulgboulderaim@listserv.ua.edu, on
08/20/2014
   at 12:13 PM, Paul Gilmartin
000433f07816-dmarc-requ...@listserv.ua.edu said:

Strange DSN syntax,

Have you checked the TRAILER3 keyword of OUTFIL in the DF/SORT
documentation?
 
-- 
 Shmuel (Seymour J.) Metz, SysProg and JOAT
 ISO position; see http://patriot.net/~shmuel/resume/brief.html 
We don't care. We don't have to care, we're Congress.
(S877: The Shut up and Eat Your spam act of 2003)

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


DF/SORT question (challenge?)

2014-08-20 Thread TonyIcloud-OPERA
I have a dataset that contains records with a field, by which I need to  
create a separate dataset that would contain all occurrences of that  
field. For example the file, FB100, looks like


value1 other data.
value1 other data.
value1 other data.
value2 other data.
value2 other data.
value2 other data.
value3 other data.
value3 other data.
value3 other data.
value4 other data.
value4 other data.
value4 other data.

My final product must be a series of datasets:

hlq.value1.records
hlq.value2.records
hlq.value3.records
hlq.value4.records

There may be hundreds/thousands of possible values, hence  
hundreds/thousands of datasets.  I have accomplished this in 3 phases,  
first pass reads the data, uses ICETOOL OCCUR to list the values, second  
phase reads the OUTPUT and formats DD statements and OUTFIL OUTREC  
statements, the third phase reads the original data to create the numerous  
output files.  I used a newly created PDSE as the output file whereupon  
the third phase created several thousand members.


It works, after a fashion, but I'd like a more simple solution.


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: DF/SORT question (challenge?)

2014-08-20 Thread Sam Siegel
Have you considered writing a program which dynamically allocates the
output files?


On Wed, Aug 20, 2014 at 7:34 AM, TonyIcloud-OPERA tonybabo...@icloud.com
wrote:

 I have a dataset that contains records with a field, by which I need to
 create a separate dataset that would contain all occurrences of that field.
 For example the file, FB100, looks like

 value1 other data.
 value1 other data.
 value1 other data.
 value2 other data.
 value2 other data.
 value2 other data.
 value3 other data.
 value3 other data.
 value3 other data.
 value4 other data.
 value4 other data.
 value4 other data.

 My final product must be a series of datasets:

 hlq.value1.records
 hlq.value2.records
 hlq.value3.records
 hlq.value4.records

 There may be hundreds/thousands of possible values, hence
 hundreds/thousands of datasets.  I have accomplished this in 3 phases,
 first pass reads the data, uses ICETOOL OCCUR to list the values, second
 phase reads the OUTPUT and formats DD statements and OUTFIL OUTREC
 statements, the third phase reads the original data to create the numerous
 output files.  I used a newly created PDSE as the output file whereupon the
 third phase created several thousand members.

 It works, after a fashion, but I'd like a more simple solution.


 --
 For IBM-MAIN subscribe / signoff / archive access instructions,
 send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: DF/SORT question (challenge?)

2014-08-20 Thread John McKown
On Wed, Aug 20, 2014 at 9:34 AM, TonyIcloud-OPERA tonybabo...@icloud.com
wrote:

 I have a dataset that contains records with a field, by which I need to
 create a separate dataset that would contain all occurrences of that field.
 For example the file, FB100, looks like

 value1 other data.
 value1 other data.
 value1 other data.
 value2 other data.
 value2 other data.
 value2 other data.
 value3 other data.
 value3 other data.
 value3 other data.
 value4 other data.
 value4 other data.
 value4 other data.

 My final product must be a series of datasets:

 hlq.value1.records
 hlq.value2.records
 hlq.value3.records
 hlq.value4.records

 There may be hundreds/thousands of possible values, hence
 hundreds/thousands of datasets.  I have accomplished this in 3 phases,
 first pass reads the data, uses ICETOOL OCCUR to list the values, second
 phase reads the OUTPUT and formats DD statements and OUTFIL OUTREC
 statements, the third phase reads the original data to create the numerous
 output files.  I used a newly created PDSE as the output file whereupon the
 third phase created several thousand members.

 It works, after a fashion, but I'd like a more simple solution.


Well, assuming that performance is not an overriding concern, I would have
two steps. The first would be a DFSORT which sorts the records in order by
the field in question. The second step would be a REXX program which would
look something like:

/* REXX */
VALUE='';
DO FOREVER
  EXECIO DISKR 1 INPUT
  IF RC  0 THEN LEAVE /* LEAVE IF EOF */
 PARSE PULL RECORD
 NVALUE=WORD(RECORD,1) /* EXTRACT VALUE */
 IF VALUE  NVALUE THEN DO
 EXECIO 0 DISKW OUTPUT (FINIS
 ADDRESS TSO FREE DDN(OUTPUT)
 ADDRESS TSO ALLOC DDN(OUTPUT) DSN(hlq.VALUE.records) ,
NEW CATALOG SPACE(a b) CYL RECFM(f) LRECL(lrecl) BLKSIZE(0)
 END
 PUSH RECORD
 EXECIO DISKW 1 OUTPUT
END

Of course, you need to customize the ALLOC command. And in my JCL, I would
have a //OUTPUT DD DUMMY

If you're really adventurous, I'll give you a UNIX solution. But most
people don't really want that.
-- 
There is nothing more pleasant than traveling and meeting new people!
Genghis Khan

Maranatha! 
John McKown

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: DF/SORT question (challenge?)

2014-08-20 Thread TonyIcloud-OPERA
Looks good, I'll try it out.  Thanks.  I'd be curious about a UNIX (aka  
the dark side) solution.  I need the practice.


P.S. Sam, thanks for the response but we need to keep this out of the  
development area due to change control constraints.  REXX is viable  
because we can tap dance around our bureaucracy.






On Wed, 20 Aug 2014 09:58:13 -0500, John McKown  
john.archie.mck...@gmail.com wrote:


On Wed, Aug 20, 2014 at 9:34 AM, TonyIcloud-OPERA  
tonybabo...@icloud.com

wrote:


I have a dataset that contains records with a field, by which I need to
create a separate dataset that would contain all occurrences of that  
field.

For example the file, FB100, looks like

value1 other data.
value1 other data.
value1 other data.
value2 other data.
value2 other data.
value2 other data.
value3 other data.
value3 other data.
value3 other data.
value4 other data.
value4 other data.
value4 other data.

My final product must be a series of datasets:

hlq.value1.records
hlq.value2.records
hlq.value3.records
hlq.value4.records

There may be hundreds/thousands of possible values, hence
hundreds/thousands of datasets.  I have accomplished this in 3 phases,
first pass reads the data, uses ICETOOL OCCUR to list the values, second
phase reads the OUTPUT and formats DD statements and OUTFIL OUTREC
statements, the third phase reads the original data to create the  
numerous
output files.  I used a newly created PDSE as the output file whereupon  
the

third phase created several thousand members.

It works, after a fashion, but I'd like a more simple solution.


Well, assuming that performance is not an overriding concern, I would  
have
two steps. The first would be a DFSORT which sorts the records in order  
by
the field in question. The second step would be a REXX program which  
would

look something like:

/* REXX */
VALUE='';
DO FOREVER
  EXECIO DISKR 1 INPUT
  IF RC  0 THEN LEAVE /* LEAVE IF EOF */
 PARSE PULL RECORD
 NVALUE=WORD(RECORD,1) /* EXTRACT VALUE */
 IF VALUE  NVALUE THEN DO
 EXECIO 0 DISKW OUTPUT (FINIS
 ADDRESS TSO FREE DDN(OUTPUT)
 ADDRESS TSO ALLOC DDN(OUTPUT) DSN(hlq.VALUE.records) ,
NEW CATALOG SPACE(a b) CYL RECFM(f) LRECL(lrecl) BLKSIZE(0)
 END
 PUSH RECORD
 EXECIO DISKW 1 OUTPUT
END

Of course, you need to customize the ALLOC command. And in my JCL, I  
would

have a //OUTPUT DD DUMMY

If you're really adventurous, I'll give you a UNIX solution. But most
people don't really want that.



--
Using Opera's mail client: http://www.opera.com/mail/

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: DF/SORT question (challenge?)

2014-08-20 Thread Nims,Alva John (Al)
For the REXX code, would the performance be improved if you wrote all the 
records to a file at one time, instead of a record at a time?  (use QUEUE in 
this case instead of PUSH).

I used to do the same thing all in one REXX program, but I used IBM's software, 
SmartBatch Works... (or something like that) this software provided a TSO 
PIPE command which let me queue up all the records and after creating a 
specific separator line between each set of data, I could have it write all the 
members of the PDSe at one time.

Al Nims
Systems Admin/Programmer 3
Information Technology
University of Florida
(352) 273-1298

-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of John McKown
Sent: Wednesday, August 20, 2014 10:58 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: DF/SORT question (challenge?)

On Wed, Aug 20, 2014 at 9:34 AM, TonyIcloud-OPERA tonybabo...@icloud.com
wrote:

 I have a dataset that contains records with a field, by which I need 
 to create a separate dataset that would contain all occurrences of that field.
 For example the file, FB100, looks like

 value1 other data.
 value1 other data.
 value1 other data.
 value2 other data.
 value2 other data.
 value2 other data.
 value3 other data.
 value3 other data.
 value3 other data.
 value4 other data.
 value4 other data.
 value4 other data.

 My final product must be a series of datasets:

 hlq.value1.records
 hlq.value2.records
 hlq.value3.records
 hlq.value4.records

 There may be hundreds/thousands of possible values, hence 
 hundreds/thousands of datasets.  I have accomplished this in 3 phases, 
 first pass reads the data, uses ICETOOL OCCUR to list the values, 
 second phase reads the OUTPUT and formats DD statements and OUTFIL 
 OUTREC statements, the third phase reads the original data to create 
 the numerous output files.  I used a newly created PDSE as the output 
 file whereupon the third phase created several thousand members.

 It works, after a fashion, but I'd like a more simple solution.


Well, assuming that performance is not an overriding concern, I would have two 
steps. The first would be a DFSORT which sorts the records in order by the 
field in question. The second step would be a REXX program which would look 
something like:

/* REXX */
VALUE='';
DO FOREVER
  EXECIO DISKR 1 INPUT
  IF RC  0 THEN LEAVE /* LEAVE IF EOF */
 PARSE PULL RECORD
 NVALUE=WORD(RECORD,1) /* EXTRACT VALUE */
 IF VALUE  NVALUE THEN DO
 EXECIO 0 DISKW OUTPUT (FINIS
 ADDRESS TSO FREE DDN(OUTPUT)
 ADDRESS TSO ALLOC DDN(OUTPUT) DSN(hlq.VALUE.records) ,
NEW CATALOG SPACE(a b) CYL RECFM(f) LRECL(lrecl) BLKSIZE(0)
 END
 PUSH RECORD
 EXECIO DISKW 1 OUTPUT
END

Of course, you need to customize the ALLOC command. And in my JCL, I would have 
a //OUTPUT DD DUMMY

If you're really adventurous, I'll give you a UNIX solution. But most people 
don't really want that.
--
There is nothing more pleasant than traveling and meeting new people!
Genghis Khan

Maranatha! 
John McKown

--
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: DF/SORT question (challenge?)

2014-08-20 Thread Elardus Engelbrecht
John McKown wrote:

I concur with everything what John said.

Well, assuming that performance is not an overriding concern, I would have two 
steps. The first would be a DFSORT which sorts the records in order by the 
field in question. 

And drop the duplicates too. DFSORT can do that for you.

 ADDRESS TSO FREE DDN(OUTPUT)

I would insert this IF SYSDSN(hlq.VALUE.records) /= 'OK' THEN

DO/END these ALLOC statements inside the IF SYSDSN part

 ADDRESS TSO ALLOC DDN(OUTPUT) DSN(hlq.VALUE.records) ,
NEW CATALOG SPACE(a b) CYL RECFM(f) LRECL(lrecl) BLKSIZE(0)

So, ALLOC is run after a check.

Just curious, do you need to add BLKSIZE?

Of course, you need to customize the ALLOC command. And in my JCL, I would 
have a //OUTPUT DD DUMMY

For the first few datasets to practise on the ALLOC, I would like to see what 
is in OUTPUT. Then if everything is fine, I will let DUMMY it. 

Create another REXX program to read the input again and use SYSDSN to pickup 
any missed datasets.


If you're really adventurous, I'll give you a UNIX solution. But most people 
don't really want that.

Post it! [1] If they don't like it, they will just vanish and not be 
remembered... :-D

Groete / Greetings
Elardus Engelbrecht

[1] - I think one of my colleagues may like that.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: DF/SORT question (challenge?)

2014-08-20 Thread Paul Gilmartin
On Wed, 20 Aug 2014 10:26:30 -0500, Elardus Engelbrecht wrote:

Just curious, do you need to add BLKSIZE?
 
SDB is your friend.  He was probably just calling attention that
he was relying on it.

For the first few datasets to practise on the ALLOC, I would like to see what 
is in OUTPUT. Then if everything is fine, I will let DUMMY it. 
 
John's use of DUMMY appears to be merely to supply a loop invariant:
Each iteration begins with OUTPUT allocated and open.

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: DF/SORT question (challenge?)

2014-08-20 Thread Paul Gilmartin
On Wed, 20 Aug 2014 10:20:43 -0500, TonyIcloud-OPERA wrote:

Looks good, I'll try it out.  Thanks.  I'd be curious about a UNIX (aka
the dark side) solution.  I need the practice.

P.S. Sam, thanks for the response but we need to keep this out of the
development area due to change control constraints.  REXX is viable
because we can tap dance around our bureaucracy.
 
A UNIX solution would be very similar, except one could pipe SORTOUT
into awk (I think) avoiding the need for a temporary data set.  But
beware: if your data contain binary fields, with an occasional 0x15,
they'll be mangled by most UNIX utilities.

 ... hundreds/thousands ...
  
Gasp!

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: DF/SORT question (challenge?)

2014-08-20 Thread Sri h Kolusu
Tony,

It is quite easy to split the group of records into multiple members. Here 
is a sample JCL which will give you the desired results of splitting the 
first 999 groups of records into a PDSE each containing the group of 
records. I also assumed your Input is already sorted on the field you want 
to split. I assumed that the split field is 44 bytes in length. If it is 
different then you can change it in ALL the places referred by KEYBEGIN.

This job creates a dynamic JCL which will then be submitted via INTRDR. 
Take a look at the output from Step0200 and then if everything looks ok 
then change the statement 
//SORTOUT  DD SYSOUT=*  to  //SORTOUT  DD SYSOUT=(*,INTRDR),RECFM=FB 
 
If you have more than 999 groups of records we will copy the rest of the 
records into another file which will then be used as input file to further 
split. I will show you how to build the dynamic JCL's based on that. I 
chose the split to be 999 groups as the maximum number of DD statements 
per job step is 3273, based on the number of single DD statements allowed 
for a TIOT (task input output table) control block size of 64K. This limit 
can be different depending on the installation defined TIOT size. The 
IBM-supplied default TIOT size is 32K. 

//*
//*  BUILD DYNAMIC OUTFIL CARDS AND DDNAMES FOR EACH GROUP OF RECORDS *
//*
//STEP0100 EXEC PGM=SORT 
//SYSOUT   DD SYSOUT=* 
//SORTIN   DD DISP=SHR,DSN=Your Input FB 100 Byte file
//* 
//OFCARDS  DD DSN=C,DISP=(,PASS),SPACE=(CYL,(20,20),RLSE) 
//DDNAMES  DD DSN=D,DISP=(,PASS),SPACE=(CYL,(20,20),RLSE)
//SORTOUT  DD DUMMY 
//SYSINDD * 
  OPTION COPY,NULLOUT=RC4 
  OUTREC IFTHEN=(WHEN=GROUP,KEYBEGIN=(1,44),PUSH=(101:ID=4)) 
 
  OUTFIL FNAMES=OFCARDS,REMOVECC,NODETAIL,BUILD=(80X), 
  INCLUDE=(101,4,ZD,LT,1000), 
  SECTIONS=(101,4, 
  TRAILER3=(3:'OUTFIL FNAMES=OUTF',101,4,',BUILD=(1,100),', 
   C'INCLUDE=(101,4,ZD,EQ,',101,4,')')), 
  TRAILER1=(3:'OUTFIL FNAMES=NGRP',101,4,',SAVE') 
 
  OUTFIL FNAMES=DDNAMES,REMOVECC,NODETAIL,BUILD=(80X), 
  INCLUDE=(101,4,ZD,LT,1000), 
  SECTIONS=(101,4, 
  TRAILER3=('//OUTF',101,4,' DD ', 
'DISP=SHR,DSN=Your.Split.PDSE(OUTF',101,4,')')), 
  TRAILER1=('//NGRP',101,4,' DD ', 
'DSN=HLQ.TONYCLD.NGRP',101,4,','/, 
'//',15:'DISP=(NEW,CATLG,DELETE),',/, 
'//',15:'SPACE=(CYL,(100,40),RLSE)',/, 
'//*') 
//*
//*
//*  SUBMIT THE SPLIT JOB TO INTRDR WITH THE ABOVE OUTPUT *
//*
//STEP0200 EXEC  PGM=SORT,COND=(4,EQ,STEP0100) 
//SYSOUT   DD SYSOUT=* 
//SYSINDD * 
   OPTION COPY 
//*SORTOUT  DD SYSOUT=(*,INTRDR),RECFM=FB 
//SORTOUT  DD SYSOUT=* 
//SORTIN   DD DATA,DLM=$$ 
//SPLTTONY JOB (DA26,001,098,J69),'TONY', 
// CLASS=A, 
// MSGCLASS=H, 
// MSGLEVEL=(1,1), 
// TIME=(,15), 
// NOTIFY=USERID 
//* 
//SPLTSTEP EXEC PGM=SORT,REGION=0M 
//SYSOUT   DD SYSOUT=* 
//SORTIN   DD DISP=SHR,DSN=Your Input FB 100 Byte file
$$ 
// DD DSN=D,DISP=(OLD,PASS) 
// DD DATA,DLM=$$ 
//SYSINDD * 
  OPTION COPY,ODMAXBF=100K 
  OUTREC IFTHEN=(WHEN=GROUP,KEYBEGIN=(1,44),PUSH=(101:ID=4))
$$ 
// DD DSN=C,DISP=(OLD,PASS)
//*
 
Further if you have any questions please let me know

Thanks,
Kolusu
DFSORT Development
IBM Corporation

IBM Mainframe Discussion List IBM-MAIN@LISTSERV.UA.EDU wrote on 
08/20/2014 07:34:48 AM:

 From: TonyIcloud-OPERA tonybabo...@icloud.com
 To: IBM-MAIN@LISTSERV.UA.EDU
 Date: 08/20/2014 07:35 AM
 Subject: DF/SORT question (challenge?)
 Sent by: IBM Mainframe Discussion List IBM-MAIN@LISTSERV.UA.EDU
 
 I have a dataset that contains records with a field, by which I need to 
 create a separate dataset that would contain all occurrences of that 
 field. For example the file, FB100, looks like
 
 value1 other data.
 value1 other data.
 value1 other data.
 value2 other data.
 value2 other data.
 value2 other data.
 value3 other data.
 value3 other data.
 value3 other data.
 value4 other data.
 value4 other data.
 value4 other data.
 
 My final product must be a series of datasets:
 
 hlq.value1.records
 hlq.value2.records
 hlq.value3.records
 hlq.value4.records
 
 There may be hundreds/thousands of possible values, hence 
 hundreds/thousands of datasets.  I have accomplished this in 3 phases, 
 first pass reads the data, uses ICETOOL OCCUR to list the values, second 
 
 phase reads the OUTPUT and formats DD statements and OUTFIL OUTREC 
 statements, the third phase reads the original data to create the 
numerous 
 output files.  I used a newly created PDSE as the output file whereupon 
 the third phase created several thousand members.
 
 It works, after a fashion, but I'd

Re: DF/SORT question (challenge?)

2014-08-20 Thread Paul Gilmartin
On Wed, 20 Aug 2014 10:01:00 -0700, Sri h Kolusu wrote:
...
'DISP=SHR,DSN=Your.Split.PDSE(OUTF',101,4,')')),
   
Strange DSN syntax, but perhaps I'm looking with a JCL bias.

I understand that PDSE allows multiple members open for output
concurrently.  (FSVO multiple; what's the limit?)

can DFSORT exploit this capability?

I believe I've tried it with ISPF LM and failed.

Does it require multiple DCBs?

--gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: DF/SORT question (challenge?)

2014-08-20 Thread Sri h Kolusu
Paul,

DFSORT was able to handle writing up to 999 members into a PDSE 
simultaneously.   Beyond that I get  IEF649I EXCESSIVE NUMBER OF DD 
STATEMENTS 

Regarding the syntax about DSN, I Just showed OP how he needs to populate 
his own PDSE name in that string. 

After step0200, the DSN will be resolved as follows

DISP=SHR,DSN=KOLUSU.TONYCLD.PDSE(OUTF0001) 
DISP=SHR,DSN=KOLUSU.TONYCLD.PDSE(OUTF0002) 
...
DISP=SHR,DSN=KOLUSU.TONYCLD.PDSE(OUTF0999) 

Thanks,
Kolusu
DFSORT Development

IBM Mainframe Discussion List IBM-MAIN@LISTSERV.UA.EDU wrote on 
08/20/2014 10:13:20 AM:

 From: Paul Gilmartin 000433f07816-dmarc-requ...@listserv.ua.edu
 To: IBM-MAIN@LISTSERV.UA.EDU
 Date: 08/20/2014 10:13 AM
 Subject: Re: DF/SORT question (challenge?)
 Sent by: IBM Mainframe Discussion List IBM-MAIN@LISTSERV.UA.EDU
 
 On Wed, 20 Aug 2014 10:01:00 -0700, Sri h Kolusu wrote:
 ...
 'DISP=SHR,DSN=Your.Split.PDSE(OUTF',101,4,')')),
  
 Strange DSN syntax, but perhaps I'm looking with a JCL bias.
 
 I understand that PDSE allows multiple members open for output
 concurrently.  (FSVO multiple; what's the limit?)
 
 can DFSORT exploit this capability?
 
 I believe I've tried it with ISPF LM and failed.
 
 Does it require multiple DCBs?
 
 --gil
 
 --
 For IBM-MAIN subscribe / signoff / archive access instructions,
 send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
 

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: DF/SORT question (challenge?)

2014-08-20 Thread TonyIcloud-OPERA
I once allocated a PDSE, and using DF/SORT, wrote 1,000 members to it in  
one pass of data.  I was tempted to try 10K output members but my beverage  
wager was already won.  When I get a bit of time, since I already have  
devised a technique to generate N number of DD statements and OUTFIL  
statements I'll try 10,000.  I don't recall the maximum number of DD  
cards??






On Wed, 20 Aug 2014 12:13:20 -0500, Paul Gilmartin  
000433f07816-dmarc-requ...@listserv.ua.edu wrote:



On Wed, 20 Aug 2014 10:01:00 -0700, Sri h Kolusu wrote:

...
   'DISP=SHR,DSN=Your.Split.PDSE(OUTF',101,4,')')),


Strange DSN syntax, but perhaps I'm looking with a JCL bias.

I understand that PDSE allows multiple members open for output
concurrently.  (FSVO multiple; what's the limit?)

can DFSORT exploit this capability?

I believe I've tried it with ISPF LM and failed.

Does it require multiple DCBs?

--gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN



--
Using Opera's mail client: http://www.opera.com/mail/

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: DF/SORT question (challenge?)

2014-08-20 Thread Paul Gilmartin
On Wed, 20 Aug 2014 12:54:02 -0500, TonyIcloud-OPERA wrote:

I once allocated a PDSE, and using DF/SORT, wrote 1,000 members to it in
one pass of data.  I was tempted to try 10K output members but my beverage
wager was already won.  When I get a bit of time, since I already have
devised a technique to generate N number of DD statements and OUTFIL
statements I'll try 10,000.  I don't recall the maximum number of DD
cards??

SMP/E once strangled trying to process about 1000 expanded SMPPTFIN
members from my GIMZIP archive.  Kurt reported it has since been
redesigned, and he speaketh sooth; I can no longer break it that way.
It now appears to process them in bunches of a few hundred rather than
concatenating them all.  POSIX pipes would seem an ideal solution (it's
Dark Side stuff anyway), but error reporting would be problematic.

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: DF/SORT question (challenge?)

2014-08-20 Thread Ed Gould

On Aug 20, 2014, at 12:54 PM, TonyIcloud-OPERA wrote:

I once allocated a PDSE, and using DF/SORT, wrote 1,000 members to  
it in one pass of data.  I was tempted to try 10K output members  
but my beverage wager was already won.  When I get a bit of time,  
since I already have devised a technique to generate N number of DD  
statements and OUTFIL statements I'll try 10,000.  I don't recall  
the maximum number of DD cards??



Try adding close=free to the DD statement

Ed

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: DF/SORT question (challenge?)

2014-08-20 Thread Sri h Kolusu
 Try adding close=free to the DD statement

Ed,

When using DFSORT applications, FREE=CLOSE cannot be used on any DD 
statements except DFSPARM. 

Thanks,
Kolusu

IBM Mainframe Discussion List IBM-MAIN@LISTSERV.UA.EDU wrote on 
08/20/2014 03:24:55 PM:

 From: Ed Gould edgould1...@comcast.net
 To: IBM-MAIN@LISTSERV.UA.EDU
 Date: 08/20/2014 03:28 PM
 Subject: Re: DF/SORT question (challenge?)
 Sent by: IBM Mainframe Discussion List IBM-MAIN@LISTSERV.UA.EDU
 
 On Aug 20, 2014, at 12:54 PM, TonyIcloud-OPERA wrote:
 
  I once allocated a PDSE, and using DF/SORT, wrote 1,000 members to 
  it in one pass of data.  I was tempted to try 10K output members 
  but my beverage wager was already won.  When I get a bit of time, 
  since I already have devised a technique to generate N number of DD 
  statements and OUTFIL statements I'll try 10,000.  I don't recall 
  the maximum number of DD cards??
 
 Try adding close=free to the DD statement
 
 Ed
 
 --
 For IBM-MAIN subscribe / signoff / archive access instructions,
 send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
 

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: DF/SORT question (challenge?)

2014-08-20 Thread Ed Gould

Good reason to try the other sort.

Ed

On Aug 20, 2014, at 6:06 PM, Sri h Kolusu wrote:


Try adding close=free to the DD statement


Ed,

When using DFSORT applications, FREE=CLOSE cannot be used on any DD
statements except DFSPARM.

Thanks,
Kolusu

IBM Mainframe Discussion List IBM-MAIN@LISTSERV.UA.EDU wrote on
08/20/2014 03:24:55 PM:


From: Ed Gould edgould1...@comcast.net
To: IBM-MAIN@LISTSERV.UA.EDU
Date: 08/20/2014 03:28 PM
Subject: Re: DF/SORT question (challenge?)
Sent by: IBM Mainframe Discussion List IBM-MAIN@LISTSERV.UA.EDU

On Aug 20, 2014, at 12:54 PM, TonyIcloud-OPERA wrote:


I once allocated a PDSE, and using DF/SORT, wrote 1,000 members to
it in one pass of data.  I was tempted to try 10K output members
but my beverage wager was already won.  When I get a bit of time,
since I already have devised a technique to generate N number of DD
statements and OUTFIL statements I'll try 10,000.  I don't recall
the maximum number of DD cards??


Try adding close=free to the DD statement

Ed

- 
-

For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM- 
MAIN




--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: DF/SORT question (challenge?)

2014-08-20 Thread Gibney, Dave
I am sure the other sort also frequently closes and reopens several, if not 
most DDs also.
:)

 -Original Message-
 From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU]
 On Behalf Of Ed Gould
 Sent: Wednesday, August 20, 2014 4:47 PM
 To: IBM-MAIN@LISTSERV.UA.EDU
 Subject: Re: DF/SORT question (challenge?)
 
 Good reason to try the other sort.
 
 Ed
 
 On Aug 20, 2014, at 6:06 PM, Sri h Kolusu wrote:
 
  Try adding close=free to the DD statement
 
  Ed,
 
  When using DFSORT applications, FREE=CLOSE cannot be used on any DD
  statements except DFSPARM.
 
  Thanks,
  Kolusu
 
  IBM Mainframe Discussion List IBM-MAIN@LISTSERV.UA.EDU wrote on
  08/20/2014 03:24:55 PM:
 
  From: Ed Gould edgould1...@comcast.net
  To: IBM-MAIN@LISTSERV.UA.EDU
  Date: 08/20/2014 03:28 PM
  Subject: Re: DF/SORT question (challenge?) Sent by: IBM Mainframe
  Discussion List IBM-MAIN@LISTSERV.UA.EDU
 
  On Aug 20, 2014, at 12:54 PM, TonyIcloud-OPERA wrote:
 
  I once allocated a PDSE, and using DF/SORT, wrote 1,000 members to
  it in one pass of data.  I was tempted to try 10K output members but
  my beverage wager was already won.  When I get a bit of time, since
  I already have devised a technique to generate N number of DD
  statements and OUTFIL statements I'll try 10,000.  I don't recall
  the maximum number of DD cards??
 
  Try adding close=free to the DD statement
 
  Ed
 
  -
  -
  For IBM-MAIN subscribe / signoff / archive access instructions, send
  email to lists...@listserv.ua.edu with the message: INFO IBM- MAIN
 
 
  --
  For IBM-MAIN subscribe / signoff / archive access instructions, send
  email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
 
 --
 For IBM-MAIN subscribe / signoff / archive access instructions, send email to
 lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: DF/SORT question (challenge?)

2014-08-20 Thread Shane Ginnane
awk '{print  hlq.$1.file}' dfsort.input

Even OMVS should be able to achieve that. Can't see any reason for a sort.

Shane ...

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: DF/SORT question (challenge?)

2014-08-20 Thread Ed Gould

On Aug 20, 2014, at 6:53 PM, Gibney, Dave wrote:

I am sure the other sort also frequently closes and reopens  
several, if not most DDs also.

:)


Well lets ask them on here. Does Syncsort Open/Close its DD  
statements prohibiting Free=close ?


Ed

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN