Baanboard.com

Go Back   Baanboard.com > Forum > Baan Quick Support: Functional & Technical > Tools Development

Retirement Notice

Baanboard is shutting down on 31-dec-2023. See: http://www.baanboard.com/baanboard/showthread.php?t=76043


User login

Frontpage Sponsor

Main

Poll
What do you expect from your SI Implementation partner for the success of ERP implementation.
Bring best practices - Not to offer more CR's Leveraging standard functions
20%
Need more honesty to work with the Users until their processes are fully mapped & Users are trained
40%
Focus on process automation/ integrations/ Real time data/ BI analytics
13%
Stick to basics
27%
Total votes: 15

Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 13th February 2003, 21:24
r_nagu's Avatar
r_nagu r_nagu is offline
Senior Member
 
Join Date: Mar 2002
Location: ~
Posts: 232
r_nagu is on a distinguished road
Baan: BaaN IV - DB: Oracle 8 - OS: UNIX
Running session in background..

Hi,
Does any one know, how to run a session in background?

What I want to actually do is, I have a 3 GL script and I want to run this script 24/7. I have an infinate loop in this script so it runs all the time. I don’t want to start this session from my desktop because once I close my login the session also ends. I know submitting this in a job will probably work but, I want to know if you guys know any other way.

Thanks,
Appreciate your help,

NS
Reply With Quote
  #2  
Old 13th February 2003, 22:02
NPRao's Avatar
NPRao NPRao is offline
Guru
 
Join Date: Aug 2001
Location: Pacific NW, USA
Posts: 3,149
NPRao will become famous soon enough
Baan: Baan 4-5,5.2(Reger),LN-6.1,Infor LN-10.x - DB: Oracle,MS-SQL - OS: HPUX, Linux, Windows
You can refer to the links -

rc.startjob doesn't work

Run Baan function from script
__________________
The art of perfection does not lie in doing extraordinary things but, doing ordinary things extraordinarily well. [-N. Prashanth Rao]
How To Ask Questions The Smart Way,BaaNBoard,NPRao
Reply With Quote
  #3  
Old 13th February 2003, 22:43
ssbaan's Avatar
ssbaan ssbaan is offline
Member
 
Join Date: Jan 2002
Location: Ohio, USA
Posts: 91
ssbaan is on a distinguished road
Baan: 4c2 - DB: Oracle - OS: Unix
Are you on a Unix box? because you can start a session from
unix running the process in background by using the ba6.1 command.
Reply With Quote
  #4  
Old 14th February 2003, 00:07
r_nagu's Avatar
r_nagu r_nagu is offline
Senior Member
 
Join Date: Mar 2002
Location: ~
Posts: 232
r_nagu is on a distinguished road
Baan: BaaN IV - DB: Oracle 8 - OS: UNIX
Yes..

Yes, i am on unix box. do you know what's the command to run the process in background using ba6.1?
Reply With Quote
  #5  
Old 14th February 2003, 00:10
NPRao's Avatar
NPRao NPRao is offline
Guru
 
Join Date: Aug 2001
Location: Pacific NW, USA
Posts: 3,149
NPRao will become famous soon enough
Baan: Baan 4-5,5.2(Reger),LN-6.1,Infor LN-10.x - DB: Oracle,MS-SQL - OS: HPUX, Linux, Windows
You can use the $BSE/bin/bshell[version-code]
Quote:
>bshell6.2 -?
Usage: bshell6.2 [options] [program...]
options:

-vV : show program version
-r : show resources
-deftext : show bshell texts
-ba : connect with ba display server
-bx : connect with bx display server
-mdebug : display bshell messages sent to display server
-dbgams : debug ams
-dbgdata : show datainput options (not for fields!)
-dbgobj : show object information
-dbgref : show reference paths
-dbgfun : debug functions
-dbgsrv : show bdb server type
-dbglck : show locking errors
-dbgmulact : show process actions (activate,sleep,kill etc.)
-dbgrefer : show references
-dbgbdbact : show bdb actions
-dbgfdev : debug file access
-dbgfile : show successfully opened sequential files
-dbgjvmi : show JavaVM integration actions
-dbgres : show loaded resources
-dbgenums : show loading of enums
-dbginstr : show bshell cpu instructions
-dbgcpu : use debug version of the cpu
-dbgsrdduse : show srdd usage
-dbggpvar : debug get & putvar
-dbgsched : debug scheduler
-dbgpty : debug pty's
-dbgmem : show all memory statistics (see below)
-dbgmemtot : show total memory usage
-dbgmemblk : show memory usage per block
-dbgmemfree : show free memory list
-dbgmemused : show used memory list
-dbgxml : assert correctness of strings written to xml tree
-set var=val : set environment variable 'var' to 'val'
-logfile <file> : log stdout/stderr output in <file>
-keeplog : don't remove the logfile after ending the bshell
-appendlog : append to logfile (only useful with -logfile option)
-nolog : stdout and stderr will go to the controlling terminal
(if possible - on remote connection no output will appear)
-delay <sec> : delay for <sec> seconds before continuing
(useful for attaching with a debugger: set breakpoint
at the function 'delay_ready')
-logtag <tag> : used together with -logfile. The <tag> is used in the
logfile and is especially useful when logging from
multiple bshells
-dsunicode : communicate with the display driver using Unicode strings
-windownames : pass unique window names to user interface for testtools
-dbgmesg : stop in the debugger when a warning message is sent to the
display server.
-nodebug : disable debugger.
-nounicode : don't read unicode files $BSE/lib/unicode/*.(N2U|U2N).
-server : run as a server without UI
__________________
The art of perfection does not lie in doing extraordinary things but, doing ordinary things extraordinarily well. [-N. Prashanth Rao]
How To Ask Questions The Smart Way,BaaNBoard,NPRao
Reply With Quote
  #6  
Old 14th February 2003, 03:33
tjbyfield's Avatar
tjbyfield tjbyfield is offline
Guru
 
Join Date: Jun 2002
Location: Sydney Australia
Posts: 356
tjbyfield is on a distinguished road
Baan: baan4c4 - DB: oracle 805 - OS: AIX 4.3.3
Infinite loop - continuous run

I also, am interested in having a program running continually.
At present we start the program every 5 minutes using cron. This works very weel but we would rather have the job running continually and springing into action whenever new records (oracle db) are available for it to process.

What mechanism do you use to idle the program ? Do you continually try to read new records or do you make the program sleep for a short period and the retry reading records.

I have been wooried about the load on the system that an infinite loop could impose.

I will be very interested in you approach.

Regards

Terry
Reply With Quote
  #7  
Old 14th February 2003, 16:12
r_nagu's Avatar
r_nagu r_nagu is offline
Senior Member
 
Join Date: Mar 2002
Location: ~
Posts: 232
r_nagu is on a distinguished road
Baan: BaaN IV - DB: Oracle 8 - OS: UNIX
Terry,
Here’s what I did.

The requirement was to run session calculate cost price by project automatically any time changes are made to Custom BOM as we need the correct cost get posted to the project. Right now this is a manual process i.e., users are expected to run calculate cost price by project any time they change the CBOM. But in most of the cases they are not doing this and we getting wrong cost getting posted to the project.

So, initial thought was to run this session from Maintain CBOM session when some one makes modifications to it. But the problem with this is that the session calculated cost price takes at least 15 to 20 minutes depending on the size of the project to complete and users will be stuck in this Maintain CBOM session for that time.

To work around this, I created a table where I stores the project numbers from Maintain CBOM session any time changes are made to it. Then I wrote a 3 GL script which runs the calculated cost price through AFS in a infinite while loop reading this table. Since I can not add this 3 GL to a job, I created a shell script with this command “bshell6.1 -server -set BSE_COMPNR=100 -set PACKAGE_COMB=B40Ocpro otipcsn900” (thanks to NPRao) that runs this 3 GL in background and ran this script using “at” Unix command.

Right now I am testing this process and so far it seems like is working fine.

Thanks,
NS
Reply With Quote
  #8  
Old 14th February 2003, 20:52
r_nagu's Avatar
r_nagu r_nagu is offline
Senior Member
 
Join Date: Mar 2002
Location: ~
Posts: 232
r_nagu is on a distinguished road
Baan: BaaN IV - DB: Oracle 8 - OS: UNIX
Help!!!

With the command bshell6.1 is there any other way to start a session in back ground with out using –server option? the problem is, we have two servers one for development and another one for production. Both the servers are on two different porting sets. The bshell6.1 command has the option –server in our development server but unfortunately it does not have it on our production server. So, when I moved all the work to the production server, it failed.

Any suggestions?

Thanks,
NS
Reply With Quote
  #9  
Old 15th February 2003, 02:24
tjbyfield's Avatar
tjbyfield tjbyfield is offline
Guru
 
Join Date: Jun 2002
Location: Sydney Australia
Posts: 356
tjbyfield is on a distinguished road
Baan: baan4c4 - DB: oracle 805 - OS: AIX 4.3.3
Starting session

hi r_nagu

We use ba6.1 to start session from cron every 5 minutes, rather than directly execute 3gl object:
eg: ${BSE}/bin/ba6.1 -- tisfc9210m000 >>$LF

Terry
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
synchronizing different occurrences on parent session from child Ruskin Tools Development 8 18th March 2008 18:56
Running session without user intervention mprakash Tools Development 1 30th August 2004 07:53
AFS - problem running session in a job aobrien AFS/DDC/OLE: Function servers 15 2nd April 2004 15:51
running first session after login is taking time veyant Tools Administration & Installation 5 18th August 2003 20:18
tfacp9450m000 FIBU Brush Up Kai's Forum Users Deutsches Forum 1 16th November 1999 01:00


All times are GMT +2. The time now is 01:32.


©2001-2023 - Baanboard.com - Baanforums.com