E9.0 How to end a Subsystem through Code

kiran4hari

kiran4hari

Well Known Member
Hi,

We have a requirement to End a custom Subsystem through JDE UBE. I have tried to insert a record in to F986113 through table I/O as I am not sure if there is an API to do this. I have mapped UBE Name, Version, Environment (ex: JPY900, where subsystem is running), OPCR = 'E' (End Subsystem), Job Number, Origin Host, Date(SBMDATE) and Time (SBMTIME). I can see a record through UTB in F986113, but the Subsystem doesn't end.

I looked at debug log of Subsystem, it is fetching F986113 record based on only following four fields in case of OPCR = E.

F986113 WHERE ( SSPID = 'R550102' AND SSVERS = 'ENT0001' AND SSENHV = 'JPY900' AND SSOPCR = 'E' )

Any inputs on this will be very helpful.

Thank you.
Hari
 
Would you not update the F986113 record of the SBS that's running. Not create a new one

There is a difference between End and Stop too.


If FI EndJobOptions [INT01] is equal to "0"
(end code)
BC UBE Option Code (F986113.0) [OPCR] = "E"
FC Job Status [OPCR] = "E"
Else
(stop code)
BC UBE Option Code (F986113.0) [OPCR] = "W"
FC Job Status [OPCR] = "W"
BC Job Priority (F986113.0) [JOBPTY] = "0"
FI szJob_Priority [JOBPTY] = "0"
End If
 
You can write a R, W record into F986113 for each SBS that is on S, R - that will stop it.

This would stop them all (SQL Server Syntax and using a Gregorian to Julian usp):
INSERT INTO JDE920.SVM920.F986113 SELECT SSPID,SSVERS,SSJOBNBR,'R','W',SSEXEHOST,SSORGHOST,SSENHV,'SQL','',dbo.DateG2J(getdate()),(SELECT convert(int,replace(convert(nvarchar(8),getdate(),108),':',''))),'0',0,0.000000,' ','1','',' ',' ',0.000000,0.000000,0.000000,0,0 FROM JDE920.SVM920.F986113 WHERE SSJOBSTS = 'S' AND SSOPCR = 'R'
 
Thank you very much for the inputs, this should solve my problem.

The record that I was trying to insert through a test application is going in to F986113 System table instead of F986113 Server Map. But the application P986113 is using F986113 Server Map. I am taking CNC's help to get this changed so that my F986113 insert goes to Server Map.
 
I am able to achieve this functionality. As per CNC, the data source for F986113 on fat client will be System and on web it will be Server Map (SVM). So I ran my custom UBE on web and it worked.

Logic I used : Fetch JOBNBR, EXEHOST, ORGHOST from F986113 where PID = R550102, VERS = ENT0001 AND SSENHV = Login Environment AND SSOPCR = R, JOBSTS = S (This is to fetch existing record information, similar SQL given by "schojo44")

Inserted a new record with the information retrieved above and OPCR = E and JOBSTS = R. (This record will stop the subsystem after the current record in processing is completed).

Thank you schojo44 and JohnD for the inputs.
 
Back
Top