Page 1 of 1

Sort & Merge

PostPosted: Tue Oct 02, 2012 10:44 pm
by gowthamgyaa
Hi everyone,
In the below Prog why we using space parameter twice as sortwk01 and sortwk02???


//OZA059SO JOB OZA,OZA,MSGLEVEL=(1,1),
// CLASS=A,MSGCLASS=A,NOTIFY=&SYSUID
//***************************************************
//*DEMO JCL TO SHOW THE SORT UTILTITY WITH COPY OPTION
//***************************************************
//STEP10 EXEC PGM=SORT
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSDUMP DD SYSOUT=*
//SORTIN01 DD DSN=OZA058.PRIYA.COBOL.EMPFILE,DISP=SHR
//SORTIN02 DD DSN=OZA058.PRIYA.COBOL.SORTOUT,DISP=SHR
//SORTOUT DD DSN=OZA058.PRIYA.COBOL.MEROUT,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(TRK,(1,1),RLSE),
// UNIT=SYSDA,
// DCB=(DSORG=PS,RECFM=FB,LRECL=30,BLKSIZE=300)
//SORTWK01 DD SPACE=(TRK,(1,1),RLSE),UNIT=SYSDA
//SORTWK02 DD SPACE=(TRK,(1,1),RLSE),UNIT=SYSDA
//SYSIN DD *
MERGE FIELDS=(1,3,CH,A)
//


Kind regard's
gyaa

Re: Sort & Merge

PostPosted: Tue Oct 02, 2012 10:59 pm
by enrico-sorichetti
In the below Prog why we using space parameter twice as sortwk01 and sortwk02???


because they are different DDs and every DD needs its space specifications.

Your incompetent instructor should have told You that for a merge applicaton
the sortwk files are not needed.
and the comment in the jcl stream is misleading

anyway when You ask a question and we reply asking for more info
jcl/topic8220.html

Re: Sort & Merge

PostPosted: Tue Oct 02, 2012 11:43 pm
by dick scherrer
Hello,

In the below Prog why we using space parameter twice as sortwk01 and sortwk02???
As too often happens, incorrect terminology fails to communicate. . . There is no "Prog below". There are some JCL and sort control statements.
When specifyiong SPACE, there is a primary and a secondary allocation parameter.

It sounds like your trainer/instructor has failed to provide even the basic information to you.

Suggest you read about dataset allocation in the JCL manual and how "new" dasd datasets are created. If you find something in the documentation that is not clear, post what you found and your doubt. Someone will be able to clarify.

Re: Sort & Merge

PostPosted: Tue Oct 02, 2012 11:48 pm
by gowthamgyaa
@enrico,
When u see al my post from Sep2 when i started my journey and posted several queries in Career guidance & also now in JCL i had thanked each & everyone for every post.
The added thing is till now for all my queries am getting a solution here but for the last post which you had mentioned i got criticism not solution.
you all being an experienced person in Mainframe you might feel my doubts as silly but your guidance are indeed needed for me.
Any how i should have told my appreciations.


Regard's
gyaa

Re: Sort & Merge

PostPosted: Tue Oct 02, 2012 11:51 pm
by gowthamgyaa
Thanks for your kind reply,
We just creating only one new dataset and in this case it is needed if we use only one SPACE PARAMETER.
Whats the need for the second one?
For SPACE PARAMETER they had given a DDName, so can i use DD Name for DCB , DISP ?

Kind regard's
gyaa

Re: Sort & Merge

PostPosted: Wed Oct 03, 2012 12:35 am
by BillyBoyo
You are actually doing a MERGE. You don't need the SORTWKnn DDs at all for a MERGE.

If you were doing a SORT, and the input dataset is of sufficient size, then the SORTWKnn files are used to hold the partially sorted data as things are going along, and to write the fully-sorted data from.

You specify multiple SORTWKnn files to "spread the load" across different DASD, or to get the amount of space that you need, which might not be available conveniently on one DD statement.

Get hold of your SyncSort manual and have a read about the DDs that may be used. If you have queries, let us know.

Re: Sort & Merge

PostPosted: Wed Oct 03, 2012 12:50 am
by dick scherrer
Hello,

Whats the need for the second one?
You need to make sure you read all of the info posted in replies to your topic - and understand it. If you have a doubt, tell us what is not clear and somsone should be able to clarify.

When specifying SPACE, there is a primary and a secondary allocation parameter.
As i mentioned before . . .

Also, as mentioned before, you need to read and understand how new dasd dataseta are allocated. This is very basic and you will need to know this "forever". At least as long as you work with an IBM z/OS mainframe.

Re: Sort & Merge

PostPosted: Wed Oct 03, 2012 12:52 am
by enrico-sorichetti
The added thing is till now for all my queries am getting a solution here but for the last post which you had mentioned i got criticism not solution.

utter bullshit :evil:

what about posting Your JCl to see if there are <evident> errors in it?

the above sentence was a gentle request for You to post the jcl in error so that we could look at it

I do not see any criticism, just the willingness to see something to be able to help You
maybe time for You to get a better grasp of the english language.