Looking for q_writeFile q_readFile q_fileExists examples

Please do not use to report errors- use your regional help desk.
Please mark posts as being for RPG or RDMLX (LANSA) developer.
To subscribe by email, display this forum, scroll to the end and select ‘Subscribe Forum’.
Post Reply
MarcusLancaster
Posts: 47
Joined: Wed Nov 06, 2013 1:28 am

Looking for q_writeFile q_readFile q_fileExists examples

Post by MarcusLancaster » Wed Oct 30, 2019 10:14 pm

Hi all.

Just wondered if there was any additional documentation / examples showing the use of the q_writeFile, q_readFile etc ECL utilities out there in the community. The doco shows example code, but doesn't give any detail about context, restrictions/limitations etc etc. For example its not clear if this feature is designed to write/read locally on the client (my initial assumption) or instead against the backend server (which is equally possible I guess). Should it work on both Android and iOS?

I've tried building an test app (using q_writeFile) and although it appears to run with no errors I can't see any resultant file, on either client or server...

If anybody has any additional info or examples... that would be brilliant.

Cheers for now.

Marcus.

MarcusLancaster
Posts: 47
Joined: Wed Nov 06, 2013 1:28 am

Re: Looking for q_writeFile q_readFile q_fileExists examples

Post by MarcusLancaster » Wed Nov 06, 2019 10:24 pm

Hi all.

Just wanted to update you re this post. There are examples re the use of these features in the standard set of shipped examples. Download the server update package from here https://www.longrangemobile.com/upgrade.htm and then unzip locally to find the resources. The specific resource file which contains code examples for the q_writeFile, q_readFile etc etc script is LRECL_LocalFile.js - have a look in there and you can see how these utilities are used.

I built a quick test script where I was able to create a local text file on one button press, which I could then read back on another button press.

Anyway - hope that's useful.

Cheers all.

Marcus.

Post Reply