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

NDM getting stuck - mainframe/JCL


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

New User


Joined: 09 May 2016
Posts: 43
Location: India

PostPosted: Fri Dec 16, 2022 12:12 am
Reply with quote

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
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 712
Location: Denmark

PostPosted: Fri Dec 16, 2022 1:29 am
Reply with quote

Could we see the JCL from the failed job, please.
Back to top
View user's profile Send private message
dneufarth

Active User


Joined: 27 Apr 2005
Posts: 420
Location: Inside the SPEW (Southwest Ohio, USA)

PostPosted: Fri Dec 16, 2022 2:26 am
Reply with quote

Does batch wait for data movement or just queue the request and move on?
Back to top
View user's profile Send private message
Nileshkul

New User


Joined: 09 May 2016
Posts: 43
Location: India

PostPosted: Fri Dec 16, 2022 5:38 pm
Reply with quote

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
View user's profile Send private message
dneufarth

Active User


Joined: 27 Apr 2005
Posts: 420
Location: Inside the SPEW (Southwest Ohio, USA)

PostPosted: Sat Dec 17, 2022 12:20 am
Reply with quote

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
View user's profile Send private message
Nileshkul

New User


Joined: 09 May 2016
Posts: 43
Location: India

PostPosted: Sat Dec 17, 2022 1:01 am
Reply with quote

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
View user's profile Send private message
dneufarth

Active User


Joined: 27 Apr 2005
Posts: 420
Location: Inside the SPEW (Southwest Ohio, USA)

PostPosted: Sat Dec 17, 2022 1:50 am
Reply with quote

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
View user's profile Send private message
Nileshkul

New User


Joined: 09 May 2016
Posts: 43
Location: India

PostPosted: Sat Dec 17, 2022 4:08 am
Reply with quote

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
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Tue Dec 20, 2022 2:51 pm
Reply with quote

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
View user's profile Send private message
Nileshkul

New User


Joined: 09 May 2016
Posts: 43
Location: India

PostPosted: Sat Dec 24, 2022 1:43 am
Reply with quote

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
View user's profile Send private message
dneufarth

Active User


Joined: 27 Apr 2005
Posts: 420
Location: Inside the SPEW (Southwest Ohio, USA)

PostPosted: Sat Dec 24, 2022 1:54 am
Reply with quote

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
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3053
Location: NYC,USA

PostPosted: Sat Dec 24, 2022 12:18 pm
Reply with quote

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
View user's profile Send private message
Nileshkul

New User


Joined: 09 May 2016
Posts: 43
Location: India

PostPosted: Fri Dec 30, 2022 1:04 am
Reply with quote

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
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3053
Location: NYC,USA

PostPosted: Fri Dec 30, 2022 10:29 pm
Reply with quote

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
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 -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Mainframe openings in Techmahnidra fo... Mainframe Jobs 0
No new posts Mainframe Programmer with CICS Skill... Mainframe Jobs 0
No new posts How to Reformat a file using File Man... All Other Mainframe Topics 14
No new posts Newbie Stuck on "Duplicate Datas... TSO/ISPF 5
Search our Forums:

Back to Top