Class lz390


public class lz390 extends Object
Class lz390 implements the linker (linkage editor / binder) part of z390
  • Field Details

    • tz390

      tz390 tz390
      variable
    • msg_id

      String msg_id
      variable
    • lz390_rc

      int lz390_rc
      variable
    • lz390_errors

      int lz390_errors
      variable
    • lz390_recursive_abort

      boolean lz390_recursive_abort
      variable
    • cur_date

      Date cur_date
      variable
    • tod_start

      long tod_start
      variable
    • tod_end

      long tod_end
      variable
    • tot_sec

      long tot_sec
      variable
    • tot_obj_bytes

      int tot_obj_bytes
      variable
    • tot_find_gbl_esd

      int tot_find_gbl_esd
      variable
    • load_esds_only

      boolean load_esds_only
      variable
    • max_obj_esd

      int max_obj_esd
      variable
    • lkd_file_name

      String lkd_file_name
      variable
    • lkd_file

      variable
    • lkd_cmd

      String lkd_cmd
      variable
    • lkd_op

      String lkd_op
      variable
    • lkd_parm

      String lkd_parm
      variable
    • lkd_entry

      String lkd_entry
      variable
    • lkd_entry_loc

      int lkd_entry_loc
      variable
    • lkd_alias

      String lkd_alias
      variable
    • lkd_name

      String lkd_name
      variable
    • obj_file_name

      String obj_file_name
      variable
    • obj_file_bin

      boolean obj_file_bin
      variable
    • obj_bin_id

      byte obj_bin_id
      variable
    • obj_file

      variable
    • obj_eod

      boolean obj_eod
      variable
    • obj_end_entry_esd

      int obj_end_entry_esd
      variable
    • obj_end_entry_loc

      int obj_end_entry_loc
      variable
    • obj_end_entry_last_loc

      int obj_end_entry_last_loc
      variable
    • z390_file

      RandomAccessFile z390_file
      variable
    • lst_file

      File lst_file
      variable
    • lst_file_buff

      BufferedWriter lst_file_buff
      variable
    • tot_name

      int tot_name
      variable
    • max_alias

      int max_alias
      variable
    • tot_alias

      int tot_alias
      variable
    • alias_name

      String[] alias_name
      variable
    • alias_file

      File alias_file
      variable
    • alias_file_name

      String alias_file_name
      variable
    • alias_file_buff

      BufferedWriter alias_file_buff
      variable
    • obj_line

      String obj_line
      variable
    • obj_eof

      boolean obj_eof
      variable
    • mmddyy

      variable
    • hhmmss

      variable
    • log_tod

      boolean log_tod
      variable
    • z390_log_text

      JTextArea z390_log_text
      variable
    • tod_time_limit

      long tod_time_limit
      variable
    • next_time_ins

      int next_time_ins
      variable
    • next_time_check

      int next_time_check
      variable
    • tot_csect

      int tot_csect
      variable
    • tot_entry

      int tot_entry
      variable
    • tot_missing_wxtrn

      int tot_missing_wxtrn
      variable
    • tot_gbl_esd

      int tot_gbl_esd
      variable
    • cur_gbl_esd

      int cur_gbl_esd
      variable
    • cur_gbl_ext

      int cur_gbl_ext
      variable
    • gbl_esd_name

      String[] gbl_esd_name
      variable
    • gbl_esd_loc

      int[] gbl_esd_loc
      variable
    • gbl_esd_type

      byte[] gbl_esd_type
      variable
    • gbl_esd_ext

      byte gbl_esd_ext
      variable
    • gbl_esd_ent

      byte gbl_esd_ent
      variable
    • gbl_esd_wxt

      byte gbl_esd_wxt
      variable
    • loc_ctr

      int loc_ctr
      variable
    • mod_loc_ctr

      int mod_loc_ctr
      variable
    • tot_obj_files

      int tot_obj_files
      variable
    • cur_obj_file

      int cur_obj_file
      variable
    • obj_file_names

      String[] obj_file_names
      variable
    • bin_byte

      byte[] bin_byte
      variable
    • bin_byte_buff

      ByteBuffer bin_byte_buff
      variable
    • ext_found

      boolean ext_found
      variable
    • tot_obj_esd

      int tot_obj_esd
      variable
    • cur_obj_esd

      int cur_obj_esd
      variable
    • obj_esd

      int[] obj_esd
      variable
    • obj_esd_name

      String[] obj_esd_name
      variable
    • obj_esd_loc

      int[] obj_esd_loc
      variable
    • obj_esd_len

      int[] obj_esd_len
      variable
    • obj_esd_type

      String[] obj_esd_type
      variable
    • obj_gbl_esd

      int[] obj_gbl_esd
      variable
    • z390_code_ver

      String z390_code_ver
      variable
    • z390_flags

      String z390_flags
      variable
    • z390_code

      byte[] z390_code
      variable
    • z390_code_buff

      ByteBuffer z390_code_buff
      variable
    • tot_rld

      int tot_rld
      variable
    • rld_loc

      int[] rld_loc
      variable
    • rld_len

      byte[] rld_len
      variable
  • Constructor Details

    • lz390

      public lz390()
      Dummy constructor - no initialization needed
  • Method Details

    • main

      public static void main(String[] args)
      main is entry when executed from command line Create instance of lz390class and pass parms to lz390 like z390 does.
      Parameters:
      args - argument string - same as z390
    • process_lz390

      public int process_lz390(String[] args, JTextArea log_text)
      link 1 or more obj files into single 390 load module Note this may be called directly from z390 GUI or from main when lz370 run from windows command line. if called from main, the log_text will be null and local put_log function will route to console instead of the z390 log window.
      Parameters:
      args - argument string - same as z390
      log_text - argument log text
      Returns:
      standard returncode
    • init_lz390

      private void init_lz390(String[] args, JTextArea log_text)
      1. initialize log routing
      2. set options
      3. compile regular expression parsers
      4. open bal and obj buffered I/O files
      Parameters:
      args - argument string - same as z390
      log_text - argument log text
    • init_arrays

      private void init_arrays()
      initialize arrays using opt_max??? limits
    • exit_lz390

      private void exit_lz390()
      display total errors close files and exit
    • put_stats

      private void put_stats()
      display statistics as comments at end of bal
    • put_stat_line

      private void put_stat_line(String msg)
      routine statistics line to LST or STATS(file)
      Parameters:
      msg - statistics message to report
    • close_files

      private void close_files()
      close obj, lst, err, trl
    • log_error

      private void log_error(int error, String msg)
      issue error msg to log with prefix and increment error total suppress if not gen_obj and not trace
      Parameters:
      error - error number
      msg - error message`
    • abort_error

      private void abort_error(int error, String msg)
      issue error msg to log with prefix and increment error total
      Parameters:
      error - error number
      msg - error message`
    • put_copyright

      private void put_copyright()
      display lz390 version, timestamp, and copyright if running standalone
    • put_log

      private void put_log(String msg)
      Write message to z390_log_text or console if running standalone
      Parameters:
      msg - message text
    • put_lst_line

      private void put_lst_line(String msg)
      put line to listing file
      Parameters:
      msg - listing line content
    • open_files

      private void open_files()
      1. Set trace file name for TRACEL TRACEALL
      2. Open 390 and lst files
    • process_lkd_cmds

      private void process_lkd_cmds()
      process .LNK input commands
      1. INCLUDE name - load obj
      2. ENTRY name - set entry addr
      3. ALIAS name - gen stub
      4. NAME name - rename 390
      If no .LNK try loading primary obj
    • create_alias_390

      private void create_alias_390(String alias, String pgm)
      create ascii 390 file named alias.390 containing ascii pgm name
      Parameters:
      alias - name of the file
      pgm - name of the program
    • resolve_esds

      private void resolve_esds()
      search and load obj files for extrns until all found or no more can be resolved
    • load_obj_file

      private boolean load_obj_file(boolean esds_only)
      load object file esds only or entire file using obj_file_name
      Parameters:
      esds_only - ???
      Returns:
      true if successful
    • get_obj_line

      private void get_obj_line()
      get next esd line from obj file else set obj_eod
    • cvt_obj_bin_to_hex

      private String cvt_obj_bin_to_hex()
      convert binary obj file record in obj_bin to ascii string text format
      Returns:
      "text" data
    • add_gbl_esds

      private void add_gbl_esds()
      add any new global esds found
    • add_gbl_cst

      private void add_gbl_cst(int obj_index1)
      add obj cst to gbl table
      Parameters:
      obj_index1 - ???
    • add_gbl_ref

      private void add_gbl_ref(int obj_index1, byte esd_type)
      add ext or wxt ref to gbl table
      Parameters:
      obj_index1 - ???
      esd_type - esd type
    • add_gbl_ent

      private void add_gbl_ent(int obj_index1)
      add obj entry to gbl table
      Parameters:
      obj_index1 - ???
    • find_gbl_esd

      private boolean find_gbl_esd(String esd_name)
      set cur_gbl_esd to entry for esd_name else return false abort if time exceeded
      Parameters:
      esd_name - name of esd entry
      Returns:
      true if found; false otherwise
    • find_ext_file

      private boolean find_ext_file()
      find next external esds file to load else return false
      Returns:
      true if found; false otherwise
    • open_obj_file

      private boolean open_obj_file(String file)
      open object file and set type else return false
      Parameters:
      file - file designation
      Returns:
      true if successful, false otherwise
    • load_obj_code

      private void load_obj_code()
      load all object code from files and build load module rlds
    • gen_load_module

      private void gen_load_module()
      output 390 load module in binary format skipping rlds for unresolved wxtrn's
    • reset_esds

      private void reset_esds()
      reset ESD global data for next LNK name command