I thought I'd like to use the 'template' facility (LRNG_SendTemplate) today with a form I'm creating, but all my form content is created dynamically, and I don't use any display files. Is there a way to send a template to the mobile device without using EXFMT (or WRITE/READ)?
I tried creating a form dynamically, giving it the name of the 'template', then doing a 'LRNG_SendTemplate' with that name, and the program didn't choke doing this, but later when I tried to set the 'class' property to my 'template' name, the program croaked because the template didn't exist.
I also tried putting the LRNG_SendTemplate between LRNG_Send and LRNG_Receive, and I tried doing an LRNG_SendReceive after the LRNG_SendTemplate. No luck.
TIA.
JJ
(RPG) Is there a way to send a 'template' without using DDS?
-
JohnJoiner
- Posts: 37
- Joined: Fri Oct 19, 2012 8:48 am
-
MarkDuignan
- Posts: 346
- Joined: Wed Apr 18, 2012 10:33 am
Re: (RPG) Is there a way to send a 'template' without using
You can avoid the EXFMT and DDS by using LRNG_SendReceive
http://www.longrangemobile.com/docs/LRP ... eceive.htm
There’s an example (No Display file, no DDS) in Use Case Examples – source in LRNG_DEMO/SOURCEEXAM member EXAM0082.
Note: The API just does a dummy ‘empty’ EXFMT for you under the covers. You can mix using this with using DDS and EXFMT within the same program.
Visually you can also often do what templates do using a table of forms - Table of Forms 1 and 2 in Advanced Examples demonstrate this.
However - I’m not sure I have answered the question you asked?
http://www.longrangemobile.com/docs/LRP ... eceive.htm
There’s an example (No Display file, no DDS) in Use Case Examples – source in LRNG_DEMO/SOURCEEXAM member EXAM0082.
Note: The API just does a dummy ‘empty’ EXFMT for you under the covers. You can mix using this with using DDS and EXFMT within the same program.
Visually you can also often do what templates do using a table of forms - Table of Forms 1 and 2 in Advanced Examples demonstrate this.
However - I’m not sure I have answered the question you asked?
-
JohnJoiner
- Posts: 37
- Joined: Fri Oct 19, 2012 8:48 am
Re: (RPG) Is there a way to send a 'template' without using
Mark,
Thanks, but in order to use the EXFMT opcode in RPG I've actually got to have a display file defined, which means I've got to have DDS, even if it's just an empty record. That's what I'm trying to avoid.
I've gone the route of just using a table of forms anyway, so it's cool. Just thought I'd ask.
JJ
Thanks, but in order to use the EXFMT opcode in RPG I've actually got to have a display file defined, which means I've got to have DDS, even if it's just an empty record. That's what I'm trying to avoid.
I've gone the route of just using a table of forms anyway, so it's cool. Just thought I'd ask.
JJ
-
MarkDuignan
- Posts: 346
- Joined: Wed Apr 18, 2012 10:33 am