Reducing I/O amount



High Level Assembler(HLASM) for MVS & VM & VSE

Re: Reducing I/O amount

Postby BillW » Thu Nov 10, 2011 8:29 am

Just a thought. You can take advantage of the sorts fast I/O by using sort exits. I did this once long ago when I was sorting large datasets and wanted to minimize passes through the data. In your case, you could use a sort exit to count the records in input. As you can fail the record (i.e. tell sort not to sort/merge it) with a return code. Sort will get the next record for you. I believe you are given indication that you have end of input file(s) and you could print your record count. Not sure if this is just an exercise or if it something you need to do on a regular basis, which is the only reason to use a sort exit.
BillW
 
Posts: 20
Joined: Thu Nov 10, 2011 8:21 am
Has thanked: 0 time
Been thanked: 3 times

Re: Re: Reducing I/O amount

 

Re: Reducing I/O amount

Postby steve-myers » Thu Nov 10, 2011 10:57 am

Yes, that would work, though it's rather unorthodox.
steve-myers
Global moderator
 
Posts: 1885
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 197 times

Re: Reducing I/O amount

Postby BillW » Fri Nov 11, 2011 12:52 am

Perhaps, and not as cool as writing your own excp routines/channel programs, but workable. Whether or not one would do it depends on the parameters not expressed in the initial post. But, sort has much better i/o than many other utilities and you don't have to deal with lower level minutia of DASD.
BillW
 
Posts: 20
Joined: Thu Nov 10, 2011 8:21 am
Has thanked: 0 time
Been thanked: 3 times

Re: Reducing I/O amount

Postby BillyBoyo » Fri Nov 11, 2011 5:30 am

From "Smart DFSORT Tricks"

//CTRCDS EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=...input file
//OUT DD DSN=...output file
//TOOLIN DD *
COUNT FROM(IN) WRITE(OUT) DIGITS(8)
/*


Saves the overhead of an Exit. Works with F/FB files as well as V/VB (+VSAM, etc) without having to have seperate Exits. The we come full circle, matching to the EXCPs to DFSORT and not reducing them for TS's code :-)
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: Reducing I/O amount

Postby steve-myers » Fri Nov 11, 2011 10:09 am

Of course, Billyboyo's little example could be "optimized" by specifying

//OUT DD DUMMY

Not that I've actually tried it!
steve-myers
Global moderator
 
Posts: 1885
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 197 times

Re: Reducing I/O amount

Postby Frank Yaeger » Sat Nov 12, 2011 12:00 am

Of course, Billyboyo's little example could be "optimized" by specifying

//OUT DD DUMMY


Huh? That makes no sense. If you don't need to see the count in the OUT data set, then you would just use:

//CTRCDS EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=...input file
//TOOLIN DD *
COUNT FROM(IN)
/*


DFSORT displays the count in TOOLMSG.

If you want the count in a data set, then you would use WRITE(OUT) with a //OUT DD you could look at (not DUMMY).
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1080
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 14 times

Previous

Return to Assembler