Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Can I write o/p(stem) of the REXX pgm to a (PS) file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
ravi.bollineni

New User


Joined: 28 Jun 2006
Posts: 8

PostPosted: Fri Jul 28, 2006 11:35 am    Post subject: Can I write o/p(stem) of the REXX pgm to a (PS) file
Reply with quote

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
View user's profile Send private message

Hanfur

Active User


Joined: 21 Jun 2006
Posts: 104

PostPosted: Fri Jul 28, 2006 12:43 pm    Post subject: Hi
Reply with quote

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.

Quote:
Back to top
View user's profile Send private message
ravi.bollineni

New User


Joined: 28 Jun 2006
Posts: 8

PostPosted: Fri Aug 04, 2006 12:54 pm    Post subject: Re: Can I write o/p(stem) of the REXX pgm to a (PS) file
Reply with quote

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
View user's profile Send private message
Hanfur

Active User


Joined: 21 Jun 2006
Posts: 104

PostPosted: Fri Aug 04, 2006 9:36 pm    Post subject: Hi
Reply with quote

Hey...It's okey...

Its glad that your problem got solved...

-Han.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 1 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 3 Fri Mar 24, 2017 11:51 am
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us