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
 

 

How can I write into files using LOCATE in PLI

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
View previous topic :: :: View next topic  
Author Message
shaswata

New User


Joined: 13 Sep 2005
Posts: 3

PostPosted: Mon Sep 11, 2006 5:52 pm    Post subject: How can I write into files using LOCATE in PLI
Reply with quote

How can I write into files using LOCATE in PLI
Back to top
View user's profile Send private message

karnatikalyan

New User


Joined: 08 Feb 2006
Posts: 5

PostPosted: Wed Sep 13, 2006 1:48 am    Post subject: Re: How can I write into files using LOCATE in PLI
Reply with quote

Hi,

The LOCATE statement can be used only with an OUTPUT SEQUENTIAL
BUFFERED file for locate mode processing. It allocates storage within an output buffer for a based variable and sets a pointer to the location of the next record.

Just check this as as example.

declare your record structure with storage based
DECLARE P POINTER;
DECLARE 1 INREC BASED(P),
2 DATA CHAR(80);

Decalre the file with OUTPUT SEQUENTIAL BUFFERED

P->DATA = 'ABCDEFGH';
LOCATE DATA FILE(FILENAME);
P->DATA = 'XYZDSDSD';
LOCATE DATA FILE(FILENAME);

Please check the above code.
Any suggestions are welcome.

Regards,
Karnati.
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 -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts Dynamic split of files under groups sril.krishy DFSORT/ICETOOL 4 Mon Apr 17, 2017 1:09 pm
No new posts Compare two files and subtract values ameetmund DFSORT/ICETOOL 7 Fri Mar 31, 2017 3:35 pm
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm


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