IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How can I write into files using LOCATE in PLI


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
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
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
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 All times are GMT + 6 Hours
Forum Index -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts INPFIL FILES, FNAMES examples SYNCSORT 5
No new posts FileAid move data from two files to o... Compuware & Other Tools 5
No new posts Identify and write records containing... SYNCSORT 11
No new posts JCL to merge two files side by side DFSORT/ICETOOL 3
No new posts Write record twice based on condition... SYNCSORT 7
Search our Forums:


Back to Top