Baanboard.com

Go Back   Baanboard.com > Forum > Baan SIGs > AFS/DDC/OLE: Function servers

User login

Frontpage Sponsor

Main

Poll
For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
35%
Installation Wizard into new VRC
42%
Manual into existing VRC
3%
Manual into new VRC
19%
Total votes: 31

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 7th April 2005, 06:13
Ruskin's Avatar
Ruskin Ruskin is offline
Unconfirmed User
 
Join Date: Feb 2002
Location: New Zealand
Posts: 91
Ruskin is on a distinguished road
Baan: All - DB: MS-SQL, Informix, Oracle - OS: UNIX and NT Server
Use AFS to create a patch file.

We are having a bit of fun, trying to use AFS to create a patch file. The manual process, is;
a) We have all software components attached to a customisation project part.
b) We create a patch (session ttiex4500m000/ttiex4100m000)
c) We copy the software components to the patch components (ttiex1176m000/ttiex4210m000)
d) We export the patch (ttiex4500m000/ttiex4110m000/ttiex1280s000)

This works perfectly. But when we try to do this through AFS, the export part does not work. We can do steps a, b and c, but not step d. We can activate ttiex4500m000, find the correct patch, select it and activate ttiex4110m000. But then, when we try to use the export from ttiex4110m000. Nothing happens. The function we are calling, is 'exec.cont.process' (as shown in the ttadv316 table). There is no question to answer (in the case of the patch file already existing, question ttiex41101 is shown, but this is only shown if ttiex400.crea is set to YES, which in our case, will always be NO). Thus, the only issue, could be the report. We can not set the device for the report, as the session is not open yet (the report is attached to ttiex1280s000). We can not open the session then set the report, as the process fires straight away, when the session is open.

To work around this, we have created a library that simply 'zooms.to' ttiex1280s000. However, this session now returns an error of 'Order line not found'. In order to activate ttiex1280s000, we must first create a component list. Which we can do, by calling the function 'create.deliver.file' and passing the patch code. This function then returns the file name created (it is located in the ttdlldeliver tools object). So we have our file list with the components of the patch, and the filename. As per the bic_info6.2, this file is now correctly formatted for session ttiex1280.

How do we call ttiex1280s000. I have set some values, that it appears to need (ie: from.iexpatch, iexpatch, sess.from.file and session). The ttiex410 and ttiex400 tables are current in memory (although, this is irrelevant, as the file now holds the list of all the components to be delivered). Why is the 'Order line not found' error being displayed and what other variables need to be passed to ttiex1280s000?
Reply With Quote
  #2  
Old 12th April 2005, 22:39
Ruskin's Avatar
Ruskin Ruskin is offline
Unconfirmed User
 
Join Date: Feb 2002
Location: New Zealand
Posts: 91
Ruskin is on a distinguished road
Baan: All - DB: MS-SQL, Informix, Oracle - OS: UNIX and NT Server
Have an answer....

Just to advise, this has been answered in the tools development section. I posted this in AFS, but realised that it's a tools issue (not an AFS issue), so also posted in tools development.

It was how we were calling ttiex1280s000, that was the issue. This works fine;

extern domain ttaad.path path
extern domain ttaad.path path.components

#pragma used dll "ottdlldeliver"
#pragma used dll "ottdllfilehand"

path = "/patches"
path.components = creat.tmp.file$(bse.tmp.dir$())

|* From ttdlldeliver
create.deliver.file(ttiex400.paco, path.components)
zoom.to$("ttiex1280s000", Z.SESSION, "iexpatch", "", 0)


NOTE: this has created DD files, so you need to use the pack.patch function, in ttdllfilehand, to pack the DD directory structure into a single patch file.
Reply With Quote
  #3  
Old 14th April 2005, 06:49
Hitesh Shah's Avatar
Hitesh Shah Hitesh Shah is offline
Guru
 
Join Date: Nov 2001
Location: Mumbai,India
Posts: 1,855
Hitesh Shah is on a distinguished road
Baan: triton,Baan IVc4 , ERP Ln - DB: Oracle/Bisam/SQL 2000/SQL 2005 - OS: Sun Solaris/Windows 2003
excellent

In the past i had made limited trials on this without success. This is very useful.

Can u elaborate on this with an example .

Quote:
Originally Posted by Ruskin
NOTE: this has created DD files, so you need to use the pack.patch function, in ttdllfilehand, to pack the DD directory structure into a single patch file.
Reply With Quote
  #4  
Old 14th April 2005, 23:29
Ruskin's Avatar
Ruskin Ruskin is offline
Unconfirmed User
 
Join Date: Feb 2002
Location: New Zealand
Posts: 91
Ruskin is on a distinguished road
Baan: All - DB: MS-SQL, Informix, Oracle - OS: UNIX and NT Server
DD directory structure

When the data dictionary is exported from ttiex1280s000, they are in a directory structure of;
ppvvvv_rr_cccc
Where p is package, v is version, r is release and c is customer. Thus, it is possible to call ttiex1280s000 with a dump file that contains multiple packages (but only a single vrc if coming from a patch, as the patch header table ttiex400 specifiies the vrc of the components attached to the patch in the patch line table ttiex410).
So for example, if you have two components in ttiex410, such as; script tfacr2420 and script tdsls4101, then two directories are created in the path specified by the external variable 'path'. It is important to note, that ttiex1280s000 needs two external variables;
path - This is the path of where to create the data dictionary files
path.components - This is the full path and filename of the component list file, which contains the components to be dumped. If you look at my previous script, you will see how to build this file

If your the 'path' variable is set to patches/tmp, then when you export this patch, you will get two directories;
../patches/tmp/tfVVVV_rr_cccc
../patches/tmp/tdVVVV_rr_cccc
In these directories, will exist the data dictionary (DD) dump files, generally;
components
dump.l
dump.e
dumpf01.Z
dumpd01.Z
..etc..
You can pack these directories into a single patch file, by specifying the path to the dd directory structure. In this case, it is the path to the patches/tmp directory. NOTE: you must use the full path (not a relative path). If we continue my script from my previous post, after you have called ttiex1280s000, you pack the patch by;

long x
|* This is in ottdllfilehand
x = pack.patch("/home/patches/tmp", "/home/patches", "my_patch")
if x < 0 then
message(sprintf$("Error %d creating patch file", x))
return
endif

The function expects the first directory, to be the root directory of where the DD directory structure is. In this case, the patches/tmp directory (it will then pack all the sub directories into a single file). The second argument, is where to put the patch file. In this case, the patch file will go into the patches directory. The third argument is the patch filename (should be the same as ttiex400). So you are left with;
/home/patches/my_patch
Which is a patch file that contains two data dictionary dumps and there directory structure (one for tf and one for ti, both in the same patch file).

NOTE: when the pack.patch function runs, it deletes the binary (.Z) files, but does not delete the ascii files (components, dump.l or dump.e). You will need to clean these up manually. What we do, is concatenate the dump.l files from all of the ppVVVV_rr_cccc directories into a single dump list, so we can see what all the patches contain, before we delete them. Thus, we know exactly what is stored in each patch, for importing. Before we purge all the sub directories under ../patches/tmp.

Here is some useful code, for cleaning up the ascii files in the DD directory, after you have dumped the patch. NOTE: in this instance, do NOT put the patch file into ../patches/tmp, as this function will remove the tmp directory and all it's contents. Use this function call at your own peril (in other words, don't put your root directory into this function);

|* This is in ottdllfilehand
rm.dir.and.subdirs("/home/patches/tmp")
mkdir("/home/patches/tmp")
Reply With Quote
Sponsored Links
  #5  
Old 24th December 2013, 11:22
Amit_Jain's Avatar
Amit_Jain Amit_Jain is offline
Member
 
Join Date: Apr 2006
Location: Hyderabad - India
Posts: 71
Amit_Jain is on a distinguished road
Baan: baan IV,V LN - DB: SQL,Oracle9i - OS: windows 2003 server
Please share Code

Hi Ruskin

I have been working on writing AFS for session "ttiex1280m000" without success. I would be greatful if you can share the code.
__________________
_______________________
Amit
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Updating table from file with AFS richen AFS/DDC/OLE: Function servers 1 4th March 2005 16:59
Create PDF file with WindowsXP berthe Tools Development 4 16th December 2004 17:57
AFS : Create a sales Order Line for a Generic Item van_math AFS/DDC/OLE: Function servers 2 1st June 2004 14:32
how to create ascii file on client side Caner.B Tools Administration & Installation 14 12th July 2002 17:30


All times are GMT +2. The time now is 17:57.


©2001-2017 - Baanboard.com - Baanforums.com