sort:count



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

Re: sort:count

Postby dick scherrer » Tue Mar 19, 2013 10:23 pm

Hello,

Why do you believe your code goes into an infinite loop?

I suspect it more likely that there is a Reply of some kind outstanding that has not been satisfied.
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:count

Postby BillyBoyo » Wed Mar 20, 2013 6:30 am

Is your input PDS(E) the same as your output PDS(E). If so, I'd not do that.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: sort:count

Postby steve-myers » Wed Mar 20, 2013 8:36 am

Actually, that's perfectly safe; a PDS can have an unlimited number of readers, but just one writer. SORTIN is a reader, only SORTOUT is a writer. Not only that, the DISP=(NEW on the SORTOUT DD statement ensures Pearl's job has exclusive control of the data set for the life of the job.

I sort of agree with Mr. Scherrer; something else is going on here, and based on Pearl's obvious lack of experience based on previous posts here, I would not trust his initial diagnosis.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Re: sort:count

Postby pearl » Wed Mar 20, 2013 10:22 pm

enrico-sorichetti wrote:
thankx alot...your code is working. but, i am yet to find the error in mine.


should not be that difficult... did You read my comment about the EXTRA comma ???


Yes. I had removed the comma but got the same error.
pearl
 
Posts: 21
Joined: Fri Mar 15, 2013 12:55 pm
Has thanked: 0 time
Been thanked: 0 time

Re: sort:count

Postby pearl » Wed Mar 20, 2013 10:23 pm

BillyBoyo wrote:Is your input PDS(E) the same as your output PDS(E). If so, I'd not do that.


Yes. Is it wrong to do so?
pearl
 
Posts: 21
Joined: Fri Mar 15, 2013 12:55 pm
Has thanked: 0 time
Been thanked: 0 time

Re: sort:count

Postby steve-myers » Thu Mar 21, 2013 7:18 am

pearl wrote:[... Yes. Is it wrong to do so?
Actually, yes. You specify DISP=(NEW,CATLG) on your SORTOUT DD statement. What happens depends on whether the output data set is SMS managed or not.

If the output data set is SMS managed, the system will want to catalog the data set immediately. It can't do this because it has the same name as another data set, so the allocation will be aborted and the step won't run.

Now if the data set is not SMS managed, the data set will be allocated but not cataloged - yet - and the step will run. When the step completes, the system will attempt to catalog the data set. It can't because the name already exists in the catalog. The system will leave the uncataloged data set where it is, write a diagnostic message and continue.

Which action is the "best" action is debatable. The not SMS approach permits the step to run, but you have this uncataloged data set that must be manually corrected. Sadly, the need to correct the situation is frequently not done. The SMS approach does not leave an orphaned data set behind, but the job must be corrected before it can be run. Your call, not mine.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Previous

Return to JCL

 


  • Related topics
    Replies
    Views
    Last post