MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Dataset allocation not working for rexx pgm using IRXJCL

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
vjkumk
Beginner


Joined: 28 Sep 2005
Posts: 98
Topics: 33

PostPosted: Fri Apr 13, 2007 7:44 am    Post subject: Dataset allocation not working for rexx pgm using IRXJCL Reply with quote

Hi,

I execute my rexx program in batch using the irxjcl.My rexx program contains file allocation command as mentioned below

"ALLOC DA("MY.FILE") F(INDD) SHR REUSE"

1)In sysprint it is giving return code of minus 3 for this alloc command.I think this command is not recognized when the rexx program is executed in batch.Is there is any way to allocate dataset which will work fine when executed in batch,

2)also how to use more than one input or output file to the rexx program using IRXJCL


IRXJCL:
//IRXJ EXEC PGM =IRXJCL,PARM='MYREXXPGM'
//SYSEXEC DD DSN =MY REXX PGM LIB
//SYSPRINT DD DSN=*
//SYSTSIN DD DSN =INPUT FILE



cheers,
vj
Back to top
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Fri Apr 13, 2007 7:52 am    Post subject: Reply with quote

ALLOC is a TSO command - you cannot issue TSO commands under IRXJCL. Use IKJEFT01 instead.
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Fri Apr 13, 2007 7:53 am    Post subject: Reply with quote

If you use SYSTSPRT instead of SYSPRINT you MAY have obtained this info.
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
vjkumk
Beginner


Joined: 28 Sep 2005
Posts: 98
Topics: 33

PostPosted: Fri Apr 13, 2007 8:11 am    Post subject: Reply with quote

i used the IKJEFT01,it is working fine.thanks nic.

cheers,
vj
Back to top
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Fri Apr 13, 2007 8:18 am    Post subject: Reply with quote

I will have to retire - I got one right!
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
vjkumk
Beginner


Joined: 28 Sep 2005
Posts: 98
Topics: 33

PostPosted: Sat Apr 14, 2007 9:58 pm    Post subject: Reply with quote

Hi,

I have stuck with one more issue.In systsin ,the systsin dataset is of record length 80 char and it contains only one record which is the file name.I have to allocate the file in the rexx pgm.when this filename is assigned to a variable and given to the alloc function ,a upper quote is added automatically and it says invalid filename at sysprint,when this is executed in batch(this problem occurs only in batch).But,when file name is given directly,it works fine in batch and foreground.

"EXECIO 1 DISKR SYSTSIN(STEM FNAME."
MYFILE = strip(FNAME.1 )
SAY MYFILE--->this one correctly prints the file name without any upper quotes.
/*MYFILE = ''P001.TEST.DATASET' */ ---WHEN I GIVE LIKE THIS IT WORKS FINE IN FOREGROUND.
"ALLOC DA('"MYFILE"') F(INDD) SHR REUSE" ---Problematic statement,when the file is retrieved through the systsin,it is prefixed with upper quotes and this shows at sysprint/sysprt,but the above say coomand(myfile) shows file name without upper quotes prefixed.

/*"ALLOC DA('P001.TEST.DATASET') F (INDD) SHR REUSE"*/---THIS WORKS FINE in foreground and batch.since file name is given directly.

cheers,
vj
Back to top
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Sat Apr 14, 2007 10:28 pm    Post subject: Reply with quote

Read up on TSO naming conventions, particularly the use of the TSO Prefix and using quotes in data set names. See the PROFILE command (PREFIX,NOPREFIX) also.

The short answer is make sure your data set name is fully qualified and quoted in the command that executes. That way it will work with or without a TSO prefix. Your TSO session is running with a prefix, your batch session is not.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group