bumbaermail
15th August 2008, 08:43
Hello,

I have the following queries.

1. I want to create text file to write some data in $HOME directory. I am using seq.open and seq.puts. But, how to place that file in the specified directory.

2. How to take 10 lines from the field ticom010.txta (Text).

Please help in urgent

Thanks
Bumba

JaapJD
15th August 2008, 09:33
1. use file.ptr = seq.open("${HOME}/myfile.txt", "at")
2. There are two method for this: 1) Write the text to a temporary file (with text.write function) and read the first 10 lines from that temporary file (with seq.gets); 2) allocate an array and use text.to.buf function and process the first 10 occurences of the array.

bumbaermail
15th August 2008, 11:24
Thanks a lot. I have another query. May u please tell me how to get the Login Name. I am trying to use get.bw.username, but it is not working and giving compilation error. I am using BaaNIVc4

JaapJD
15th August 2008, 11:25
Predefined variable: logname$