Wait x seconds - Both Client & Server Function required

Zoltan_Gyimesi

Zoltan_Gyimesi

Legendary Poster
Hi List,

I need a BSFN wich waits x seconds and can run on Both Client & Server.

There is a "Wait x seconds" C BSFN in B98700 source modul, but this BSFN contains several other functions and it is Client Only BSFN.

1.) Does anybody know any BSFN, which can wait x seconds and runs on client & server?

2.) Can I create a new BSFN with a single "Custom wait x seconds" function, copying and modifying accordingly the logic of the mentioned client only function?
2.a.) Can I mark this new BSFN as "Both Client & Server Function" and will it work properly when it will be called from an UBE, which runs on the server?

Any help, hint, solution will be greatly appreciated.

Regards,

Zoltán
 
Zoltan,

I faced the same situation several years ago. Solved it by using JDE API 'jdeSleepSeconds' and writing my own BSFN, making it client/server.

Code snippet....

/************************************************************************
* Main Processing
************************************************************************/
MathNumericToInt(&lpDS->mnReceiverWaitSeconds, &iSeconds);
jdeSleepSeconds(iSeconds);

Hope this helps.

Barry
 
I use B98700 on both the server and client and it works fine. What are you
trying to do where it does not work.





Zoltan_Gyimesi
<zoltan.gyimesi@s To: [email protected]
ynergon.hu> cc:
Sent by: Subject: Wait x seconds - Both Client & Server Function required
jdeowdev-bounces@
jdelist.com


03/01/2005 09:44
AM
Please respond to
JD Edwards®
EnterpriseOne
Developers






Hi List,

I need a BSFN wich waits x seconds and can run on Both Client & Server.

There is a "Wait x seconds" C BSFN in B98700 source modul, but this BSFN
contains several other functions and it is Client Only BSFN.

1.) Does anybody know any BSFN, which can wait x seconds and runs on client
& server?

2.) Can I create a new BSFN with a single "Custom wait x seconds" function,
copying and modifying accordingly the logic of the mentioned client only
function?
2.a.) Can I mark this new BSFN as "Both Client & Server Function" and will
it work properly when it will be called from an UBE, which runs on the
server?

Any help, hint, solution will be greatly appreciated.

Regards,

Zoltán


XE UPDATE 2 SP15.1, Intel NT4, SQL 2000 (was/is working with B7321, B7331,
B7332 too)
 
Hi Barry,

Thanks for your response.

This code is exactly the same, what is "Wait x seconds" in B98700.

Regards,

Zoltán
 
From 8.9 onwards you can use B984056 which works on both client and server.
 
Hi Adrian,

Thanks for the inforamtion after 6 years.
cool.gif
laugh.gif
cool.gif
laugh.gif
wink.gif


Regards,

Zoltán
 
Zoltan, pretend I gave you this SEVEN years ago.

B5500010.c:
<font class="small">Code:</font><hr /><pre>

#include <jde.h>

#define b5500010_c


/*****************************************************************************
* Source File: b5500010
*
* Description: Wait Command Source File
*
* History:
* Date Programmer SAR# - Description
* ---------- ---------- -------------------------------------------
* Author 4/30/2004 DRICCIARDI Unknown - Created
*
* Copyright (c) J.D. Edwards World Source Company, 1996
*
* This unpublished material is proprietary to J.D. Edwards World Source Company.
* All rights reserved. The methods and techniques described herein are
* considered trade secrets and/or confidential. Reproduction or
* distribution, in whole or in part, is forbidden except by express
* written permission of J.D. Edwards World Source Company.
****************************************************************************/
/**************************************************************************
* Notes:
*
**************************************************************************/

#include <b5500010.h>

#ifdef JDENV_AS400
#include <QSYSINC/MIH/MICOMMON>
#include <QSYSINC/MIH/WAITTIME>
#endif

/**************************************************************************
* Business Function: WaitCommand
*
* Description: Wait Command
*
* Parameters:
* LPBHVRCOM lpBhvrCom Business Function Communications
* LPVOID lpVoid Void Parameter - DO NOT USE!
* LPDSD5500010B lpDS Parameter Data Structure Pointer
*
*************************************************************************/

JDEBFRTN (ID) JDEBFWINAPI WaitCommand (LPBHVRCOM lpBhvrCom, LPVOID lpVoid, LPDSD5500010B lpDS)
{
/************************************************************************
* Variable declarations
************************************************************************/
#if defined (WIN32)
long Timer=0;
#endif

#ifdef JDENV_AS400
_MI_Time time_to_wait; /* The amount of time to wait. */
int hours = 0, /* Time components used to */
minutes = 0, /* create an _MI_Time value */
seconds = 0, /* that can be passed to the */
hundredths = 0; /* 'waittime' function */
short wait_option;
#endif
/************************************************************************
* Declare structures
************************************************************************/

/************************************************************************
* Declare pointers
************************************************************************/

/************************************************************************
* Check for NULL pointers
************************************************************************/
if ((lpBhvrCom == (LPBHVRCOM) NULL) ||
(lpVoid == (LPVOID) NULL) ||
(lpDS == (LPDSD5500010B) NULL))
{
jdeErrorSet (lpBhvrCom, lpVoid, (ID) 0, _J("4363"), (LPVOID) NULL);
return ER_ERROR;
}

/************************************************************************
* Set pointers
************************************************************************/

/************************************************************************
* Main Processing
************************************************************************/
#if defined (WIN32)
MathNumericToLong(&lpDS->mnSecondsToWait,&Timer);
sleep( (clock_t)Timer * CLOCKS_PER_SEC );
#else
#ifdef JDENV_AS400
MathNumericToInt(&lpDS->mnSecondsToWait,&seconds);
mitime( &time_to_wait, hours, minutes, seconds, hundredths );
/* Tells the system to use normal */
wait_option = _WAIT_NORMAL; /* handling of a suspended job. */
waittime( &time_to_wait, wait_option );
#endif
#endif
/************************************************************************
* Function Clean Up
************************************************************************/

return (ER_SUCCESS);
}

/* Internal function comment block */
/**************************************************************************
* Function: Ixxxxxxx_a // Replace "xxxxxxx" with source file number
* // and "a" with the function name
* Notes:
*
* Returns:
*
* Parameters:
**************************************************************************/

</pre><hr />


B5500010.h
<font class="small">Code:</font><hr /><pre>


/*****************************************************************************
* Header File: B5500010.h
*
* Description: Wait Command Header File
*
* History:
* Date Programmer SAR# - Description
* ---------- ---------- -------------------------------------------
* Author 4/30/2004 DRICCIARDI Unknown - Created
*
*
* Copyright (c) J.D. Edwards World Source Company, 1996
*
* This unpublished material is proprietary to J.D. Edwards World Source
* Company. All rights reserved. The methods and techniques described
* herein are considered trade secrets and/or confidential. Reproduction
* or distribution, in whole or in part, is forbidden except by express
* written permission of J.D. Edwards World Source Company.
****************************************************************************/

#ifndef __B5500010_H
#define __B5500010_H

/*****************************************************************************
* Table Header Inclusions
****************************************************************************/

/*****************************************************************************
* External Business Function Header Inclusions
****************************************************************************/

/*****************************************************************************
* Global Definitions
****************************************************************************/

/*****************************************************************************
* Structure Definitions
****************************************************************************/

/*****************************************************************************
* DS Template Type Definitions
****************************************************************************/
/*****************************************
* TYPEDEF for Data Structure
* Template Name: Wait Command
* Template ID: D5500010B
* Generated: Fri Apr 30 17:02:43 2004
*
* DO NOT EDIT THE FOLLOWING TYPEDEF
* To make modifications, use the OneWorld Data Structure
* Tool to Generate a revised version, and paste from
* the clipboard.
*
**************************************/

#ifndef DATASTRUCTURE_D5500010B
#define DATASTRUCTURE_D5500010B

typedef struct tagDSD5500010B
{
MATH_NUMERIC mnSecondsToWait;
} DSD5500010B, *LPDSD5500010B;

#define IDERRmnSecondsToWait_1 1L

#endif

/*****************************************************************************
* Source Preprocessor Definitions
****************************************************************************/
#if defined (JDEBFRTN)
#undef JDEBFRTN
#endif

#if defined (WIN32)
#if defined (WIN32)
#define JDEBFRTN(r) __declspec(dllexport) r
#else
#define JDEBFRTN(r) __declspec(dllimport) r
#endif
#else
#define JDEBFRTN(r) r
#endif

/*****************************************************************************
* Business Function Prototypes
****************************************************************************/
JDEBFRTN (ID) JDEBFWINAPI WaitCommand (LPBHVRCOM lpBhvrCom, LPVOID lpVoid, LPDSD5500010B lpDS);


/*****************************************************************************
* Internal Function Prototypes
****************************************************************************/

#endif /* __B5500010_H */
</pre><hr />
 
Ahh, the glory days. When you could rely on Windows to intervene when it was necessary.
laugh.gif
 
Back
Top