View previous topic :: View next topic
|
Author |
Message |
ravi.bollineni
New User
Joined: 28 Jun 2006 Posts: 8
|
|
|
|
Hi,
For this I searched in the forum, found the code for writting o/p of the REXX program to a (PS)file. While using the same code with Stem variable, am getting the following error..
*************************************************************
DATA SET IND9437.BEST.REPORT NOT ALLOCATED, FILE IN USE
ENTRY (A) IND9437.BEST.REPORT DELETED
DATA SET IND9437.BEST.REPORT NOT IN CATALOG OR CATALOG CAN NOT BE ACCESSED
MISSING DATA SET NAME+
MISSING NAME OF DATA SET TO BE ALLOCATED
SYMBOLIC PARMS IN VALUE LIST IGNORED - Catalog Space(1,0) CYL DsOrg(PS) RecFm(F) LrecL(133) BlkSize(133)+
COMMAND PROCEDURE HAS NO PROC STMT
INVALID COMMAND NAME SYNTAX
The input or output file OUTPUT is not allocated. It cannot be opened for I/O.
EXECIO error while trying to GET or PUT a record.
FILE DDOUT NOT FREED, IS NOT ALLOCATED
***
*************************************************************
Following is my code:
queue out.
/* out. is a stem variable */
OUTDSNAME = STRIP(USERID())||".best.REPORT"
"Alloc F(OUTPUT)",
"Da('"outdsname"')",
"New Catalog ",
"Space(1,0) CYL DsOrg(PS) RecFm(F) LrecL(133) BlkSize(133)"
/* if the dataset is already allocated, delete and reallocate it*/
If RC <> 0 Then Do
"Delete ('"outdsname"')"
"Alloc F(OUTPUT)",
"Da('"outdsname"')",
"New Catalog ",
"Space(1,0) CYL DsOrg(PS) RecFm(F) LrecL(133) BlkSize(133)"
Rc = 0
End
/* write the queue in OUTPUT dataset */
"Execio" queued() " diskW OUTPUT(finis"
IF RC = 0 THEN
DO
SAY '-------------*****************--------------------'
SAY'OUTPUT DATASET NAME:' || OUTDSNAME
SAY '-------------*****************--------------------'
END;
"FREE F(DDOUT)"
EXIT
*************************************************************
Could you please help me out in this regard. If there is any sample code for writting a stem o/p of the REXX pgm to a Physical sequential file. Please send it to me.
Thanks,
Ravi. |
|
Back to top |
|
|
Hanfur
Active User
Joined: 21 Jun 2006 Posts: 104
|
|
|
|
If there is any sample code for writting a stem o/p of the REXX pgm to a Physical sequential file. Please send it to me.
Ravi,
Given below are two REXX codes.
First one directly writes the stem data to sequential file ASPPNA.IMTF.IN.FILE which is already existing..
---------------------------------------------------------------------------------
/*Allocating file */
"ALLOC DA('ASPPNA.IMTF.IN.FILE') FI(OUTPUT) SHR REUSE"
/*Putting data to stem */
MYSTEM.1 ='Ravis Data'
/*writng stem data to file */
"EXECIO 1 DISKW OUTPUT (FINIS STEM MYSTEM."
"FREE FI(OUTPUT)"
-----------------------------------------------------------------------------------
Now below REXX shows how you can create a new sequential file in to an already existing PDS AAAUTA.INNF.TD.DAFSPMW
MEMNAME='AAAUTA.INNF.TD.DAFSPMW(NEW1)'
/*This will create a new member MEM1 in the existing PDS 'AAAUTA.INNF.TD.DAFSPMW*/
"ALLOC DA('"MEMNAME"') F(DATAOUT) SHR REUSE"
/*putting a value to stem*/
JCLCONCAT.1='Ravis Data'
/*writing value to newly created seq file */
"EXECIO * DISKW DATAOUT(FINIS STEM JCLCONCAT."
"FREE FI(DATAOUT)"
-Han.
|
|
Back to top |
|
|
ravi.bollineni
New User
Joined: 28 Jun 2006 Posts: 8
|
|
|
|
Hi Hanfur,
Thank you so much. Ur code is working properly.
But the following is one more reason, what went wrong with my previous code.
In my previous code i have defined the Stem variable in the following way.
OUT. = ' ' ;
Due to the above declaration the mentioned abend occured. While writting the Stem variable to the Output dataset it is getting abended. And i have verified the contents in the Dataset, it is having what i was written in the Stem variable and additionally 4000 empty(space) lines are added at the end of the Dataset.
Now i have removed the above declaration and added ur code it is working fine. Once again Thank you very much.
Always Thanking You,
Ravi. |
|
Back to top |
|
|
Hanfur
Active User
Joined: 21 Jun 2006 Posts: 104
|
|
|
|
Hey...It's okey...
Its glad that your problem got solved...
-Han. |
|
Back to top |
|
|
|