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 

Writing to a file in PLI

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
vikramdr
Beginner


Joined: 15 Feb 2003
Posts: 15
Topics: 11

PostPosted: Wed May 07, 2003 10:16 am    Post subject: Writing to a file in PLI Reply with quote

Hi,

I have to write a PLI program which writes records to a sequential file. The DD name in JCL is REPORT1.

So the declaration in PLI program is
DCL REPORT1 FILE OUTPUT STREAM

and the statement which writes the record to the file is
PUT FILE (REPORT1) EDIT (DEC)(COL(POSITION),F(15,2)) ;

I want to know in the above PUT FILE statement, can the REPORT1 name be populated/passed throuh a variable ?

Thanks and regards,
Vikram.
_________________
Vikram
Back to top
View user's profile Send private message
vattikonda
Beginner


Joined: 09 Jan 2003
Posts: 15
Topics: 5

PostPosted: Sat May 10, 2003 7:29 pm    Post subject: Reply with quote

You can use the below statement to write to REPORT1 file from Data record WRK_RECORD.
WRITE FILE(REPORT1) FROM (WRK_RECORD);

Good luck
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming 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