Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
No new posts FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm
No new posts Comparing 2 Files using Current time arunsoods SYNCSORT 9 Fri Sep 22, 2017 6:00 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts Join records from 2 files with No Dup... Poha Eater DFSORT/ICETOOL 22 Sun Aug 27, 2017 10:35 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us