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 Read two inputs and write into output... murali.andaluri DFSORT/ICETOOL 6 Wed Jul 26, 2017 7:35 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts Need to write record of PS File in ex... Chandan1993 JCL & VSAM 1 Wed Jun 07, 2017 1:35 am
No new posts getting three output files out of JOI... migusd SYNCSORT 7 Mon Jun 05, 2017 11:30 pm


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