View previous topic :: View next topic
|
Author |
Message |
Nileshkul
New User
Joined: 09 May 2016 Posts: 43 Location: India
|
|
|
|
Hi All,
Need some help with NDM/DMBATCH utility in mainframe, apologies if I missed any earlier post for similar issues.
I have a mainframe file which is getting transferred to Windows folder using NDM/DMBATCH in JCL and then getting deleted after transfer in same JCL. MAXDELAY is set to Zero.
Then when I use IDCAM utility to delete that dataset in same JCL after DMBATCH - DMBATCH/Transfer works fine but when I use IEFBR14 or file-manager utility (in batch) to delete the file, the DMBATCH/transfer gets stuck for one hour or so and then fails with timeout.
Not sure what is the issue, any help in this regard would be very helpful.
Thanks - Nilesh |
|
Back to top |
|
 |
Willy Jensen
Active Member

Joined: 01 Sep 2015 Posts: 743 Location: Denmark
|
|
|
|
Could we see the JCL from the failed job, please. |
|
Back to top |
|
 |
dneufarth
Active User

Joined: 27 Apr 2005 Posts: 420 Location: Inside the SPEW (Southwest Ohio, USA)
|
|
|
|
Does batch wait for data movement or just queue the request and move on? |
|
Back to top |
|
 |
Nileshkul
New User
Joined: 09 May 2016 Posts: 43 Location: India
|
|
|
|
The NDM is getting stuck in NDM/DMBATCH step and do not move further in JCL since I have coded MAXDELAY=Zero. As I understand MAXDELAY=Zero will wait until transfer successful. Some expert told me that IEFBR14/File-manager is holding the file for deletion even if it is coded in step after transfer/DMBATCH step in JCL and that's why NDM getting stuck. IDCAMS do not put such hold so IDCAMS works. Not sure if this is the issue. Any help would be great. |
|
Back to top |
|
 |
dneufarth
Active User

Joined: 27 Apr 2005 Posts: 420 Location: Inside the SPEW (Southwest Ohio, USA)
|
|
|
|
Show the JCL as previously requested.
Does IDCAMS use DD stmts for allocation of to be deleted dataset or is it specified in the IDCAMS stmts?
Don’t have experience with NDM; just exploring basics. |
|
Back to top |
|
 |
Nileshkul
New User
Joined: 09 May 2016 Posts: 43 Location: India
|
|
|
|
Thanks for all replies, it helps.
Here is JCL layout:
Step1 - NDM the file DSN1 with MAXDELAY=0 using DMBATCH
Step2 - IDCAMS using SYSIN (SYSIN has statement like DELETE DSN1) -This is working fine
Below options are not working:
Or Step2: IEFBR14 using (Mod, Delete) - to delete dataset DSN1
Or Step2: File-Manager using (Mod, delete) in input DSN statement - the output is copy/backup to DSN2 (sysin has copy options specific to file manager, no dataset names) |
|
Back to top |
|
 |
dneufarth
Active User

Joined: 27 Apr 2005 Posts: 420 Location: Inside the SPEW (Southwest Ohio, USA)
|
|
|
|
Perhaps using IDCAMS with DD names might cause something similar to IEFBR14 results. May confirm the ‘expert’ advice given to you.
Unfortunately, that’s all I can offer. Hopefully someone else will provide insight. |
|
Back to top |
|
 |
Nileshkul
New User
Joined: 09 May 2016 Posts: 43 Location: India
|
|
|
|
Thanks for replies.
Just to add - is there any way that I can delete file using file manager SYSIN - I also thought to try that out since IDCAMS with SYSIN working (apologies if wrong forum, but query is in flow of topic hence asked).
Thanks again. |
|
Back to top |
|
 |
vasanthz
Global Moderator

Joined: 28 Aug 2007 Posts: 1745 Location: Tirupur, India
|
|
|
|
Here is my hypothesis,
I think the problem could be in the MAXDELAY parameter, have you tried MAXDELAY=UNLIMITED?
you said that IDCAMS DELETE command works but IEFBR14 does not work.
I think with MAXDELAY=0 the NDM process establishes connection and immediately moves to next delete step before the transfer is complete.
In this case IDCAMS waits for the contention with NDM transfer to clear, but IEFBR14 immediately deletes the file and causes the transfer to get stuck.
In the below excerpt, MAXDELAY=UNLIMITED says that it waits for the process to complete.
MAXDELAY =[UNLIMITED | QUEUED | hh:mm:ss | 0]
indicates that the submit command waits until the submitted Process completes
execution or the specified time interval expires. This parameter is optional. Do not use
MAXDELAY for a submit within a Process—use only in SUBMIT commands.
UNLIMITED specifies that the submit command waits until the Process completes
execution. This is the default when no parameters are specified.
QUEUED specifies that the submit command waits until the Process completes or 30
minutes, whichever occurs first.
hh:mm:ss specifies that the submit command waits for an interval no longer than the
specified hours, minutes, and seconds or until the Process completes, whichever occurs
first.
0 specifies that the submit command attempts to start a session for the submitted
Process to execute on immediately. If Sterling Connect:Direct cannot establish a
session, after all retries are exhausted, the Process is flushed and the submit command
fails with the error SVTM118I RC=52(x'34').[/quote] |
|
Back to top |
|
 |
Nileshkul
New User
Joined: 09 May 2016 Posts: 43 Location: India
|
|
|
|
Thanks all for replies.
I tried MAXDELAY=UNLIMITED but still it is not working. Not sure what can be an issue. I also tried MAXDELAY=HH:MM:SS - not working. I also tried IDCAMS with delete via DD names (Mod,Delete) - not working.
Only thing that works in IDCAMS sysin delete (I can not use IDCAMS sysin delete because it fails when file is open concurrently by user where as other options like IEFBR14 waits for dataset to handle contention). so Please suggest if there is anyway to delete files using file manager SYSIN in JCL.
Also if there is any other suggestion, please do share.
Thanks - Nilesh |
|
Back to top |
|
 |
dneufarth
Active User

Joined: 27 Apr 2005 Posts: 420 Location: Inside the SPEW (Southwest Ohio, USA)
|
|
|
|
Perhaps two jobs - one sends data while other, dependent upon first job being successful, purges dataset. Use a scheduler or a serial (unique job class) initiator. Worth testing though I'm not confident as to its success. |
|
Back to top |
|
 |
Rohit Umarjikar
Global Moderator

Joined: 21 Sep 2010 Posts: 3077 Location: NYC,USA
|
|
|
|
Can you explore further and add Run TASK statements to check transfer status and set RC accordingly and use that in subsequent step for delete when only it’s successful? |
|
Back to top |
|
 |
Nileshkul
New User
Joined: 09 May 2016 Posts: 43 Location: India
|
|
|
|
Thanks all for all replies. It really helps and apologies for delayed response.
About using PROC statement in DMBATCH PROCESS - not tried yet - I think the issue is job is getting stuck with NDM/copy step so I doubt if PROC/RUNTASK in instream stmt will also keep waiting since it will be after COPY step which is stuck in SUBMIT process instream?. Any details around this would help.
Another option is using TEMP dataset in DMBATCH but I doubt if DMBATCH Sysin allow temp datasets, any details on this would help too.
Many Thanks - Nilesh |
|
Back to top |
|
 |
Rohit Umarjikar
Global Moderator

Joined: 21 Sep 2010 Posts: 3077 Location: NYC,USA
|
|
|
|
Nileshkul wrote: |
Thanks all for all replies. It really helps and apologies for delayed response.
About using PROC statement in DMBATCH PROCESS - not tried yet - I think the issue is job is getting stuck with NDM/copy step so I doubt if PROC/RUNTASK in instream stmt will also keep waiting since it will be after COPY step which is stuck in SUBMIT process instream?. Any details around this would help.
Another option is using TEMP dataset in DMBATCH but I doubt if DMBATCH Sysin allow temp datasets, any details on this would help too.
Many Thanks - Nilesh |
Please try it.
www.ibm.com/support/pages/how-use-dgadwait-process |
|
Back to top |
|
 |
|