‎2007 Feb 14 3:53 PM
I need to IMPORT the date and time stamp from last run and IMPORT the the date and time stamp from the current run every time a program is executed. I am using the following command. The time stamp is not gettign transferred.
tables: indx.
DATA:last_run(14), cur_run(14).
last_run = '20070123064526'.
IMPORT last_run FROM DATABASE indx(dt) ID 'S_INNAME'.
cur_run = '20070214100123'.
EXPORT cur_run TO DATABASE indx(dt) ID 'S_INNAME'
‎2007 Feb 14 4:54 PM
Hi,
I tried your code..It works fine for me..
TABLES: indx.
DATA:last_run(14), cur_run(14).
last_run = '20070214100123'.
EXPORT last_run TO DATABASE indx(dt) ID 'S_INNAME'.
CLEAR last_run.
IMPORT last_run FROM DATABASE indx(dt) ID 'S_INNAME'.
WRITE: / last_run.
Thanks,
Naren
‎2007 Feb 14 3:58 PM
Hi!
There is a better option to store the last run of a program - create an own Z-table in SE11, for example: ZPROGRAMRUN.
Insert some fields, like PROGRAMNAME, LAST_RUN, USER.
And in your program you have to write the coding for writing and reading data.
I think this way is much more easier to trace.
Regards
Tamá
‎2007 Feb 14 4:20 PM
Syed,
Depending on your application purpose, the solution Tamás showed would be a better resolution to your problem. To create a table where you store the programs last run.
‎2007 Feb 14 4:23 PM
Hi,
You have to use the same variable name..For both IMPORT and EXPORT.
tables: indx.
DATA:last_run(14), cur_run(14).
last_run = '20070123064526'.
IMPORT last_run FROM DATABASE indx(dt) ID 'S_INNAME'.
<b>last_run</b> = '20070214100123'.
EXPORT <b>last_run</b> TO DATABASE indx(dt) ID 'S_INNAME'
Thanks,
Naren
‎2007 Feb 14 4:52 PM
Hi Naren,
I changed the variable to be the same name. Still it does not work.
‎2007 Feb 14 4:54 PM
Hi,
I tried your code..It works fine for me..
TABLES: indx.
DATA:last_run(14), cur_run(14).
last_run = '20070214100123'.
EXPORT last_run TO DATABASE indx(dt) ID 'S_INNAME'.
CLEAR last_run.
IMPORT last_run FROM DATABASE indx(dt) ID 'S_INNAME'.
WRITE: / last_run.
Thanks,
Naren