Sort & Merge



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Sort & Merge

Postby gowthamgyaa » Tue Oct 02, 2012 10:44 pm

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
gowthamgyaa
 
Posts: 101
Joined: Wed Sep 05, 2012 11:18 pm
Has thanked: 67 times
Been thanked: 0 time

Re: Sort & Merge

Postby enrico-sorichetti » Tue Oct 02, 2012 10:59 pm

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
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: Sort & Merge

Postby dick scherrer » Tue Oct 02, 2012 11:43 pm

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.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Sort & Merge

Postby gowthamgyaa » Tue Oct 02, 2012 11:48 pm

@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
gowthamgyaa
 
Posts: 101
Joined: Wed Sep 05, 2012 11:18 pm
Has thanked: 67 times
Been thanked: 0 time

Re: Sort & Merge

Postby gowthamgyaa » Tue Oct 02, 2012 11:51 pm

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
gowthamgyaa
 
Posts: 101
Joined: Wed Sep 05, 2012 11:18 pm
Has thanked: 67 times
Been thanked: 0 time

Re: Sort & Merge

Postby BillyBoyo » Wed Oct 03, 2012 12:35 am

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.

These users thanked the author BillyBoyo for the post:
gowthamgyaa (Wed Oct 03, 2012 1:28 pm)
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Sort & Merge

Postby dick scherrer » Wed Oct 03, 2012 12:50 am

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.
Hope this helps,
d.sch.

These users thanked the author dick scherrer for the post:
gowthamgyaa (Wed Oct 03, 2012 1:28 pm)
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Sort & Merge

Postby enrico-sorichetti » Wed Oct 03, 2012 12:52 am

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.
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort

These users thanked the author enrico-sorichetti for the post:
gowthamgyaa (Wed Oct 03, 2012 1:28 pm)
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post