How the System Builds a Full Server and a Client Package from the Web

  1. Web: Server Package UBE (R9621S) initiates the server package build.

  2. Web: UBE (R9621S) calls the BSFN program B9600196 on the enterprise server which calls into the package kernel code.

  3. Web Enterprise Server: The system gets the primary server name and sends a jdenet message to the primary server to start the package.

  4. Web Enterprise Server: The system does not wait for a response but goes into a continuous loop checking the status of the build, F96021-> bhbldsts, until it is finished.

  5. Primary Server: The primary server receives the message to start the package build.

  6. Primary Server: The system creates the package build directories on the primary enterprise server.

  7. Primary Server: The system checks the F00942T->emdbsrcflg value for 1. If value is 0 or blank, the objects have not been inserted into the F98780R table. If value is 1, then the objects have been inserted.

  8. Primary Server: The system checks the F00942T-emenvfu2 value for 1. If the value is 0 or blank, then the include and source files in the F98780R/R98780H have not been converted to 64-bit. If the value is 1, then the include and source files have been converted to include64 and source64 and uploaded into the F98780R/R98780H tables.

  9. Primary Server: If the files need to be inserted into the repository, send a jdenet message to the deployment server to initialize.

  10. Deployment Server: Initializes the deployment server and create the work directory.

  11. Primary Server: Sends a message to the deployment server to insert the records into the repository and waits for it to finish. This can take more than four hours.

  12. Deployment Server: Receives the message from the primary server to insert records into the repository.

  13. Deployment Server: Inserts all the records into the repository once. If F00942T -> emdbsrcflg value is 0 or blank and the F00942T-> emenvfu2 value is 0 or blank, then the system sets the F00942T -> emdbsrcflg=2 for processing. It does a fetch from F9860 for all objects that are not system code 88. It checks if there is a file associated with the object on the deployment server pathcode. If there are files then it creates a par file for the object and insert the record with the par file into the F98780R/F98780H. If the foundation selected for the package was 32-bit, then for business functions and tables, the par file will only include source and include files. It sets the object record in the F9860->sigtffu =1 to indicate there are files for this object. When the process is complete, it sets the F00942T->embdsrcflg=1 for completion. It leaves the F00942T-> emenvfu2 as 0 or blank since this indicates that the conversion of the include and source into 64-bit files was not done. If the foundation selected for the package was 64-bit, then for business functions and tables, it converts the include and source into 64-bit files into a temporary include64 and source64 directory. It creates the par file with all four directories and inserts the record into the F98780R/F98780H. It sets the object record in the F9860->sigtffu =1 to indicate there are files for this object. When the process is complete, it sets the F00942T->embdsrcflg=1 for completion. It also sets the F00942T-> emenvfu2 =1, which indicates the conversion of the include and source into 64-bit files was done.

  14. Deployment Server (Converts 32-bit to 64-bit): This is only done once. If F00942T -> emdbsrcflg value is 1, the F00942T-> emenvfu2 value is 0 or blank, and the foundation selected for the package was 64-bit, then it sets F00942T -> emenvfu2 =2 for processing. It does a fetch from F9860 for all objects that have F9860-> sigtffu=1 and that are not APPL, GT or DSTR, and not system code 88. For each fetch, it retrieves the par file from the F98780R, expands the par file, converts the include and source files to 64-bit and places them in temporary include64 and source64 directories. It creates the par file with all four directories and inserts it into the repository. When complete, it sets the F00942T-> emenvfu2 =1 to indicate the files have been converted to 64-bit.

  15. Deployment Server: When finished, returns to the Primary Server.

  16. Primary Enterprise Server: Sends a message to the deployment server to initialize deployment server.

  17. Deployment Server: Creates the directories.

  18. Primary Enterprise Server: Builds the list of objects from the F96225 table.

  19. Primary Enterprise Server: If client populated the F98780R/F98780H, then the system checks the specs F98710 (package name) for the object name F98780R. If these specs are not there, then it get the specs from the central objects path code and insert them into the live specs tables, F98710, F98711, F98712 and F98713.

  20. Primary Enterprise Server: If F00942T -> emdbsrcflg= 1, opens the F9860 and gets all objects where a F9860->sigtffu1=1 and F9860->sy != 88 and not a Named Event Rule (NER) or a Business Service (SBF) object. Open the F98780R and retrieve each object from F98780R which will put the files into primary enterprise server directories, checkin\source (.c files), checkin\source64 (.c files), checkin\include(.h files) , checkin\include64(.h files) and the bitmaps into the checkin\res directory.

  21. Enterprise Server: (Release 9.2.7.3) The system validates each BSFN and TBLE if there is a record in the F98780R table, the record has a par file and if the .h and/or .c file exist in the checkin location.
  22. Enterprise Server: (Release 9.2.7.3) The system validates each UBE, BSVW, and APPL with F9860->sigtffu1=1 if there is a record in the F98780R table, the record has a par file and for a UBE and BSVW, if the .h file exists in the checkin location and for an APPL, if a bitmap exists.
  23. Enterprise Server: (Release 9.2.7.3) If the validate failed and the Repair Repository flag is set, then the system inserts a record into the F96225 table with package name, pathcode, primary server name, object name, version = “REPAIR”, and operation = “11”.
  24. Enterprise Server: (Release 9.2.7.3) The system checks if any BSFN or TBLE does not have F9860->sigtffu1=1 and is checked in. If found, the system inserts a record into the F96225 table with package name, pathcode, primary server name, object name, version = “REPAIR”, and option = “11”.
  25. Enterprise Server: (Release 9.2.7.3) If the Repair Repository flag is set and there are REPAIR records inserted in F96225, then send message to Deployment Server Services to Repair the objects.
  26. Deployment Server: (Release 9.2.7.3) If the Repair Repository flag is set then the system selects the F96225 records where package name, pathcode, primary server, operation=”11” and status = ERROR. For each record, the system attempts to get the record from the F98780R table, evaluate what is missing and if it is not in the F98780R table, recreate the par file and insert the record back into the F98780R and F98780H tables.
  27. Enterprise Server: (Release 9.2.7.3) If the Repair Repository flag is set then the system selects the F96225 records where package name, pathcode, primary server, operation=”11”, and status = ERROR. It then retrieves and validates each record from the F98780R table if there is a .h or/and .c file. If the validation is successful, the system sets the F96225 record to status=SUCCESS.
  28. Primary Enterprise Server: If there are other servers, the primary enterprise server will contact each of the enterprise servers to start the build process.

  29. Primary Enterprise Server: On the primary enterprise server, the package build checks if there is a difference between the data dictionary items in the database and the data dictionary items in ddict/ddtext. Differences can exist between the type and length fields in the two locations. If there are any differences, then it locks all processes to prevent any UBE to run and waits for all UBEs to finish. It does not affect users on the web. When the locks are obtained, ddict/ddtext/glbtb are deleted in the path code spec directory.

  30. Primary Enterprise Server: The Named Event Rules (NERs) are generated in the checkin\source and checkin\include directories if the system on the Enterprise Server is 32-bit. If the system on the enterprise server is 64-bit, then it will generated the files into the checkin\source64 and checkin\include64 on the primary enterprise server.

  31. Primary Enterprise Server: Moves client or server and server-only .c and .h files (if 32-bit system moves the checkin include and source, if 64-bit system moves the include64 and source64) to the source and include directories respectively on the primary enterprise server.

  32. Primary Enterprise Server: If there are more than one server, then the primary enterprise server moves the .c and .h files from the source and include directories to other enterprise servers under the source and include directories.

  33. Primary Enterprise Server: Compiles business functions on the primary enterprise server to generate .dll, .so, .sl, or .SRVPGM files.

  34. Primary Enterprise Server: IBM i (Starting with Tools Release 9.2.6.0) A new unique library is created in which you can create the SVRPGM, MODULES and FILES. This unique library name is created with the first 2 letters and the last 2 letters of the package, and the job number. For example if the package is DV920FA, then the unique library is created as "DVFA000340". This name is stored in the F9603 file in phpkgdeffut3.
  35. Primary Enterprise Server: If there are multiple servers, the primary enterprise server sends a message to the other servers to start the build of business functions.

  36. Primary Enterprise Server: Builds specs on the primary enterprise server from central objects, placing the results in the package's spec tables, <table name>_<package name> (for example, F98710_DV920FA) in the database. There are 17 tables that are copied from one location to the other. Also, the manifest table is created which holds the name of the package.

  37. Primary Enterprise Server: The Primary Enterprise Server creates the tables F989999 and F989999 in Central Objects location with the name F989999_<package name> and F999999_<package name>.
  38. Primary Enterprise Server: If the client package was also selected, the primary enterprise server transfers the files from the checkin\source, checkin\source64, checkin\include, checkin\include64 and checkin\res to the deployment server package include, source, include64, source64 and res directories.

  39. Primary Enterprise Server: Checks the status of the build and checks if BSFNs are complete. THe primary enterprise server checks the status of other servers if BSFNs are complete.

  40. Primary Enterprise Server: When the dll and specs are finished, if the compress feature for server is enabled, it compresses the .dll, .so, .sl, and .SRVPGM files on the primary enterprise servers. The primary enterprise server sends a message to all other servers to compress.

  41. Other Ent Server: Sends compress files to the primary ent server under <packagename>/<machine type> directory.

  42. Primary Enterprise Server: Transfers the compressed files and the compress.inf file back to the deployment server if initialized was successful under the <packagename>/<machine type> directory.

  43. (Starting with Tools Release 9.2.6.0) Under the deployment location, creates the package name under the bin64 and specs folder in these paths, respectively: <pathcode>\bin64\<package name> and <pathcode>\spec\<package name>.
  44. (Starting with Tools Release 9.2.6.0) Copies the package bin64 directory to the <pathcode>\bin64\<package name> directory.
  45. (Starting with Tools Release 9.2.6.0) Under <pathcode>\spec\<package name>, creates the spec.ini file with the database datasource location for Central Objects

    DV920_DataSource=Central Objects – DV920

  46. Primary Enterprise Server: Check the jde.ini for entry

    [PACKAGE MANIFEST] CreateJAR=Y
    

    (Release 9.2.7.0) and/or check the F96215->PKGBULFUT3 = "Y" which is set when you select Compress Application Component in the compress options tab.

    If this entry is in jde.ini or F96215 with 'Y', then create a E1_APP_xxxx.jar file under the package name directory on the Enterprise Server. This jar file contains the bin64 directory and the spec.ini populated with the package name. The jar file is used by the Server Manager to create a new Enterprise Server Instance.

  47. Primary Enterprise Server: Transfers the server log (svrpkgbuild.log) from each server to the deployment server under 38. <packagename>\serverLogs directory.

  48. Primary Enterprise Server: Transfers the files located under the text directory on the each enterprise server to the deployment server under <packagename>\serverlogs\<server name>\text.

  49. Primary Enterprise Server: Transfers the files located under the CompileLogs directory on the each enterprise server to the deployment server under (packagename>\serverlogs\(server name>\CompileLog.

  50. Primary Enterprise Server: Transfers the files located under the GenerateNER_logs directory on the primary enterprise Server to the deployment server under (packagename>\serverlogs\GenerateNER_logs.

  51. If this is a server only package, the process is complete. However, if client was selected, the system performs the next steps.

  52. Web R9621S UBE: Runs Client Package UBE R9622C to initiate the client package build.

  53. R9622C call B9600186 for client package build.

  54. Web Enterprise server: Creates and sends a message to the deployment server to start the build.

  55. Web enterprise server: Waits for the build to finish.

  56. Deployment Server: Creates the package inf file.

  57. Deployment Server: Compiles the .c and .h files using Busbuild.48.

  58. Deployment Server (Startin with Tools Release 9.2.5.0): Creates the spec.ini with the package name and central object datasource. The spec.ini points to the package tables specs in the central objects datasoure. The local spec database is no longer created.

  59. Deployment Server (Prior to Tools Release 9.2.5.0): Builds the specs from the package's spec tables (table name>_(package name> (for example, F98710_DV920FA) in the database and puts them into the package's local spec database.

  60. Deployment Server: If F00942T-> emdbsrcflg= 1 or 3 then gets all the SBF files from the F98780R repository table. If the field was blank or 0 then copies the files from (pathcode>\sbf directory. Build the BSSV - Business Services.

  61. Deployment Server: Waits for the compile of the business functions, building of the specs, and the building of the BSSV to complete.

  62. Deployment Server: Compresses the directories on the deployment server if compression was selected.

  63. Deployment Server: Sends a message back to enterprise server that client package is complete.

  64. Web enterprise Server: Receives a sessage and completes processing both R9621S and R9622C.