IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search Log in to check your private messages Log in
 

Resource Not Available


 
IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sandip_datta

Active User


Joined: 02 Dec 2003
Posts: 151
Location: Tokyo, Japan

PostPosted: Tue Oct 26, 2010 4:21 pm
Reply with quote

We're writing some records in a file, closing it and then submitting a job from the program. The job is transferring the file using NDM. We are dynamically allocating the file in the program using SETENV. Now the NDM process is failing giving an error "Resource Not available".
Why it is happenning even though we're closing the file before file transfer?

Regards,
Sandip.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8568
Location: Dubuque, Iowa, USA

PostPosted: Tue Oct 26, 2010 6:06 pm
Reply with quote

Closing a file does not free the allocation of it.
Back to top
View user's profile Send private message
sandip_datta

Active User


Joined: 02 Dec 2003
Posts: 151
Location: Tokyo, Japan

PostPosted: Tue Oct 26, 2010 6:27 pm
Reply with quote

Thanks for the quick reply.
Then how we can FREE the dataset in the program when we are using SETENV?

I know a process to FREE the dataset using BPXWDYN. I tried to CALL BPXWDYN to ALLOC a DDNAME against the file and then tried to FREE the dataset. But during ALLOC, BPXWDYN gives Return-code = 2. Can SETENV and BPXWDYN be used simultaneously in the same program?

Regards,
Sandip.
Back to top
View user's profile Send private message
vitorperin

New User


Joined: 12 Jul 2012
Posts: 2
Location: Brazil

PostPosted: Wed Nov 27, 2013 10:33 pm
Reply with quote

hi,

i'm facing the same problem in my environment.

I have a cobol programa allocating several files dynamicly (using SETENV).

The thing is my cobol program never stops (It's a TASK). It calls an assembly program to stay in a 'stand by' status for some minutes, then it run again and start to allocate some other files. The cobol program runs 24/7.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Wed Nov 27, 2013 10:39 pm
Reply with quote

Hello and welcome to the forum,

Is there some reason this code cannot be submitted by the scheduler periodically (if it is not already running)? If the code was submitted and there was "nothing to do" this iteration, the code simply ends.

When the code executes, it would service whatever needed to be processed and end.

Writing custum "standby" code is usually Not a good thing to do. My clients will not permit people to write their own.
Back to top
View user's profile Send private message
vitorperin

New User


Joined: 12 Jul 2012
Posts: 2
Location: Brazil

PostPosted: Thu Nov 28, 2013 4:59 am
Reply with quote

thanks for the greetings!

so, the reason this can't be scheduled is this way it would use more mips than running around the clock (this is my client's words, not mine).

Anyway, is there a way to free the allocation?

I heard something about 'deallocate' but I'm still searching about it.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> All Other Mainframe Topics
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Forum Replies
No new posts UNIX System Services Resource Busy All Other Mainframe Topics 7
No new posts Finding IMS resource blocker after se... IMS DB/DC 1
No new posts Limit CICS CPU resource CICS 0
No new posts How to find a CICS resource used in C... CICS 8
No new posts Check special resource availability w... JCL & VSAM 8

Back to Top