Baanboard.com

Go Back   Baanboard.com > Forum > Baan SIGs > Code & Utilities

User login

Frontpage Sponsor

Main

Poll
For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
37%
Installation Wizard into new VRC
39%
Manual into existing VRC
3%
Manual into new VRC
21%
Total votes: 38

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #46  
Old 24th April 2013, 13:05
baanspider baanspider is offline
Member
 
Join Date: Jul 2007
Posts: 69
baanspider is on a distinguished road
Baan: Baan LN - DB: Oracle - OS: HP UNIX
different format

Hi Mark

I am getting two different text files.

When I use the normal ASCIF device, i get the textfile zz208437. This is correct.

But when I use your script in this thread, the output file is like zok208437. I do not wish to have the special characters in this file.

What must I do? Please advise

thanks and regards,
Attached Files
File Type: txt zok208437.txt (3.9 KB, 31 views)
File Type: txt zz208437.txt (6.2 KB, 18 views)
Reply With Quote
  #47  
Old 24th April 2013, 15:35
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,929
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Basically what this script does is take the baan created report in the tmp directory(this should be file 1 with the special characters), convert it ascii(into a temp file), then download this file to some destination(in spool.fileout). Then launch excel to pull in the ascii test file. The final step is to remove the tmp file it creates. So you should end up with 1 normal baan report on the baan server and 1 ascii text file on the client. Bottom line - you end up with 2 reports, excel only launches against the plain text file that was created and downloaded to the client.

The normal baan report left on the server should be handled by whatever is setup on your system. We are on 4c4 and I think we set it to remove using the delete delay time(1 hr) on the user setup. This prevents the tmp directory from filling up.
__________________
Mark

GO Cards!
My latest mantra - make sure you have latest stpapi patches and the latest session object. If on LN then please explore the option of using DAL2 functionality.

Shared Solutions for Baan systems provided free by Baan Board.
Play the Google game and help Baanboard get better rankings. Do your part. Click here to find how.
Reply With Quote
  #48  
Old 19th July 2013, 23:01
benito's Avatar
benito benito is offline
Guru
 
Join Date: Jan 2002
Location: Eastern US
Posts: 517
benito is on a distinguished road
Baan: ERPLn 10.2.1 / BaanIVc4 - DB: Oracle11/Informix - OS: Unix/Linux
Cannot open file (error -2)

i'm getting the above error on this line:

activate("ttstpconv", argv$(1), argv$(2), argv$(3), argv$(4))

full error is:

Cannot open file (error -2)
Conversion cancelled

I thought i should change the object ostpconv to 755 permissions but it didn't help. anything else i should check? this is a test system and env is similar to Prod. i also tested on BaanIVc4 and LN FP8. the same error.

thanks
ben
Reply With Quote
  #49  
Old 19th July 2013, 23:37
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,929
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Well I use wait.and.activate, but I am not sure that is the problem. It sounds like one of the filles cannot be opened. So the question is - which file? So in this code:
Code:
| Convert the report file into the temp file.
	tmp.file = creat.tmp.file$( bse.tmp.dir$() )
	wait.and.activate("ttstpconv", argv$(1), tmp.file, argv$(3),argv$(4))
In debug mode I would make sure that the tmp.file is created under the baan tmp directory. Then make sure that argv$(1) points to the report that was created. Make sure the report is there and has data in it for the conversion. Then right after the ttstpconv you should be able to more the tmp.file and see the ASCII or whatever report.
__________________
Mark

GO Cards!
My latest mantra - make sure you have latest stpapi patches and the latest session object. If on LN then please explore the option of using DAL2 functionality.

Shared Solutions for Baan systems provided free by Baan Board.
Play the Google game and help Baanboard get better rankings. Do your part. Click here to find how.
Reply With Quote
  #50  
Old 22nd July 2013, 15:11
benito's Avatar
benito benito is offline
Guru
 
Join Date: Jan 2002
Location: Eastern US
Posts: 517
benito is on a distinguished road
Baan: ERPLn 10.2.1 / BaanIVc4 - DB: Oracle11/Informix - OS: Unix/Linux
thank you mark. i have made sure that it created a temp file. i even created the temp file in my home directory just to make sure that it's not a permission issue. that's how far my debug session could go because i get that error almost immediately. almost leads me to believe that it's not opening the ttstpconv.
Reply With Quote
  #51  
Old 22nd July 2013, 15:25
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,929
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Did you check the argv$(1) - make sure that file was available? When you run the session and pick the device - are you putting a file name into the output file name? Not sure that makes a difference. My ttstpconv on 4c4 is 660 for permissions and is owned by bsp and in the bsp group.
__________________
Mark

GO Cards!
My latest mantra - make sure you have latest stpapi patches and the latest session object. If on LN then please explore the option of using DAL2 functionality.

Shared Solutions for Baan systems provided free by Baan Board.
Play the Google game and help Baanboard get better rankings. Do your part. Click here to find how.
Reply With Quote
  #52  
Old 22nd July 2013, 16:51
benito's Avatar
benito benito is offline
Guru
 
Join Date: Jan 2002
Location: Eastern US
Posts: 517
benito is on a distinguished road
Baan: ERPLn 10.2.1 / BaanIVc4 - DB: Oracle11/Informix - OS: Unix/Linux
thanks mark. i got over this issue. the problem was i was working on a dev server that wasn't setup properly so the environment variables were screwed up. i am actually working on html device to print logo. i do have an issue but it seems similar to the other poster.
Reply With Quote
Sponsored Links
  #53  
Old 2nd October 2014, 16:10
gerardd gerardd is offline
Junior Member
 
Join Date: Dec 2008
Location: The Nedherlands
Posts: 27
gerardd is on a distinguished road
Baan: baan 40 c 4 - DB: oracle - OS: linux i686 athlon i386 GNU/Linux
Hi Mark H
and all
Thanks for this.
It works and solves my problem.

Thanks

Gerard
Reply With Quote
  #54  
Old 13th June 2016, 11:40
Ajesh's Avatar
Ajesh Ajesh is offline
Guru
 
Join Date: Feb 2009
Posts: 445
Ajesh is on a distinguished road
Baan: LN 10.4 - DB: Oracle - OS: HP-Unix
Hello Mark

Where are you exactly prompting the User to mention the Path? And How?

Quote:
| Set the path on the client's pc and send the file down. Let the user
| enter the path and filename to be downloaded.
local.path = strip$(spool.fileout)
Reply With Quote
  #55  
Old 13th June 2016, 12:41
bhushanchanda's Avatar
bhushanchanda bhushanchanda is offline
Guru
 
Join Date: Sep 2012
Location: India
Posts: 2,320
bhushanchanda has a spectacular aura aboutbhushanchanda has a spectacular aura aboutbhushanchanda has a spectacular aura about
Baan: LN FP 1-9, 10.4, a little bit of Baan IV - DB: SQL Server 2008, Oracle - OS: Windows Server 2008 R2, Unix
Hi Ajesh,

Its the path you see when system pops up device selection form(ttstpsplopen). If you are on latest TIV, the path will have a check if the folder exists on server. In that case, you can allow the user to put only file name in device path and then make a little change in the script -

Code:
| Set the path on the client's pc and send the file down. Let the user
| enter the path and filename to be downloaded.
	local.path = "${BSE_TMP}\" & strip$(spool.fileout)

This will make sure the file is transferred from the temp file to users tmp folder and the file name is taken as the user entered in the Device selection form.
__________________
Regards,

Bhushan

Unless you try to do something beyond what you have already mastered, you will never grow!
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 Off
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Code: Sample Qkey Script mark_h Code & Utilities 7 9th December 2013 15:33
Sample AFS code for Baan V DStroud AFS/DDC/OLE: Function servers 2 29th September 2004 17:59
I need to Change the Item Code after creating the production order baanlegend Distribution, Transportation & Warehousing 5 23rd July 2004 12:42
NEW: vbcode CODE extensions patvdv About Baanboard.com 3 13th March 2003 12:19
need sample code for API / AFS rohan_rege AFS/DDC/OLE: Function servers 4 9th September 2002 17:58


All times are GMT +2. The time now is 19:27.


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