×
Discuss about Archiving, Close of Business, Delivery Setup, Security Management System, Global Processing etc…
How to launch a service via shell script
- Anass
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 5
- Thank you received: 0
10 years 5 months ago #16895
by Anass
How to launch a service via shell script was created by Anass
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
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
Please Log in or Create an account to join the conversation.
- Anass
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 5
- Thank you received: 0
10 years 4 months ago #16970
by Anass
Replied by Anass on topic How to launch a service via shell script
Hi ALL
any solutions?
any solutions?
Please Log in or Create an account to join the conversation.
- gm.saran
- Offline
- Elite Member
-
Less
More
- Posts: 203
- Thank you received: 29
10 years 4 months ago #16971
by gm.saran
Replied by gm.saran on 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....
The following user(s) said Thank You: Anass
Please Log in or Create an account to join the conversation.
- Anass
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 5
- Thank you received: 0
10 years 4 months ago #16973
by Anass
Replied by Anass on 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
thanks for your suggestion, can i have a sample or the program you are using to run the DW.EXP.SERVICE.
best regards
Please Log in or Create an account to join the conversation.
- jpb
-
- Offline
- Moderator
-
- retired . . . ¯\_(ツ)_/¯
Less
More
- Posts: 2859
- Thank you received: 650
10 years 4 months ago #16977
by jpb
The following user(s) said Thank You: Anass
Please Log in or Create an account to join the conversation.
- Anass
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 5
- Thank you received: 0
10 years 4 months ago #17001
by Anass
Replied by Anass on 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
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
Please Log in or Create an account to join the conversation.
- jpb
-
- Offline
- Moderator
-
- retired . . . ¯\_(ツ)_/¯
Less
More
- Posts: 2859
- Thank you received: 650
10 years 4 months ago - 10 years 4 months ago #17003
by jpb
Replied by jpb on 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 . . .
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 . . .
Last edit: 10 years 4 months ago by jpb. Reason: typo
Please Log in or Create an account to join the conversation.
- Anass
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 5
- Thank you received: 0
10 years 4 months ago #17006
by Anass
Replied by Anass on topic How to launch a service via shell script
thanks we will try this with our Dev team :)
Please Log in or Create an account to join the conversation.
Time to create page: 0.048 seconds