Previous Topic

Next Topic

Inhoudsopgave

Book Index

Scripts voor clusteren

ScriptCode

Script

CLUSTER_1

rem ----------------------------------------------------------------

rem Script: CLUSTER_1

rem ----------------------------------------------------------------

rem Isah version : 7.4.5.0 or higher

rem PDI version : 7.4.5.2 or higher

rem ----------------------------------------------------------------

rem Functionality: This script is part of the "Super cluster"

rem functionality

rem ----------------------------------------------------------------

rem Isah b.v. Web www.isah.com

rem ----------------------------------------------------------------

 

function PDIAction(ProcessData, Params)

rem This function is called from the production data server when this

rem script is hooked up to a dialog

 

rem Construct a message to send to the client.

rem The client will react on this message

if ProcessData(5) <> "" then

rem A clustercode is supplied

 

rem Change description of the cluster

SetDescriptionOfClusterMain(ProcessData(5))

 

rem Proceed to next part of clustering: start using cluster

PDIAction = "600010;" & ProcessData(5) & "|P C=" & ProcessData(5)

else

rem The clustercode is unknown. Return a standard messagecode (Invalid clustercode)

PDIAction = "000056;"

end if

end function

 

sub SetDescriptionOfClusterMain(aClusterCode)

rem Change description of a cluster

 

Dim aSelectQuery

 

rem Create a querycomponent that will update the data in the database

Set aSelectQuery = Application.DataBase.CreateUpdateQuery("ClusterMain", "ClusterMain")

aSelectQuery.SQL = " SELECT ClusterCode, Description, LastUpdatedOn " &_

" FROM ClusterMain " &_

" WHERE ClusterCode = " & aClusterCode & ""

aSelectQuery.Open

if not aSelectQuery.EOF then

aSelectQuery.Edit

rem Construct a description like [YYYY-MM-DD / HH:MM][EEEEEEEE]

aSelectQuery("Description").Value = "[" & CurrentDateAndTime & "][" & Right(Space(8) & Application("IsahUserCode"), 8) & "]"

aSelectQuery.Post

End If

aSelectQuery.Close

end Sub

 

function CurrentDateAndTime

rem Construct a string with the current date and time in the format YYYY-MM-DD / HH:MM

CurrentDateAndTime = DatePart("yyyy",Date) & "-" & _

Right("0" & DatePart("m", Date), 2) & "-" & _

Right("0" & DatePart("d", Date), 2) & " / " & _

Right("0" & DatePart("h", Time), 2) & ":" & _

Right("0" & DatePart("n", Time), 2)

end function

CLUSTER_2

rem ----------------------------------------------------------------

rem Script: CLUSTER_2

rem ----------------------------------------------------------------

rem Isah version : 7.4.5.0 or higher

rem PDI version : 7.4.5.2 or higher

rem ----------------------------------------------------------------

rem Functionality: This script is part of the "Super cluster"

rem functionality

rem ----------------------------------------------------------------

rem Isah b.v. Web www.isah.com

rem ----------------------------------------------------------------

 

function PDIAction(ProcessData, Params)

rem This function is called from the production data server when this

rem script is hooked up to a dialog

 

rem Note: by default, we select an operation line by entering a work order

rem To select an operation line via a production file, we must activate the

rem following line and deactivate the next

 

rem By production file

rem PDIAction = "600040;"

 

rem By work order

PDIAction = "600020;"

 

end function

CLUSTER_3

rem ----------------------------------------------------------------

rem Script: CLUSTER_3

rem ----------------------------------------------------------------

rem Isah version : 7.4.5.0 or higher

rem PDI version : 7.4.5.2 or higher

rem ----------------------------------------------------------------

rem Functionality: This script is part of the "Super cluster"

rem functionality

rem ----------------------------------------------------------------

rem Isah b.v. Web www.isah.com

rem ----------------------------------------------------------------

 

function PDIAction(ProcessData, Params)

rem This function is called from the production data server when this

rem script is hooked up to a dialog

 

PDIAction = "600030;"

end Function

CLUSTER_4

rem ----------------------------------------------------------------

rem Script: CLUSTER_4

rem ----------------------------------------------------------------

rem Isah version : 7.4.5.0 or higher

rem PDI version : 7.4.5.2 or higher

rem ----------------------------------------------------------------

rem Functionality: This script is part of the "Super cluster"

rem functionality

rem ----------------------------------------------------------------

rem Isah b.v. Web www.isah.com

rem ----------------------------------------------------------------

 

function PDIAction(ProcessData, Params)

rem This function is called from the production data server when this

rem script is hooked up to a dialog

 

PDIAction = "600050;"

end Function