EXODUS Knowledge: Difference between revisions

From NEOSYS Technical Support Wiki
Jump to navigationJump to search
(Created page with "==EXODUS Intro== EXODUS is the new version of NEOSYS. The entire NEOSYS environment has been converted to Linux, C++ and postgres. #EXODUS is comprised of two main sections:...")
 
No edit summary
Line 54: Line 54:




===Convert AREV Program(s) to Exodus==
 
====AREV====
 
===Converting AREV to Exodus===
====Convert Programs====
In AREV: <br>
#Update program source code and check it can be compiled.
#Update program source code and check it can be compiled.
#Ensure the program you want to recompile into exodus has below e.g "*c job" in source code on line 2, col 1
#Ensure the program you want to recompile into exodus has below e.g "*c job" in source code on line 2, col 1
Line 61: Line 64:
#Command: "adecom <programname>"
#Command: "adecom <programname>"


====CYGWIN====
In Cygwin: <br>
#Run "cygdrive/d/exodus/pickos/syncup.sh"    #syncs all decompiled programs to nl19:/backups/current/hosts/win3/pickos/
#Run "cygdrive/d/exodus/pickos/syncup.sh"    #syncs all decompiled programs to nl19:/backups/current/hosts/win3/pickos/


====EXODUS====
In Exodus: <br>
Command explanations:
Command explanations:
#rsync arev decompiled code from sshfs /backups/current/win3/pickos/
#rsync arev decompiled code from sshfs /backups/current/win3/pickos/
  getpickos
  getpickos
#There are four "getpickos" & "compall".
#There are three "getpickos" & "compall".  
cd exodus/service/src
TODO down
 
*cd exodus/service/src getpickos && compall
 
There are three
 
 
=====Exodus Service programs=====
cd exodus/service/src getpickos && compall
 
=====ALL NEOSYS programs=====
*cd ~/neosys/src && getpickos && compall
*cd ~/neosys/src && getpickos && compall
*cd ~/neosys/src && getpickos && compile <progname> or
*cd ~/neosys/src && getpickos && compile <progname> or


Line 86: Line 80:
**INCLUDES: "exodus compall" and "neosys compall" and "copyall" and "restart all"!
**INCLUDES: "exodus compall" and "neosys compall" and "copyall" and "restart all"!
***Use with caution: "cd ~/neosys && compall"
***Use with caution: "cd ~/neosys && compall"


cd exodus/service copyall
cd exodus/service copyall
TODO up


===DICTIONARY ITEMS===
====Convert dictionary items====
Two methods:
Two methods:
a) Quick exodus patch
a) Quick exodus patch (next sync-up from overwrite with win10a version)
b) Update exodus from AREV
b) Update exodus from AREV


====QUICK EXO PATCH====
=====Quick Method=====
#Update dict item in win10a
#Update dict item in win10a
#In exodus run command "e dicta2e"
#In exodus run command "e dicta2e"
Line 131: Line 124:




====FROM AREV====
=====Safe Method=====
=====AREV=====
In AREV: <br>
#Update dict item in win10a
#Update dict item in win10a
#attach adecomc
#attach adecomc
#adecom <dictfile>      (e.g  adecom dict.production.invoices)
#adecom <dictfile>      (e.g  adecom dict.production.invoices)
#base2sql
#base2sql
=====CYGWIN=====
 
In Cygwin: <br>
#/d/exodus/pickos/syncup.sh
#/d/exodus/pickos/syncup.sh
=====EXODUS=====
 
In Exodus: <br>
#neosys/src/getpickos
#neosys/src/getpickos
#doall all import_db R  (DON'T USE U!) - unable to import if database exists!
#doall all import_db R  (DON'T USE U!) - unable to import if database exists!

Revision as of 11:35, 6 July 2021

EXODUS Intro

EXODUS is the new version of NEOSYS. The entire NEOSYS environment has been converted to Linux, C++ and postgres.

  1. EXODUS is comprised of two main sections:
  • EXODUS is a complete conversion of the AREV CRUD and web service framework. (https://github.com/exodusdb/exodusdb)
  • EXODUS NEOSYS is the complete conversion of the NEOSYS Agency AREV programs. (not public git)

TMUX Screens

To create the EXODUS maintenance/programming environment

exodus#: ./tmux.exodus
SCREEN NAME      STANDARD PATH                            PURPOSE
#ex1_root        - /root                                  - general usage 
#exodus          - /root/exodus                           - 
#exodus src      - /root/exodus/exodus/libexodus/exodus   - 
#exo cli         - /root/exodus/cli/src                   - 
#service         - /root/exodus/service                   - 
#ser src         - /root/exodus/service/src               -
#neosys          - /root/neosys                           - ./doall
#neo src         - /root/neosys/src                       -
#hosts           - /root/hosts                            -   
#test src        - /root/exodus/test/src                  - 
#t10             - ~/                                     - 
#t11             - ~/                                     - 
#t12             - ~/                                     - 


Source code

Object code

Dictionaries

The file dictionary records are per database, this means


The TEST process for all database use the same object code stored in /root/lib, whereas all LIVE process use the object code in /root/neo/.



./doall

Debugging NEOSYS EXODUS in gdb

Screen 6: scripts Two scripts can be used to start a process in debug mode. (WARNING: other running TEST or LIVE processes for client will stop during debugging)

  • ./test will use the TEST program object code.
  • ./run will use the LIVE object code.



Converting AREV to Exodus

Convert Programs

In AREV:

  1. Update program source code and check it can be compiled.
  2. Ensure the program you want to recompile into exodus has below e.g "*c job" in source code on line 2, col 1
  3. Command: "attach adecomc" #attaches exodus recompiler/decompiler
  4. Command: "adecom <programname>"

In Cygwin:

  1. Run "cygdrive/d/exodus/pickos/syncup.sh" #syncs all decompiled programs to nl19:/backups/current/hosts/win3/pickos/

In Exodus:
Command explanations:

  1. rsync arev decompiled code from sshfs /backups/current/win3/pickos/
getpickos
  1. There are three "getpickos" & "compall".

TODO down

  • cd exodus/service/src getpickos && compall
  • cd ~/neosys/src && getpickos && compall
  • cd ~/neosys/src && getpickos && compile <progname> or
  • WARNING following command is DANGEROUS! all LIVE object code updated and all LIVE/TEXT process restarted!
    • INCLUDES: "exodus compall" and "neosys compall" and "copyall" and "restart all"!
      • Use with caution: "cd ~/neosys && compall"

cd exodus/service copyall TODO up

Convert dictionary items

Two methods: a) Quick exodus patch (next sync-up from overwrite with win10a version) b) Update exodus from AREV

Quick Method
  1. Update dict item in win10a
  2. In exodus run command "e dicta2e"
  3. Paste below and edit for your case:
#include <exodus/program.h>
programinit()

function main() {
    var originalvalue;

    //edit the string
    var replacevalue="Line Description";

    //check the value of the field TO replace
    //SYNTAX: readv(<record/field> from <filename>, <key> [,field])
    readv(originalvalue from "DICT_JOB_INVOICES", "LINE_TEXT", 3);
    outputl("REPLACE:"^quote(originalvalue)^" with "^quote(replacevalue));

    //uncomment below 2 lines AFTER using check above
    //writev(replacevalue from "DICT_JOB_INVOICES", "LINE_TEXT", 3);
    outputl("REPLACED:"^quote(originalvalue)^" with "^quote(replacevalue));
    return 0;
}

programexit()
  1. Save, exit and make sure complied.
  2. ./doall TEST all bash dicta2e
  3. Check changes on a TEST database.
  4. ./doall LIVE all bash dicta2e


Safe Method

In AREV:

  1. Update dict item in win10a
  2. attach adecomc
  3. adecom <dictfile> (e.g adecom dict.production.invoices)
  4. base2sql

In Cygwin:

  1. /d/exodus/pickos/syncup.sh

In Exodus:

  1. neosys/src/getpickos
  2. doall all import_db R (DON'T USE U!) - unable to import if database exists!
  3. TEST database:
    1. Renew dict items in a test database:
  • doall all/xxx create_testdb
  • doall all/xxx backup_db
    1. Check dictionary item in the <dictfile>.cpp file.