In <[EMAIL PROTECTED]>, on
12/08/2005
   at 03:14 PM, Luo Johnny <[EMAIL PROTECTED]> said:

>1,In TSO,I use 'listalc status' to find that SYS1.UADS has been
>   allocated to DDNAME 'SYSUADS'. For a test, I issue
>   'allocate dsn(center.uads) dd(sysuads)' and get the meesage that
>   filename is in use. I resort to manuals and know that to do this
>   I must use 'REUSE' operand.
>   However,I submit a job via JCL which also uses DDNAME 'SYSUADS'
>   and there is no problem.

Put the same DD statement in your logon JCL and there will also not be
a problem. The problem is doing a TSO ALLOCATE with a ddname that is
already in use. Chage the batch job to do an ALLOCATE in the  same
context and you'll get the same error message.

>2,I have a simple cobol program who just opens  a input file and
>   closes it(select infile assign to infile). First I issue
>   'allocate dsn(md0006.input.qsam) dd(infile)' and succeed. Then I
>   can use TSO command 'call' to execute the program successfully.
>   However,when I execute the program via JCL  without coding infile
>   DDNAME, it fails.

Why would you expect otherwise?

>So I want to know the exact reason.

Your program referred to a ddname that you hadn't allocated.

>My personal guess is that a job submitted by JCL is not executed in
>my TSO address space.

That's the whole point of submitting a job; it's an independent unit
of work. If you want to call a program in your address space, use CALL
or something similar.

-- 
     Shmuel (Seymour J.) Metz, SysProg and JOAT
     ISO position; see <http://patriot.net/~shmuel/resume/brief.html> 
We don't care. We don't have to care, we're Congress.
(S877: The Shut up and Eat Your spam act of 2003)

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to