Page 1 of 1

(RPG) How to split a single download program in 2 programs?

Posted: Tue Jan 07, 2014 12:24 am
by LEBAS
I’ve built one RPG program to download 3 tables: Deptments (table 1), Sections (table 2) and Employes (table 3): it works fine.

But now, I want to separate the Deptment/Section download process from the Employes download process. So, I’ve created 2 programs and deleted inside the corresponding unneeded lines:
- The Deptment/Section download works well.
- The Employes download does not work: [NullPointerException] error.

Has somebody already encounters this error?

I’ve attached the 3 programs.

Yann

Re: (RPG) How to split a single download program in 2 progra

Posted: Tue Jan 07, 2014 9:05 am
by tsupartono
Support will investigate this.

Re: (RPG) How to split a single download program in 2 progra

Posted: Fri Jan 10, 2014 12:02 am
by LEBAS
To solve this, I need to use in my Employes download program:
LRNG_SetProperty( '/DB.Table%1' : 'Employes');
...
EZI_Offline_SendTableRow(
1 //Table number
: RowCountE
: 'EMPNO' : EMPNO
...

In each download program, you need to restart from 1 for table numbers. 'Table number' is not the internal number of the SQLite table: it is an internal number to the RPG program.

Thanks to Tony