Yes,  because any time you run a batch job, whether or not you are running 
IKJEFT10 in the batch job or calling the COBOL program directly on the EXEC 
statement, you are in essence, starting with a blank slate, an empty address 
space.  Just like your TSO logon proc allocates datasets so you can run TSO 
interactively, you need to build the JCL for the batch job to allocate the 
"infile" DDNAME to run the second TSO environment in batch mode.  

I know the purists out there will jump on me for saying it is an empty address 
space because system libraries, etc, are already there <g>, but for the sake of 
your question you are running 2 completely different address 
spaces/environments and so anything you allocate in one of them to make it 
work, you will have to allocate in the other to make it work as well.  

HTH

Rex

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf Of Luo 
Johnny
Sent: Thursday, December 08, 2005 7:00 AM
To: [email protected]
Subject: Re: 'ALLOCATE' a data set in my TSO/E session


On 12/8/05, Terry Sambrooks <[EMAIL PROTECTED]> wrote:
>
>
>
> If a batch job is submitted with PGM=IKJEFT10, IKJEFT1B or any of the 
> valid variations then whatever happens inside, be in REXX, Assembler, 
> Cobol, PLI, will run in a TSO environment, but not the same 
> environment as that of the submitter. Remember that batch jobs run in 
> their own Address Spaces.


*Terry ,thanks for the reply.It really helps.*
**
*I konw utilities like IKJEFT10 can offer a TSO envrionment  in which we can 
execute TSO COMMAND.*
**
*Hoever,if my cobol program need a DDNAME 'infile' and I have allocated it in 
my TSO session,then when I execute the program via IKJEFT10,do I need to 
allocate it again?Because as you said,these two TSO environments are not the
same.*
**
**









--
Best Regards,
Johnny Luo

----------------------------------------------------------------------
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

----------------------------------------------------------------------
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