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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Merge two VSAM KSDS files into third ... JCL & VSAM 6
Search our Forums:

Back to Top