× Discuss about Archiving, Close of Business, Delivery Setup, Security Management System, Global Processing etc…

How to launch a service via shell script

  • Posts: 5
  • Thank you received: 0

Anass created the topic: How to launch a service via shell script

Hi ALL
we have some services (TS and DSC) that we want to automatically launch with our central scheduler How to create a script (.sh) to do this

T24 (R10) AIX ORACLE
Thank you

example:
ETS
EX
USER
PWD
TS, I BNK/TEST.LOAD.A 6 START
CTRL+V

ETS
EX
USER
PWD
DSC V LOAD.CUSTOMER
CTRL + V
#16895

Please Log in or Create an account to join the conversation.

  • Posts: 5
  • Thank you received: 0

Anass replied the topic: How to launch a service via shell script

Hi ALL
any solutions?
#16970

Please Log in or Create an account to join the conversation.

  • Posts: 203
  • Thank you received: 29

gm.saran replied the topic: How to launch a service via shell script

Write a JBASE program to mark the service to START and call the program from the script. We do this to start the DW.EXP.SERVICE after COB finishes....
#16971
The following user(s) said Thank You: Anass

Please Log in or Create an account to join the conversation.

  • Posts: 5
  • Thank you received: 0

Anass replied the topic: How to launch a service via shell script

Hi,
thanks for your suggestion, can i have a sample or the program you are using to run the DW.EXP.SERVICE.

best regards
#16973

Please Log in or Create an account to join the conversation.

  • Posts: 2845
  • Karma: 512
  • Thank you received: 647

jpb replied the topic: How to launch a service via shell script

#16977
The following user(s) said Thank You: Anass

Please Log in or Create an account to join the conversation.

  • Posts: 5
  • Thank you received: 0

Anass replied the topic: How to launch a service via shell script

Hi JPB
thank you for the link it's very helpful,
we developed this program below the TS is lanched
but when we tape TS S MA1/DM.EXTRACTOR-DWHCUSTOMER the fields DATE , STARTED, STOPPED ELAPSED are note updated

*******************************************************************
FN.TSA.SERVICE = "F.TSA.SERVICE"
F.TSA.SERVICE = ""

CALL OPF(FN.TSA.SERVICE,F.TSA.SERVICE)
SERV = "MA1/DM.EXTRACTOR-DWHCUST"

READU R.TSA.SERVICE FROM F.TSA.SERVICE,SERV ELSE
PRINT "Could not read TSA.SERVICE ":SERV
END

IF R.TSA.SERVICE<TS.TSM.SERVICE.CONTROL> <> "START" THEN
R.TSA.SERVICE<TS.TSM.SERVICE.CONTROL> = "START"
CALL F.WRITE(FN.TSA.SERVICE,SERV,R.TSA.SERVICE)
PRINT "service started: ":SERV

* Pour MAJ du fichier F.JOURNAL
CALL JOURNAL.UPDATE('')
END ELSE
CRT "Abort, service already started: ":SERV
END
STOP
**********************************************************************************************
Regards
#17001

Please Log in or Create an account to join the conversation.

  • Posts: 2845
  • Karma: 512
  • Thank you received: 647

jpb replied the topic: How to launch a service via shell script

When that post was made these fields didn't exist ;-)

Just update (insert) the first value of fields (and remove the 11th to have no more than ten as core does).
I think a call to SERVICE.HISTORY(CONTROL,TSA.SERVICE.REC) will do the job.
CONTROL = START/STOP (not AUTO)
TSA.SERVICE.REC = the actual service record (R.TSA.SERVICE in your routine)
Haven't tried - but should work . . .
#17003

Please Log in or Create an account to join the conversation.

  • Posts: 5
  • Thank you received: 0

Anass replied the topic: How to launch a service via shell script

thanks we will try this with our Dev team :)
#17006

Please Log in or Create an account to join the conversation.

Time to create page: 0.155 seconds