View previous topic :: View next topic |
Author |
Message |
vjkumk Beginner
Joined: 28 Sep 2005 Posts: 98 Topics: 33
|
Posted: Fri Apr 13, 2007 7:44 am Post subject: Dataset allocation not working for rexx pgm using IRXJCL |
|
|
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 |
|
|
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Fri Apr 13, 2007 7:52 am Post subject: |
|
|
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 |
|
|
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Fri Apr 13, 2007 7:53 am Post subject: |
|
|
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 |
|
|
vjkumk Beginner
Joined: 28 Sep 2005 Posts: 98 Topics: 33
|
Posted: Fri Apr 13, 2007 8:11 am Post subject: |
|
|
i used the IKJEFT01,it is working fine.thanks nic.
cheers,
vj |
|
Back to top |
|
|
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Fri Apr 13, 2007 8:18 am Post subject: |
|
|
I will have to retire - I got one right! _________________ Utility and Program control cards are NOT, repeat NOT, JCL. |
|
Back to top |
|
|
vjkumk Beginner
Joined: 28 Sep 2005 Posts: 98 Topics: 33
|
Posted: Sat Apr 14, 2007 9:58 pm Post subject: |
|
|
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 |
|
|
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Sat Apr 14, 2007 10:28 pm Post subject: |
|
|
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 |
|
|
|
|