lsatenstein
11th September 2002, 02:07
The original request was to modify the settings in a job step without deleting the step and reinserting it with updated values.

I was given a solution to this problem that was quite specific by Gary who gave me some ideas. I needed to generalize his solution.

The approach I took was to parse the input into three tables.
I build a parser to take the existing job data and used it to build three tables (length of data, variable name, and string representation of data).

I then encorporated the form from the session pertaining to the job by referring to it in the session setup (form area), and I added the form externals to the code containing the parse tables. These externals also matched the parsed tables. The session opened the form, changes were accepted, and then applied to the appropriate entries in the parse table.

The moving of parse data to initialize the form, and from the form back to the parse tables was pretty straight forward. I did not use any data dictionary functions (such as rdi.*) to try to automate some of this logic.

I have another function that takes the parse tables and creates the string to use to rewrite the ttaad503 table rows.

The code is available on demand. Any buglets you find or any enhancements would be appreciated.

There is no editing of data for range checking. It assumes that not too many fields on the form would be revised (typically, invoice ranges), and that the human would be careful.

Anyway, I am writing this from the office. I could not find my email from the kind gentleman who discussed and forwarded his solution to me.

~Vamsi
11th September 2002, 02:33
Leslie,

Please consider posting the solution in the Code & Utilities forum.

lsatenstein
13th September 2002, 18:29
As requested.

Moved attached file to the Code and Utilities Forum (http://www.baanboard.com/baanboard/showthread.php?s=&threadid=6695)

mark_h
13th September 2002, 19:37
Leslie

Thanks for the code. I moved this to the code and utilities forum. I added a copyright and disclaimer into the code.

Thanks for your contribution.

Mark

RajeshN
25th June 2003, 07:04
Hi

We were trying to develop a generic program to update "ttaad503".
The script developed by Leslie was pretty helpful.
We are encountering a problem with dates.
In Baan5 sessions the utc date as well as the older date formats(from Baan IV ) are present.
This causes a problem during runtime as we are unable to classify the date types of the fields and updating the BaanIV date formats with UTC dates naturally gives erroneous results.
Is there any way to do this generically.
Appreciate any help.

Thanx..

nick_rogers
25th June 2003, 17:44
I have changed the job input values direcly through GTM, thus avoiding the overhead.

NPRao
26th June 2003, 00:29
Rajesh,

I faced similar problem and I have not yet found a solution. :(
For the time being we do not use my tool for migration jobs which have
UTC fields and we set them up manually when its on our production system.
My tool works as long as its on the same system and different environments
(Development & QA).

Refer to the link -

Change session settings in job (http://www.baanboard.com/baanboard/showthread.php?s=&threadid=9836&
highlight=job)

The main issue is with the way BaaN stores the date/time difference in
the UTC fields.

When you do not save the time difference, you can see the contents of
the export files as-

2003-06-25 17:05:30.660
#$!pre-dump!$#00017cv
NP|1|0|013cpac:="zm"015vers:="B52U"013rele:="a "015cust:="mlgd"019cmod(1,1):="adm"019cmod(1,2):=" "019cmod(1,3):="
"019cmod(1,4):=" "019cmod(1,5):=" "019cmod(1,6):=" "019cmod(1,7):="
"019cmod(1,8|
NP|1|1|):=" "019cmod(1,9):=" "020cmod(1,10):=" "018label.only:="0"018label.only:="0"019date.f:="731281"014time.f:="0"019
date.t:="731312"014time.t:="0"014clan.f:="2"014clan.t:="2"042path.dumps:=
"/app/co|NP|1|2|mmon/home/bsp"|

When you save the time difference-

2003-06-25 17:10:29.553
#$!pre-dump!$#00017cv
NP|1|0|013cpac:="zm"015vers:="B52U"013rele:="a "015cust:="mlgd"019cmod(1,1):="adm"019cmod(1,2):=" "019cmod(1,3):="
"019cmod(1,4):=" "019cmod(1,5):=" "019cmod(1,6):=" "019cmod(1,7):="
"019cmod(1,8|NP|1|1|):=" "019cmod(1,9):=" "020cmod(1,10):="
"018label.only:="0"018label.only:="0"022
date.f:=date()+-110014time.f:="0"021date.t:=date()+-79014time.t:="0"014
clan.f:="2"014clan.t:="2"042path.dumps:="/a|NP|1|2|pp/common/home/bsp"|