Monday, 28 September 2015

Work submitted job (WSJ) history for new enterprise server

AS you know WSJ job information is stored in F986110 (not in the system data source) and the next numbers for jobs are controlled by F986111 in the same data source.

When you build a new enterprise server for a client (as a replacement for an old one), generally in the new virtual world – you just build a new machine.  This is an easy way to ensure that production is not affected.  It’s easy to introduce to an existing architecture and then easy to swap out the old.  Quite often your users will want access to their historical UBE’s.

So, you can use the following SQL carefully to do this for you.  Note that this will do the jobs and their execution details.

You’ll need to ensure that the PDF / CSV / log files are copied (physically) to the new server if you want the users to be able to view the output.

TABLE_NAME                     SIMD                                                       
------------------------------ ------------------------------------------------------------
F986110 Job Control Status Master
F986111 Job Number Master File
F986113 Subsystem Job Master
F986114A Audit Repository Detail
F986114 Auditing Information Data Repository

The tables and descriptions are above, this is hand SQL for generating this information.  The only thing that is handy is the ltrim and rtrim to get a match between oracle catalogs and object librarian.

select table_name, simd
from all_tables, ol910.f9860
where ltrim(rtrim(upper(table_name))) = ltrim(rtrim(upper(siobnm)))
and owner = 'SVMAP01';

Change the execution details with the following.  Note that I’m moving from AUBDC-JAP01P and AUBDC-JAP02P to AUPDC-JAP01P and AUPDC-JAP01P.

select * from SVMAP01.F986114;
update svmap01.f986114 set JCEXEHOST = 'AUPDC00-JAP01P' where JCEXEHOST = 'AUBDC00-JAP01P' ;
update svmap02.f986114 set JCEXEHOST = 'AUPDC00-JAP02P' where JCEXEHOST = 'AUBDC00-JAP02P' ;
commit;

select * from SVMAP01.F986114A;
update svmap01.f986114A set JDEXEHOST = 'AUPDC00-JAP01P' where JDEXEHOST = 'AUBDC00-JAP01P' ;
update svmap02.f986114A set JDEXEHOST = 'AUPDC00-JAP02P' where JDEXEHOST = 'AUBDC00-JAP02P' ;
commit;

select * from SVMAP01.F986113;
update svmap01.f986113 set SSEXEHOST = 'AUPDC00-JAP01P' where SSEXEHOST = 'AUBDC00-JAP01P' ;
update svmap02.f986113 set SSEXEHOST = 'AUPDC00-JAP02P' where SSEXEHOST = 'AUBDC00-JAP02P' ;
commit;

Now the actual WSJ information

update svmap01.f986111 set jcjobnbr = (select jcjobnbr + 1 from svmap01.f986111 where jcexehost = 'AUBDC00-JAP01P') where jcexehost = 'AUPDC00-JAP01P';
commit;

update svmap02.f986111 set jcjobnbr = (select jcjobnbr + 1 from svmap02.f986111 where jcexehost = 'AUBDC00-JAP02P') where jcexehost = 'AUPDC00-JAP02P';
commit;

select count(1), jcexehost from svmap01.f986110 group by jcexehost ;
update svmap01.f986110 set JCEXEHOST = 'AUPDC00-JAP01P' where JCEXEHOST = 'AUBDC00-JAP01P' ;
commit;

select count(1), jcexehost from svmap02.f986110 group by jcexehost ;
update svmap02.f986110 set JCEXEHOST = 'AUPDC00-JAP02P' where JCEXEHOST = 'AUBDC00-JAP02P' ;
commit;

Now you can goto WSJ and see all of the history.  New jobs will have a continued number too.

No comments:

Extending JDE to generative AI