IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Regarding help needed in fine tuning the job step


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Apr 22, 2008 10:32 am
Reply with quote

Hello,

Yes, they are typically not needed for COPY and MERGE.

As the name suggests (SORTWKxx), they are typically work space used for the sort to massage the data to get from "un-sequenced" to the desired sequence.

COPY coes not care about a sequence and MERGE implies that the files to be merged are already in the required sequence.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Tue Apr 22, 2008 8:39 pm
Reply with quote

Quote:
Frank,

Are you saying that SORTWKdd is not required for COPY and MERGE?


Right - DFSORT does NOT use work data sets for COPY or MERGE, only for SORT. If you specify SORTWKdd DDs for COPY or MERGE, the system allocates the space, but DFSORT doesn't use the SORTWKdd datas sets, so the space is wasted. If you use dynamic allocation of work data sets instead of JCL SORTWKdd DDs (as recommended for DFSORT), DFSORT does not allocate any work space for COPY or MERGE, so space is not wasted.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Tue Apr 22, 2008 10:10 pm
Reply with quote

Hi,

Even SyncSort don't use any SORTWKdd files in MERGE, one of the LPARs at my shop uses SyncSort, used below JOB there for MERGE without SORTWKdd, it went fine..

Code:
//SORTIN1  DD  DSN=HLQ.FIRST.FILE,           
//             DISP=SHR                       
//SORTIN2  DD  DSN=HLQ.SECOND.FILE,           
//             DISP=SHR                       
//SORTOUT  DD  DSN=HLQ.MERGE.FILE,           
//             DISP=(NEW,CATLG,CATLG),       
//             DSORG=PS,                     
//             RECFM=FB,                     
//             LRECL=80,                     
//             BLKSIZE=0,                     
//             DATACLAS=LARGE,               
//             UNIT=SYSDA                     
//*SORTWK01 DD  UNIT=SYSDA,SPACE=(CYL,(20,5))
//SYSIN    DD  *                             
  MERGE FIELDS=(1,10,CH,A)                   
/*                                           


Mind you DD SORTWK01 is commented out.

I think, this conversation
Quote:
Please correct me if I am wrong. Alissa, wouldn't we need to specify work files for the merging done using the SORT utility ?
Quote:
Not if dynamic allocation is enabled (either by the DYNALOC installation option or the DYNALLOC runtime parameter).

might be because of fast fingers.

Hope this helps.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Wed Apr 23, 2008 4:33 am
Reply with quote

Hi Anuj,
your example doesn't conclusively indicate whether or not WORK files are used as DYNALOC could be enabled hence you don't need to specify SORTWK files.

I think we need Alissa to answer that or maybe the job output may show information on whether SORTWK files are used.

I'd be surprised if they are needed.

Gerry
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Wed Apr 23, 2008 5:16 am
Reply with quote

gcicchet wrote:
your example doesn't conclusively indicate whether or not WORK files are used as DYNALOC could be enabled hence you don't need to specify SORTWK files.
Not to be dis-respective, but COPY never needs works, in ANY sort.
Merge requirements are that all inputs be in the same sequence, merge would fail if there was an 'out of sequence' condition.
Trust this, MERGE and COPY do NOT need work space!
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Wed Apr 23, 2008 6:08 am
Reply with quote

Hi CICS Guy,
I'm not sure what you are really trying to say, maybe you should read the thread more carefully.

I was the one that asked the question regarding the WORK files

Quote:
Why do we need work files when MERGE is used, shouldn't the files be already sorted ?


So on that point we agree that work files are not required for MERGE/COPY function.


Then Frank asked the question
Quote:
Alissa,

Are you saying that Syncsort actually uses dynamic allocation for a MERGE? DFSORT doesn't so I'm surprised that Syncsort does.

I see people using //SORTWKdd DD files for COPY and MERGE quite often and I suggest they remove them to avoid wasting space, so I'd like to clear up the confusion here.

I didn't see you jump on Frank's regarding his comments.


Quote:
Think about it, look into the manuals(s), think, use your head and the knowledge that you could (if you bothered) get from all the information available in the Fine manuals......

The above is not worth commenting on, we are not all idiots.

Gerry
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 496
Location: USA

PostPosted: Thu Apr 24, 2008 8:30 pm
Reply with quote

SyncSort does not require SORTWORK datasets for a COPY or MERGE.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Fri Apr 25, 2008 4:09 am
Reply with quote

Hi,

Quote:
SyncSort does not require SORTWORK datasets for a COPY or MERGE.

Yes it was expected but what can be a good argumentive answer for this
Quote:
your example doesn't conclusively indicate whether or not WORK files are used as DYNALOC could be enabled hence you don't need to specify SORTWK files.
(here example in question is from my post)
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Apr 25, 2008 4:22 am
Reply with quote

Hello,

Quote:
Yes it was expected but what can be a good argumentive answer for this
I believe that none is needed. . .

I also believe that Alissa has provided all of the information that is/was needed for this topic.

Unless any of the current participants have an objection, i'll clean up the topic on Friday or over the weekend.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM Goto page 1, 2  Next

 


Similar Topics
Topic Forum Replies
No new posts Return codes-Normal & Abnormal te... JCL & VSAM 7
No new posts How to append a PS file into multiple... JCL & VSAM 3
No new posts Mainframe Programmer with CICS Skill... Mainframe Jobs 0
No new posts convert file from VB to FB and use tr... DFSORT/ICETOOL 8
No new posts Forcing a step to run (even if abended) JCL & VSAM 8
Search our Forums:

Back to Top