I have a Rexx program that calls natural program within a loop for a round 500-600 times.
but for some reason the JCL stuck at call 300 and doesn't continue (the job is still active but the program is stuck).
i call the natural program using "ADDRESS ATTCHMVS "
Joined: 01 Sep 2006 Posts: 2205 Location: Silicon Valley
I just looked at the Rexx Reference manual; I do not think it is clear or perhaps my understanding is not clear about ATTACH...
but I think ATTACH and ATTCHMVS invoke the MVS ATTACH macro internally. It will create an asynchronous process that runs in parallel to your rexx program. There is a possibility that you spawned 600 parallel tasks and they did not complete before the 601st was attempted. The system probably ran out of some resource.
Try using LINKMVS instead of ATTCHMVS. This will create a synchronous call. Your 'natural program' will execute and complete before it continues to the next rexx instruction.