Class mz390


public class mz390 extends Object
mz390 is the macro processor component of z390 which can be called from z390 GUI interface or from command line to read mlc macro source and any referenced macros and copybooks to generate expanded BAL source file.
  • Field Details

    • max_exp_stk

      int max_exp_stk
      variable
    • max_substring_len

      int max_substring_len
      variable
    • max_ap_files

      int max_ap_files
      variable
    • max_lcl_key_root

      int max_lcl_key_root
      variable
    • max_mac_dec_digits

      int max_mac_dec_digits
      variable
    • max_mac_bin_digits

      int max_mac_bin_digits
      variable
    • max_mac_hex_digits

      int max_mac_hex_digits
      variable
    • max_pos_int_plus_one

      String max_pos_int_plus_one
      variable
    • tz390

      tz390 tz390
      variable
    • az390

      az390 az390
      variable
    • msg_id

      String msg_id
      variable
    • trace_id

      String trace_id
      variable
    • mac_branch

      boolean mac_branch
      variable
    • mz390_rc

      int mz390_rc
      variable
    • mz390_errors

      int mz390_errors
      variable
    • mz390_recursive_abort

      boolean mz390_recursive_abort
      variable
    • mac_abort

      boolean mac_abort
      variable
    • batch_asm_error

      boolean batch_asm_error
      variable
    • cur_date

      Date cur_date
      variable
    • cur_date_cal

      GregorianCalendar cur_date_cal
      variable
    • tod_start

      long tod_start
      variable
    • tod_end

      long tod_end
      variable
    • tot_msec

      long tot_msec
      variable
    • ins_rate

      long ins_rate
      variable
    • log_to_bal

      boolean log_to_bal
      variable
    • tot_bal_line

      int tot_bal_line
      variable
    • bal_eof

      boolean bal_eof
      variable
    • tot_mnote_errors

      int tot_mnote_errors
      variable
    • tot_mnote_warning

      int tot_mnote_warning
      variable
    • hwm_mnote_level

      int hwm_mnote_level
      variable
    • bal_text

      String bal_text
      variable
    • bal_text_index0

      int bal_text_index0
      variable
    • bal_text_index1

      int bal_text_index1
      variable
    • bal_text_index2

      int bal_text_index2
      variable
    • tot_macros

      int tot_macros
      variable
    • tot_mac_ins

      int tot_mac_ins
      variable
    • tot_mac_load

      int tot_mac_load
      variable
    • tot_mac_call

      int tot_mac_call
      variable
    • tot_mac_copy

      int tot_mac_copy
      variable
    • mlc_line_end

      int mlc_line_end
      variable
    • bal_file

      File bal_file
      variable
    • temp_file

      File temp_file
      variable
    • bal_file_buff

      BufferedWriter bal_file_buff
      variable
    • aread_op

      boolean aread_op
      variable
    • tot_aread_io

      int tot_aread_io
      variable
    • tot_punch_io

      int tot_punch_io
      variable
    • ap_file_index

      int ap_file_index
      variable
    • ap_file_name

      String ap_file_name
      variable
    • ap_format

      boolean ap_format
      variable
    • ap_noprint

      boolean ap_noprint
      variable
    • ap_nostmt

      boolean ap_nostmt
      variable
    • ap_clockb

      boolean ap_clockb
      variable
    • ap_clockd

      boolean ap_clockd
      variable
    • ap_file_io

      boolean ap_file_io
      variable
    • dat_file_index

      int dat_file_index
      variable
    • pch_file_index

      int pch_file_index
      variable
    • dat_file

      File[] dat_file
      variable
    • dat_file_buff

      BufferedReader[] dat_file_buff
      variable
    • pch_file

      File[] pch_file
      variable
    • pch_file_buff

      BufferedWriter[] pch_file_buff
      variable
    • bal_line

      String bal_line
      variable
    • bal_label

      String bal_label
      variable
    • bal_op

      String bal_op
      variable
    • bal_comments

      String bal_comments
      variable
    • save_bal_op

      String save_bal_op
      variable
    • save_opsyn_index

      int save_opsyn_index
      variable
    • ago_index

      int ago_index
      variable
    • ago_line_index

      int ago_line_index
      variable
    • ago_lab_index

      int ago_lab_index
      variable
    • ago_gbla_index

      int ago_gbla_index
      variable
    • ago_gblc_index

      int ago_gblc_index
      variable
    • aif_op

      boolean aif_op
      variable
    • bal_op_ok

      boolean bal_op_ok
      variable
    • bal_parms

      String bal_parms
      variable
    • mlc_eof

      boolean mlc_eof
      variable
    • end_found

      boolean end_found
      variable
    • actr_limit

      int actr_limit
      variable
    • actr_count

      int actr_count
      variable
    • sdf_sysclock

      SimpleDateFormat sdf_sysclock
      variable
    • sdf_sysdatc

      SimpleDateFormat sdf_sysdatc
      variable
    • sdf_sysdate

      SimpleDateFormat sdf_sysdate
      variable
    • sdf_sysdate_bs2000

      SimpleDateFormat sdf_sysdate_bs2000
      variable
    • sdf_systime

      SimpleDateFormat sdf_systime
      variable
    • sdf_systime_bs2000

      SimpleDateFormat sdf_systime_bs2000
      variable
    • sdf_systime_clockd

      SimpleDateFormat sdf_systime_clockd
      variable
    • log_tod

      boolean log_tod
      variable
    • z390_log_text

      JTextArea z390_log_text
      variable
    • cur_ainsert

      int cur_ainsert
      variable
    • tot_ainsert

      int tot_ainsert
      variable
    • last_ainsert

      int last_ainsert
      variable
    • ainsert_queue

      LinkedList<String> ainsert_queue
      variable
    • last_seq

      String last_seq
      variable
    • cur_seq

      String cur_seq
      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
    • cur_mac_file_path

      String cur_mac_file_path
      variable
    • cur_mac_file

      int cur_mac_file
      variable
    • dynamic_mac_file

      int dynamic_mac_file
      variable
    • dynamic_copy_file

      int dynamic_copy_file
      variable
    • ainsert_copy

      boolean ainsert_copy
      variable
    • ainsert_source

      boolean ainsert_source
      variable
    • ainsert_copy_level

      int ainsert_copy_level
      variable
    • ainsert_copy_index

      int ainsert_copy_index
      variable
    • ainsert_back

      boolean ainsert_back
      variable
    • mac_file

      File[] mac_file
      variable
    • mac_file_buff

      BufferedReader[] mac_file_buff
      variable
    • mac_file_cur_file_num

      int[] mac_file_cur_file_num
      variable
    • mac_file_cur_line_num

      int[] mac_file_cur_line_num
      variable
    • mac_file_errors

      int[] mac_file_errors
      variable
    • mac_ictl_start

      int[] mac_ictl_start
      variable
    • mac_ictl_end

      int[] mac_ictl_end
      variable
    • mac_ictl_cont

      int[] mac_ictl_cont
      variable
    • cur_mac_line_num

      int cur_mac_line_num
      variable
    • cur_mac_file_num

      int cur_mac_file_num
      variable
    • tot_get_mac

      int tot_get_mac
      variable
    • mac_mend_eof

      boolean mac_mend_eof
      variable
    • mac_line

      String mac_line
      variable
    • mac_label

      String mac_label
      variable
    • mac_op

      String mac_op
      variable
    • mac_opcode_index

      int mac_opcode_index
      variable
    • mac_parms

      String mac_parms
      variable
    • proto_label

      String proto_label
      variable
    • proto_pos_parm_tot

      int proto_pos_parm_tot
      variable
    • proto_kwd_parm_tot

      int proto_kwd_parm_tot
      variable
    • proto_op

      String proto_op
      variable
    • proto_parms

      String proto_parms
      variable
    • parm_name

      String parm_name
      variable
    • parm_value

      String parm_value
      variable
    • cics_first_dsa_dsect

      boolean cics_first_dsa_dsect
      variable
    • cics_first_csect

      boolean cics_first_csect
      variable
    • cics_first_end

      boolean cics_first_end
      variable
    • zsm_line_index

      int zsm_line_index
      variable
    • zsm_line_tot

      int zsm_line_tot
      variable
    • max_zsm_lines

      int max_zsm_lines
      variable
    • zsm_gen_line

      String[] zsm_gen_line
      variable
    • zsm_lvl

      int zsm_lvl
      variable
    • max_zsm_lvl

      int max_zsm_lvl
      variable
    • zsm_lvl_type

      byte[] zsm_lvl_type
      variable
    • zsm_type_aelse

      byte zsm_type_aelse
      variable
    • zsm_type_aelseif

      byte zsm_type_aelseif
      variable
    • zsm_type_aend

      byte zsm_type_aend
      variable
    • zsm_type_aentry

      byte zsm_type_aentry
      variable
    • zsm_type_aexit

      byte zsm_type_aexit
      variable
    • zsm_type_aif

      byte zsm_type_aif
      variable
    • zsm_type_acall

      byte zsm_type_acall
      variable
    • zsm_type_acase

      byte zsm_type_acase
      variable
    • zsm_type_awhen

      byte zsm_type_awhen
      variable
    • zsm_type_auntil

      byte zsm_type_auntil
      variable
    • zsm_type_awhile

      byte zsm_type_awhile
      variable
    • zsm_type_acallprm

      byte zsm_type_acallprm
      variable
    • zsm_type_pfx

      String[] zsm_type_pfx
      variable
    • zsm_lvl_tcnt

      int[] zsm_lvl_tcnt
      variable
    • zsm_lvl_aelse

      boolean[] zsm_lvl_aelse
      variable
    • zsm_aif_tot

      int zsm_aif_tot
      variable
    • zsm_acall_tot

      int zsm_acall_tot
      variable
    • zsm_aentry_tot

      int zsm_aentry_tot
      variable
    • zsm_acase_tot

      int zsm_acase_tot
      variable
    • zsm_awhile_tot

      int zsm_awhile_tot
      variable
    • zsm_auntil_tot

      int zsm_auntil_tot
      variable
    • zsm_acallprm_tot

      int zsm_acallprm_tot
      variable
    • zsm_lvl_bcnt

      int[] zsm_lvl_bcnt
      variable
    • zsm_lvl_tend

      boolean[] zsm_lvl_tend
      variable
    • zsm_lvl_ase_ago

      String[] zsm_lvl_ase_ago
      variable
    • zsm_lvl_ase_fst

      int[] zsm_lvl_ase_fst
      variable
    • zsm_lvl_ase_lst

      int[] zsm_lvl_ase_lst
      variable
    • zsm_lvl_ase_blk

      short[] zsm_lvl_ase_blk
      variable
    • zsm_aif_exp

      String zsm_aif_exp
      variable
    • zsm_acall_index

      int zsm_acall_index
      variable
    • zsm_aentry_name_tot

      int zsm_aentry_name_tot
      variable
    • max_zsm_aentry_name

      int max_zsm_aentry_name
      variable
    • zsm_acall_name

      String[] zsm_acall_name
      variable
    • zsm_acall_parm

      String[] zsm_acall_parm
      variable
    • acall_name

      String acall_name
      variable
    • acall_parm

      String acall_parm
      variable
    • zsm_acall_cnt

      int[] zsm_acall_cnt
      variable
    • zsm_aentry_def

      boolean[] zsm_aentry_def
      variable
    • cur_mac_name

      String cur_mac_name
      variable
    • mac_name_index

      int mac_name_index
      variable
    • mac_last_find_index

      int mac_last_find_index
      variable
    • tot_ins

      int tot_ins
      variable
    • tot_mac_name

      int tot_mac_name
      variable
    • load_macro_mend_level

      int load_macro_mend_level
      variable
    • macro_op_found

      boolean macro_op_found
      variable
    • loading_mac

      boolean loading_mac
      variable
    • load_proto_type

      boolean load_proto_type
      variable
    • load_mac_inline_end

      int load_mac_inline_end
      variable
    • find_mac_name_index

      int find_mac_name_index
      variable
    • load_mac_name_index

      int load_mac_name_index
      variable
    • load_type

      byte load_type
      variable
    • load_mlc_file

      byte load_mlc_file
      variable
    • load_mac_file

      byte load_mac_file
      variable
    • load_mac_inline

      byte load_mac_inline
      variable
    • load_mac_exec

      byte load_mac_exec
      variable
    • load_proto_index

      int load_proto_index
      variable
    • load_macro_name

      String load_macro_name
      variable
    • load_file_name

      String load_file_name
      variable
    • mac_name

      String[] mac_name
      variable
    • mac_name_line_start

      int[] mac_name_line_start
      variable
    • mac_name_line_end

      int[] mac_name_line_end
      variable
    • mac_name_lab_start

      int[] mac_name_lab_start
      variable
    • mac_name_lab_end

      int[] mac_name_lab_end
      variable
    • old_mac_line_index

      int old_mac_line_index
      variable
    • new_mac_line_index

      int new_mac_line_index
      variable
    • mac_line_index

      int mac_line_index
      variable
    • bal_xref_index

      int bal_xref_index
      variable
    • tot_mac_line

      int tot_mac_line
      variable
    • mac_file_line

      String[] mac_file_line
      variable
    • mac_file_line_num

      int[] mac_file_line_num
      variable
    • mac_file_num

      int[] mac_file_num
      variable
    • mac_file_next_line

      int[] mac_file_next_line
      variable
    • mac_file_prev_line

      int[] mac_file_prev_line
      variable
    • tot_mac_file_name

      int tot_mac_file_name
      variable
    • mac_file_path

      String[] mac_file_path
      variable
    • mac_file_type

      char[] mac_file_type
      variable
    • skip_store

      boolean skip_store
      variable
    • tot_mac_lab

      int tot_mac_lab
      variable
    • mac_lab_name

      String[] mac_lab_name
      variable
    • mac_lab_index

      int[] mac_lab_index
      variable
    • mac_lab_num

      int[] mac_lab_num
      variable
    • tot_expand

      int tot_expand
      variable
    • expand_inc

      int expand_inc
      variable
    • mac_call_level

      int mac_call_level
      variable
    • mac_call_name_index

      int[] mac_call_name_index
      variable
    • mac_call_return

      int[] mac_call_return
      variable
    • mac_call_sysm_sev

      int[] mac_call_sysm_sev
      variable
    • mac_call_actr

      int[] mac_call_actr
      variable
    • mac_call_sysndx

      int[] mac_call_sysndx
      variable
    • mac_call_pos_start

      int[] mac_call_pos_start
      variable
    • mac_call_pos_tot

      int[] mac_call_pos_tot
      variable
    • mac_call_kwd_start

      int[] mac_call_kwd_start
      variable
    • mac_call_lcl_name_start

      int[] mac_call_lcl_name_start
      variable
    • mac_call_lcl_seta_start

      int[] mac_call_lcl_seta_start
      variable
    • mac_call_lcl_setb_start

      int[] mac_call_lcl_setb_start
      variable
    • mac_call_lcl_setc_start

      int[] mac_call_lcl_setc_start
      variable
    • mac_call_lcl_key_start

      int[] mac_call_lcl_key_start
      variable
    • mac_call_lcl_key_root

      int[] mac_call_lcl_key_root
      variable
    • var_pattern

      Pattern var_pattern
      variable
    • var_match

      Matcher var_match
      variable
    • proto_pattern

      Pattern proto_pattern
      variable
    • proto_match

      Matcher proto_match
      variable
    • exp_pattern

      Pattern exp_pattern
      variable
    • exp_match

      Matcher exp_match
      variable
    • pch_pattern

      Pattern pch_pattern
      variable
    • pch_match

      Matcher pch_match
      variable
    • label_pattern

      Pattern label_pattern
      variable
    • label_match

      Matcher label_match
      variable
    • label_name

      String label_name
      variable
    • symbol_pattern

      Pattern symbol_pattern
      variable
    • symbol_match

      Matcher symbol_match
      variable
    • exec_pattern

      Pattern exec_pattern
      variable
    • exec_match

      Matcher exec_match
      variable
    • signedDecimalPattern

      Pattern signedDecimalPattern
      variable
    • binDigitsPattern

      Pattern binDigitsPattern
      variable
    • decDigitsPattern

      Pattern decDigitsPattern
      variable
    • hexDigitsPattern

      Pattern hexDigitsPattern
      variable
    • label_comma_index

      int label_comma_index
      variable
    • sublist_count

      int sublist_count
      variable
    • tot_pos_parm

      int tot_pos_parm
      variable
    • cur_pos_parm

      int cur_pos_parm
      variable
    • tot_kwd_parm

      int tot_kwd_parm
      variable
    • hwm_pos_parm

      int hwm_pos_parm
      variable
    • hwm_kwd_parm

      int hwm_kwd_parm
      variable
    • mac_call_pos_name

      String[] mac_call_pos_name
      variable
    • mac_call_pos_parm

      String[] mac_call_pos_parm
      variable
    • mac_call_kwd_name

      String[] mac_call_kwd_name
      variable
    • mac_call_kwd_parm

      String[] mac_call_kwd_parm
      variable
    • mac_call_kwd_set

      boolean[] mac_call_kwd_set
      variable
    • val_seta_type

      byte val_seta_type
      variable
    • val_setb_type

      byte val_setb_type
      variable
    • val_setc_type

      byte val_setc_type
      variable
    • var_lcl_loc

      byte var_lcl_loc
      variable
    • var_gbl_loc

      byte var_gbl_loc
      variable
    • var_pos_loc

      byte var_pos_loc
      variable
    • var_kw_loc

      byte var_kw_loc
      variable
    • var_syslist_loc

      byte var_syslist_loc
      variable
    • var_sysalist_loc

      byte var_sysalist_loc
      variable
    • var_seta_type

      byte var_seta_type
      variable
    • var_setb_type

      byte var_setb_type
      variable
    • var_setc_type

      byte var_setc_type
      variable
    • var_parm_type

      byte var_parm_type
      variable
    • var_subscript_type

      byte var_subscript_type
      variable
    • var_sublist_type

      byte var_sublist_type
      variable
    • var_pc_seta_stack_type

      byte var_pc_seta_stack_type
      variable
    • var_pc_seta_sdt_type

      byte var_pc_seta_sdt_type
      variable
    • var_pc_setb_stack_type

      byte var_pc_setb_stack_type
      variable
    • var_pc_setb_sdt_type

      byte var_pc_setb_sdt_type
      variable
    • var_pc_setc_stack_type

      byte var_pc_setc_stack_type
      variable
    • var_pc_setc_sdt_type

      byte var_pc_setc_sdt_type
      variable
    • tot_lcl_name

      int tot_lcl_name
      variable
    • tot_lcl_seta

      int tot_lcl_seta
      variable
    • tot_lcl_setb

      int tot_lcl_setb
      variable
    • tot_lcl_setc

      int tot_lcl_setc
      variable
    • hwm_lcl_name

      int hwm_lcl_name
      variable
    • hwm_lcl_seta

      int hwm_lcl_seta
      variable
    • hwm_lcl_setb

      int hwm_lcl_setb
      variable
    • hwm_lcl_setc

      int hwm_lcl_setc
      variable
    • sysinit_done

      boolean sysinit_done
      variable
    • lcl_sysndx

      int lcl_sysndx
      variable
    • lcl_sysect

      String lcl_sysect
      variable
    • lcl_sysloc

      String lcl_sysloc
      variable
    • lcl_sysstyp

      String lcl_sysstyp
      variable
    • lcl_sysect_setc_index

      int lcl_sysect_setc_index
      variable
    • lcl_sysloc_setc_index

      int lcl_sysloc_setc_index
      variable
    • lcl_sysstyp_setc_index

      int lcl_sysstyp_setc_index
      variable
    • lcl_set_name

      String[] lcl_set_name
      variable
    • lcl_set_type

      byte[] lcl_set_type
      variable
    • lcl_set_start

      int[] lcl_set_start
      variable
    • lcl_set_high

      int[] lcl_set_high
      variable
    • lcl_set_end

      int[] lcl_set_end
      variable
    • lcl_seta

      int[] lcl_seta
      variable
    • lcl_setb

      byte[] lcl_setb
      variable
    • lcl_setc

      String[] lcl_setc
      variable
    • var_subscript_calc

      boolean var_subscript_calc
      variable
    • var_set_array

      boolean var_set_array
      variable
    • var_name

      String var_name
      variable
    • var_name_index

      int var_name_index
      variable
    • var_loc

      byte var_loc
      variable
    • var_type

      byte var_type
      variable
    • set_size

      int set_size
      variable
    • seta_index

      int seta_index
      variable
    • setb_index

      int setb_index
      variable
    • setc_index

      int setc_index
      variable
    • store_name

      String store_name
      variable
    • store_name_index

      int store_name_index
      variable
    • store_inc

      int store_inc
      variable
    • store_loc

      byte store_loc
      variable
    • store_type

      byte store_type
      variable
    • store_seta_value

      int store_seta_value
      variable
    • store_setb_value

      byte store_setb_value
      variable
    • store_setc_value

      String store_setc_value
      variable
    • store_pc_op

      byte store_pc_op
      variable
    • exec_pc_op

      boolean exec_pc_op
      variable
    • tracem_pc_op

      boolean tracem_pc_op
      variable
    • store_subscript

      boolean store_subscript
      variable
    • store_created

      boolean store_created
      variable
    • store_sub

      int store_sub
      variable
    • store_seta_index

      int store_seta_index
      variable
    • store_setb_index

      int store_setb_index
      variable
    • store_setc_index

      int store_setc_index
      variable
    • store_pc_start

      int store_pc_start
      variable
    • store_pc_last

      int store_pc_last
      variable
    • set_name

      String set_name
      variable
    • set_sub

      int set_sub
      variable
    • set_subscript

      boolean set_subscript
      variable
    • seta_value

      int seta_value
      variable
    • setb_value

      byte setb_value
      variable
    • setc_value

      String setc_value
      variable
    • save_setc_value

      String save_setc_value
      variable
    • save_setc_value1

      String save_setc_value1
      variable
    • save_setc_value2

      String save_setc_value2
      variable
    • save_pc_parm_type

      byte save_pc_parm_type
      variable
    • save_seta_value

      int save_seta_value
      variable
    • setc_len

      int setc_len
      variable
    • gbl_sysclock_index

      int gbl_sysclock_index
      variable
    • gbl_sysmac_index

      int gbl_sysmac_index
      variable
    • gbl_sysmac

      String gbl_sysmac
      variable
    • gbl_syslib_index

      int gbl_syslib_index
      variable
    • gbl_sysm_hsev_index

      int gbl_sysm_hsev_index
      variable
    • cur_sysm_hsev

      int cur_sysm_hsev
      variable
    • gbl_sysm_sev_index

      int gbl_sysm_sev_index
      variable
    • gbl_sysstmt_index

      int gbl_sysstmt_index
      variable
    • gbl_systrace_index

      int gbl_systrace_index
      variable
    • sys_file

      File sys_file
      variable
    • sys_job

      String sys_job
      variable
    • sys_dsn

      String sys_dsn
      variable
    • sys_mem

      String sys_mem
      variable
    • sys_vol

      String sys_vol
      variable
    • gbl_syszvsam

      int gbl_syszvsam
      variable
    • tot_gbl_name

      int tot_gbl_name
      variable
    • tot_gbl_seta

      int tot_gbl_seta
      variable
    • tot_gbl_setb

      int tot_gbl_setb
      variable
    • tot_gbl_setc

      int tot_gbl_setc
      variable
    • gbl_set_name

      String[] gbl_set_name
      variable
    • gbl_set_type

      byte[] gbl_set_type
      variable
    • gbl_set_start

      int[] gbl_set_start
      variable
    • gbl_set_high

      int[] gbl_set_high
      variable
    • gbl_set_end

      int[] gbl_set_end
      variable
    • gbl_seta

      int[] gbl_seta
      variable
    • gbl_setb

      byte[] gbl_setb
      variable
    • gbl_setc

      String[] gbl_setc
      variable
    • mac_op_type

      int mac_op_type
      variable
    • max_lcl_key_tab

      int max_lcl_key_tab
      variable
    • tot_lcl_key_tab

      int tot_lcl_key_tab
      variable
    • cur_lcl_key_root

      int cur_lcl_key_root
      variable
    • lcl_key_text

      String lcl_key_text
      variable
    • lcl_key_index

      int lcl_key_index
      variable
    • lcl_key_index_last

      int lcl_key_index_last
      variable
    • lcl_key_hash

      int lcl_key_hash
      variable
    • lcl_key_tab_key

      String[] lcl_key_tab_key
      variable
    • lcl_key_tab_hash

      int[] lcl_key_tab_hash
      variable
    • lcl_key_tab_index

      int[] lcl_key_tab_index
      variable
    • lcl_key_tab_low

      int[] lcl_key_tab_low
      variable
    • lcl_key_tab_high

      int[] lcl_key_tab_high
      variable
    • asc_space_char

      char asc_space_char
      variable
    • exp_text

      String exp_text
      variable
    • exp_text_len

      int exp_text_len
      variable
    • exp_level

      int exp_level
      variable
    • exp_created_var

      boolean[] exp_created_var
      variable
    • exp_end

      boolean exp_end
      variable
    • exp_ok

      boolean exp_ok
      variable
    • exp_term_op

      char exp_term_op
      variable
    • exp_start_op

      char exp_start_op
      variable
    • exp_string_op

      char exp_string_op
      variable
    • exp_string_var

      int exp_string_var
      variable
    • exp_create_set_op

      char exp_create_set_op
      variable
    • exp_var_replacement_mode

      boolean exp_var_replacement_mode
      variable
    • exp_var_replacement_change

      boolean exp_var_replacement_change
      variable
    • exp_alloc_set_mode

      boolean exp_alloc_set_mode
      variable
    • exp_parse_set_mode

      boolean exp_parse_set_mode
      variable
    • exp_alloc_set_created

      boolean exp_alloc_set_created
      variable
    • alloc_size

      int alloc_size
      variable
    • min_alloc_size

      int min_alloc_size
      variable
    • exp_parse_set_type

      byte exp_parse_set_type
      variable
    • exp_parse_set_loc

      byte exp_parse_set_loc
      variable
    • exp_parse_set_name

      String exp_parse_set_name
      variable
    • exp_parse_set_subscript

      boolean exp_parse_set_subscript
      variable
    • exp_parse_set_created

      boolean exp_parse_set_created
      variable
    • exp_parse_set_sub

      int exp_parse_set_sub
      variable
    • exp_parse_set_name_index

      int exp_parse_set_name_index
      variable
    • exp_sublst_op

      byte exp_sublst_op
      variable
    • exp_substring_op

      char exp_substring_op
      variable
    • exp_subscript_op

      char exp_subscript_op
      variable
    • exp_start_index

      int exp_start_index
      variable
    • exp_next_index

      int exp_next_index
      variable
    • exp_type

      byte exp_type
      variable
    • exp_seta

      int exp_seta
      variable
    • exp_setb

      byte exp_setb
      variable
    • exp_setc

      String exp_setc
      variable
    • exp_set_compare

      byte exp_set_compare
      variable
    • seta_value1

      int seta_value1
      variable
    • seta_value2

      int seta_value2
      variable
    • setb_value1

      byte setb_value1
      variable
    • setb_value2

      byte setb_value2
      variable
    • setc_value1

      String setc_value1
      variable
    • setc_value2

      String setc_value2
      variable
    • val_type

      byte val_type
      variable
    • val_type1

      byte val_type1
      variable
    • val_type2

      byte val_type2
      variable
    • exp_token

      String exp_token
      variable
    • exp_prev_op

      String exp_prev_op
      variable
    • exp_prev_substring

      boolean exp_prev_substring
      variable
    • exp_prev_first

      char exp_prev_first
      variable
    • exp_prev_class

      byte exp_prev_class
      variable
    • exp_next_first

      char exp_next_first
      variable
    • exp_next_class

      byte exp_next_class
      variable
    • exp_var_index

      int exp_var_index
      variable
    • exp_var_pushed

      boolean exp_var_pushed
      variable
    • exp_var_last

      boolean exp_var_last
      variable
    • tot_exp_stk_var

      int tot_exp_stk_var
      variable
    • tot_exp_stk_op

      int tot_exp_stk_op
      variable
    • exp_stk_val_type

      byte[] exp_stk_val_type
      variable
    • exp_stk_seta

      int[] exp_stk_seta
      variable
    • exp_stk_setb

      byte[] exp_stk_setb
      variable
    • exp_stk_setc

      String[] exp_stk_setc
      variable
    • exp_stk_var_type

      byte[] exp_stk_var_type
      variable
    • exp_stk_var_loc

      byte[] exp_stk_var_loc
      variable
    • exp_stk_var_name_index

      int[] exp_stk_var_name_index
      variable
    • exp_next_op

      String exp_next_op
      variable
    • exp_check_prev_op

      boolean exp_check_prev_op
      variable
    • exp_stk_op

      String[] exp_stk_op
      variable
    • exp_stk_op_class

      byte[] exp_stk_op_class
      variable
    • exp_class_add_sub

      byte exp_class_add_sub
      variable
    • exp_class_mpy_div

      byte exp_class_mpy_div
      variable
    • exp_class_open

      byte exp_class_open
      variable
    • exp_class_cls_sub

      byte exp_class_cls_sub
      variable
    • exp_class_str_op

      byte exp_class_str_op
      variable
    • exp_class_term

      byte exp_class_term
      variable
    • exp_class_comp

      byte exp_class_comp
      variable
    • exp_class_str_sub1

      byte exp_class_str_sub1
      variable
    • exp_class_str_sub2

      byte exp_class_str_sub2
      variable
    • exp_class_oper

      byte exp_class_oper
      variable
    • exp_class_not

      byte exp_class_not
      variable
    • exp_class_and

      byte exp_class_and
      variable
    • exp_class_or

      byte exp_class_or
      variable
    • exp_class_xor

      byte exp_class_xor
      variable
    • exp_class_create_set

      byte exp_class_create_set
      variable
    • tot_classes

      int tot_classes
      variable
    • exp_action

      int[] exp_action
      variable
    • pcl_mru

      int pcl_mru
      variable
    • pcl_mru_next

      int[] pcl_mru_next
      variable
    • pcl_mru_prev

      int[] pcl_mru_prev
      variable
    • pcl_lru

      int pcl_lru
      variable
    • pcl_start

      int[] pcl_start
      variable
    • pcl_end

      int[] pcl_end
      variable
    • tot_pc_gen

      int tot_pc_gen
      variable
    • tot_pc_exec

      int tot_pc_exec
      variable
    • tot_pc_gen_opt

      int tot_pc_gen_opt
      variable
    • tot_pc_exec_opt

      int tot_pc_exec_opt
      variable
    • tot_pcl_exec

      int tot_pcl_exec
      variable
    • tot_pcl_gen

      int tot_pcl_gen
      variable
    • tot_pcl_reuse

      int tot_pcl_reuse
      variable
    • pc_loc

      int pc_loc
      variable
    • pc_loc_prev

      int pc_loc_prev
      variable
    • pc_loc_next

      int pc_loc_next
      variable
    • pc_free

      int pc_free
      variable
    • pc_parm_type

      byte pc_parm_type
      variable
    • pc_op

      byte[] pc_op
      variable
    • pc_var_type

      byte[] pc_var_type
      variable
    • pc_var_loc

      byte[] pc_var_loc
      variable
    • pc_sysndx

      int[] pc_sysndx
      variable
    • pc_seta

      int[] pc_seta
      variable
    • pc_setc

      String[] pc_setc
      variable
    • pc_next

      int[] pc_next
      variable
    • pc_req_opt

      boolean[] pc_req_opt
      variable
    • pc_aborted

      boolean pc_aborted
      variable
    • pc_gen_exp

      boolean pc_gen_exp
      variable
    • pc_pushc_pending

      boolean pc_pushc_pending
      variable
    • pc_concat_pending

      boolean pc_concat_pending
      variable
    • pc_push_var_op

      byte pc_push_var_op
      variable
    • pc_push_var_setc_value

      String pc_push_var_setc_value
      variable
    • pc_sublst_value1

      String pc_sublst_value1
      variable
    • pc_concat_setc_value1

      String pc_concat_setc_value1
      variable
    • pc_concat_setc_value

      String pc_concat_setc_value
      variable
    • pc_pushc_setc_value

      String pc_pushc_setc_value
      variable
    • pc_pusha_pending

      boolean pc_pusha_pending
      variable
    • pc_pusha_seta_value

      int pc_pusha_seta_value
      variable
    • pc_pusha_setc_value

      String pc_pusha_setc_value
      variable
    • pc_op_ago

      byte pc_op_ago
      variable
    • pc_op_aif

      byte pc_op_aif
      variable
    • pc_op_pushv

      byte pc_op_pushv
      variable
    • pc_op_pushvs

      byte pc_op_pushvs
      variable
    • pc_op_pusha

      byte pc_op_pusha
      variable
    • pc_op_pushc

      byte pc_op_pushc
      variable
    • pc_op_concat

      byte pc_op_concat
      variable
    • pc_op_storv

      byte pc_op_storv
      variable
    • pc_op_storvs

      byte pc_op_storvs
      variable
    • pc_op_storvn

      byte pc_op_storvn
      variable
    • pc_op_add

      byte pc_op_add
      variable
    • pc_op_sub

      byte pc_op_sub
      variable
    • pc_op_mpy

      byte pc_op_mpy
      variable
    • pc_op_div

      byte pc_op_div
      variable
    • pc_op_compeq

      byte pc_op_compeq
      variable
    • pc_op_compge

      byte pc_op_compge
      variable
    • pc_op_compgt

      byte pc_op_compgt
      variable
    • pc_op_comple

      byte pc_op_comple
      variable
    • pc_op_complt

      byte pc_op_complt
      variable
    • pc_op_compne

      byte pc_op_compne
      variable
    • pc_op_ucomp

      byte pc_op_ucomp
      variable
    • pc_op_dup

      byte pc_op_dup
      variable
    • pc_op_sublst

      byte pc_op_sublst
      variable
    • pc_op_substr

      byte pc_op_substr
      variable
    • pc_op_inc

      byte pc_op_inc
      variable
    • pc_op_dec

      byte pc_op_dec
      variable
    • pc_op_pushd

      byte pc_op_pushd
      variable
    • pc_op_pushds

      byte pc_op_pushds
      variable
    • pc_op_stord

      byte pc_op_stord
      variable
    • pc_op_stords

      byte pc_op_stords
      variable
    • pc_op_pfx_a

      byte pc_op_pfx_a
      variable
    • pc_op_pfx_d

      byte pc_op_pfx_d
      variable
    • pc_op_pfx_i

      byte pc_op_pfx_i
      variable
    • pc_op_pfx_k

      byte pc_op_pfx_k
      variable
    • pc_op_pfx_l

      byte pc_op_pfx_l
      variable
    • pc_op_pfx_n

      byte pc_op_pfx_n
      variable
    • pc_op_pfx_o

      byte pc_op_pfx_o
      variable
    • pc_op_pfx_s

      byte pc_op_pfx_s
      variable
    • pc_op_pfx_t

      byte pc_op_pfx_t
      variable
    • pc_op_pushs

      byte pc_op_pushs
      variable
    • pc_op_stori

      byte pc_op_stori
      variable
    • pc_op_a2b

      byte pc_op_a2b
      variable
    • pc_op_a2c

      byte pc_op_a2c
      variable
    • pc_op_a2d

      byte pc_op_a2d
      variable
    • pc_op_a2x

      byte pc_op_a2x
      variable
    • pc_op_and

      byte pc_op_and
      variable
    • pc_op_b2a

      byte pc_op_b2a
      variable
    • pc_op_b2c

      byte pc_op_b2c
      variable
    • pc_op_b2d

      byte pc_op_b2d
      variable
    • pc_op_b2x

      byte pc_op_b2x
      variable
    • pc_op_c2a

      byte pc_op_c2a
      variable
    • pc_op_c2b

      byte pc_op_c2b
      variable
    • pc_op_c2d

      byte pc_op_c2d
      variable
    • pc_op_c2x

      byte pc_op_c2x
      variable
    • pc_op_d2a

      byte pc_op_d2a
      variable
    • pc_op_d2b

      byte pc_op_d2b
      variable
    • pc_op_d2c

      byte pc_op_d2c
      variable
    • pc_op_d2x

      byte pc_op_d2x
      variable
    • pc_op_dclen

      byte pc_op_dclen
      variable
    • pc_op_dcval

      byte pc_op_dcval
      variable
    • pc_op_dequote

      byte pc_op_dequote
      variable
    • pc_op_double

      byte pc_op_double
      variable
    • pc_op_find

      byte pc_op_find
      variable
    • pc_op_index

      byte pc_op_index
      variable
    • pc_op_isbin

      byte pc_op_isbin
      variable
    • pc_op_isdec

      byte pc_op_isdec
      variable
    • pc_op_ishex

      byte pc_op_ishex
      variable
    • pc_op_issym

      byte pc_op_issym
      variable
    • pc_op_lower

      byte pc_op_lower
      variable
    • pc_op_not

      byte pc_op_not
      variable
    • pc_op_or

      byte pc_op_or
      variable
    • pc_op_upper

      byte pc_op_upper
      variable
    • pc_op_signed

      byte pc_op_signed
      variable
    • pc_op_sla

      byte pc_op_sla
      variable
    • pc_op_sll

      byte pc_op_sll
      variable
    • pc_op_sra

      byte pc_op_sra
      variable
    • pc_op_srl

      byte pc_op_srl
      variable
    • pc_op_sattra

      byte pc_op_sattra
      variable
    • pc_op_sattrp

      byte pc_op_sattrp
      variable
    • pc_op_x2a

      byte pc_op_x2a
      variable
    • pc_op_x2b

      byte pc_op_x2b
      variable
    • pc_op_x2c

      byte pc_op_x2c
      variable
    • pc_op_x2d

      byte pc_op_x2d
      variable
    • pc_op_xor

      byte pc_op_xor
      variable
    • pc_op_gbl

      byte pc_op_gbl
      variable
    • pc_op_desc

      String[] pc_op_desc
      variable
    • pc_loc_list

      int[] pc_loc_list
      variable
    • pcl_inc_list

      byte[] pcl_inc_list
      variable
    • pcl_dec_list

      byte[] pcl_dec_list
      variable
    • pc_trace_gen

      boolean pc_trace_gen
      variable
    • pc_trace_sub

      String pc_trace_sub
      variable
  • Constructor Details

    • mz390

      public mz390()
      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 mz390 class and pass parms to mz390 like z390 does.
      Parameters:
      args - argument string - same as z390
    • process_mz390

      public void process_mz390(String[] args, JTextArea log_text)
      expand macro MLC source file to BAL source file Note this may be called directly from z390 GUI or from main when mz370 run from windows command line. if called from main, the log_text object will be null and local put_log function will route to console instead of the z390 log window.
      Parameters:
      args - argument string
      log_text - GUI-related object where log messages are sent
    • init_mz390

      private void init_mz390(String[] args, JTextArea log_text)
      1. initialize log routing
      2. set options
      3. open MLC and BAL buffered I/O files
      Parameters:
      args - argument string
      log_text - GUI-related object where log messages are sent
    • add_zstrmac_key

      private void add_zstrmac_key(String opcode, byte index)
      add hash indexed keys for ZSTRMAC opcodes
      Parameters:
      opcode - ZSTRMAC opcode
      index - associated index value
    • compile_patterns

      private void compile_patterns()
      init regular expression patterns and issue error if failure
    • open_files

      private void open_files()
      1. Set trace_file_name
      2. Open BAL file if option BAL
    • process_mac

      private void process_mac()
      execute mlc as open code macro expanding any macros found and outputing all model statements to BAL file after substitution of any parms and macro variables.
    • set_mlc_eof

      private void set_mlc_eof()
      set mlc_eof and notify az390 to wrapup if running
    • load_mac_file

      private void load_mac_file()
      1. load it if found
      2. add macro entry or dummy entry
    • load_mac

      private void load_mac()
      load macro from file or inline and set load_mac_name_index else abort with error
      • load type 0 = MLC file
        • no MACRO, no proto-type, end on END
        • parse EXEC statement with space delimited
        • parms and create exec macro parms
      • load type 1 = MAC file
        • MACRO, MEND, and verify proto-type name = file name
      • load type 2 = inline macro
        • MACRO, MEND, and proto-type defines macro name
      1. Return -2 if file not found
      2. Concatentate any continuations indicated by non-blank in position 72. Each continuation must start at position 16.
      3. Ignore .* macro comments
      4. Define any macro labels .xxx and check references.
      5. if continue char in 72, delimit at first ", " after 16.
      6. initial program MLC loads as 0 mac name entry
      7. Load inline macros without processing labels etc. and includes are not expanded until inline load
      8. Insert MLC copy profile copybook if option PROFILE(copybook) specified.
      9. Expand the following structured macro code extensions if ZSTRMAC:
        1. AIF, AELSE, AELSEIF, AEND
        2. ACALL, ACALLPRM, AENTRY, AEXIT. AEND
        3. AWHILE, AUNTIL, AEXIT, AEND
        4. ACASE, AWHEN, AELSE, AEXIT, AEND
        5. Note ACALL generates ACALLPRM call to reset parms for AENTRY
      Notes:
      1. At end of MLC load, turn off lookahead mode for ordinary symbols.
    • check_undefined_aentry

      private void check_undefined_aentry()
      issue error for any ACALL to undefined AENTRY routine.
    • check_past_mend

      private void check_past_mend()
      scan for macro statement following final MEND ignoring comments
    • set_ictl

      private void set_ictl()
      set ICTL start, end, cont columns
    • load_open_macro_file

      private void load_open_macro_file()
      open file for MLC or macro file else abort with error
    • set_default_ictl

      private void set_default_ictl()
      set default ICTL for macro/copy
    • load_proto_type

      private void load_proto_type()
      process proto-type during loading of MLC or macro
    • load_macro_exec

      private void load_macro_exec()
      parse space delimited parms for exec sql cics or dli and replace with comma delimited parms for EXEC macro processing.

      Notes:
      1. Use the proto_pattern to handle all valid macro assembler parm expressions including quoted strings with spaces.
    • load_macro_ago_aif_refs

      private void load_macro_ago_aif_refs()
      check ago and aif references during loading
    • load_macro_label_sym

      private void load_macro_label_sym()
      During MLC or macro loading:
      1. Define macro labels .xxx
      2. If MLC lookahead, define ordinary symbol attribute and length if available using az390 DS, DC, and EQU processing services. Note call_az390 surpresses sending any BAL trace comments during lookahead.
      3. remove .* macro comments
    • set_lookahead_sym_attr_len

      private void set_lookahead_sym_attr_len()
      if ASM, set symbol type and length during MLC macro loading in lookahead mode

      Notes:
      1. Called during macro load to define all ordinary symbols in open code allowing forward reference to type and length if available during macro execution. The sym_attr and sym_len are stored in AZ390 symbol table with sym_def = -1 indicating lookahead mode definition. Duplicates are ignored as there may be altermate macro paths.
      2. During macro execution, AZ390 recalcs all symbols for use during remained for macro expansion.
      3. sym_attr = 'U' and sym_len = 1 default at first create.
      4. sym_def = -1 for lookahead and 0 for forward ref during macro expansion. AZ390 source line references start at 1 as of RPI 415.
      5. Note during macro execution, macro call label field symbol will be changed to sym_attr 'M' if undefined or type 'U' and will remain with sym_def = -1 to allow redefine as ordinary symbol via BAL expansion.
    • init_lookahead_az390

      private void init_lookahead_az390()
      init for mz390 calls to EQU/DS/DC processing routines during lookahead
    • add_mac

      private void add_mac(String macro_name)
      add macro file entry and set mac_name_index else abort
      Parameters:
      macro_name - macro name
    • update_mac_key_index

      private void update_mac_key_index(int index, String name)
      add or update macro key index
      Parameters:
      index - macro index
      name - macro name
    • set_mac_file_num

      private void set_mac_file_num()
      find/add file name and set cur_mac_file_num
    • add_mac_label

      private void add_mac_label(int mac_index, String mac_label, int lab_line)
      add macro label and check for duplicates during macro loading
      Parameters:
      mac_index - index of macro
      mac_label - label
      lab_line - line number
    • check_undefined_labs

      private void check_undefined_labs(int mac_index)
      issue errors for any undefined macro labels.
      Parameters:
      mac_index - iundex of macro
    • load_get_mac_line

      private void load_get_mac_line()
      get next mac line from ainsert, file, or inline
      1. oncatenating continuation lines and parse mac line
      2. runcate continued lines at first ", "
      3. ead nested copy files
    • load_get_zstrmac_file_line

      private void load_get_zstrmac_file_line()
      get next source line to load or insert from nexted copy files
    • load_get_mac_file_line

      private void load_get_mac_file_line()
      get next mac_line from file else set mac_line null
    • store_mac_line

      private void store_mac_line()
      1. save mac_line during input for use by log_error
      2. update &SYSSTMT
    • zsm_gen_lines

      private void zsm_gen_lines()
      Generate ZSTRMAC structured macro code lines with same line number as original statement in zsm_lines and set zsm_line_tot
    • zsm_acs_set_blk

      private boolean zsm_acs_set_blk()
      process AWHEN index value parms and set current block # in value block array. The valid values are 0-255, C'?', X'??', or range (v1,v2) separated by commas
      Returns:
      boolean value
    • zsm_acs_chk_val

      private boolean zsm_acs_chk_val(int val)
      limit check AWHEN value and return false if not 0-255. Also set low and high value
      Parameters:
      val - value to check
      Returns:
      true if value in range 0-255; false otherwise
    • zsm_find_aif_exp

      private boolean zsm_find_aif_exp()
      set zsm_aif_exp to (...) else return false
      Returns:
      true or false
    • zsm_find_acall_name

      private boolean zsm_find_acall_name()
      find ACALL name or add new name with ACALL_ prefix and set zsm_acall_index else false and set &name parms else null
      Returns:
      boolean indicating success
    • insert_acall_parms

      private void insert_acall_parms()
      insert &(acall_name)(parm#) SETC 'parm' for each parm in acall name(p1,p2,,pn)
    • insert_acall_set

      private void insert_acall_set(String line)
      insert acall parm created setc variables into MLC
      Parameters:
      line - - ???
    • parse_mac_line

      private void parse_mac_line()
      1. parse mac line into label, op, parms
      2. open copybook file if found
      3. if cics insert prolog and epilog
    • open_mac_copy_file

      private void open_mac_copy_file()
      open copy file specified in mac_parms Notes:
      1. Expand during MLC and macro loads
      2. Insert using AINSERT during execution after var substitution on name
      3. Issue error on copy file not found if not loading MLC/MAC
    • open_load_file

      private void open_load_file(String new_mac_name)
      open file for loading mac/copy file
      Parameters:
      new_mac_name - name of the macro or copy file to be loaded
    • put_bal_line

      private void put_bal_line(String text_line)
      1. strip .mac labels if ASM and not inline macro code
      2. set symbol attr if mfc
      3. optional reformatting
      4. optional pass to az390
      5. optional write to BAL
      Parameters:
      text_line - input source line
    • call_az390_pass_bal_line

      private void call_az390_pass_bal_line(String text_line)
      pass text_line to az390 and update the az390 copy of mz390_errors
      Parameters:
      text_line - surce line to be handed over to az390 for assembly
    • reformat_bal

      private String reformat_bal()
      reformat text_line from tz390.split at 10 and operands at 16 if possible
      Returns:
      reformatted source text
    • parse_bal_line

      private void parse_bal_line()
      1. Substitute any macro variables found
      2. Set bal_label, bal_op, bal_parms
    • split_bal_line

      private void split_bal_line()
      split bal_line into bal_label, bal_op, and bal_parms
    • replace_vars

      private String replace_vars(String text, boolean reduce, boolean check_label)
      1. Replace all variables in text and set var_replacement if changed
      2. if reduce then replace && with & and '' with '
      3. If check_label then verify label field valid
      Notes:
      1. Per RPI 241 ignore undefined &vars and let az390 report error if not in comment
      2. Per RPI 502 remove undefined var which may cause null parm error in az390
      3. Replace null single parm with comma if comments follow
      Parameters:
      text - source text
      reduce - indicates whether or not to reduce double ampersands and quotes
      check_label - indicates whether or not to validate the label field
      Returns:
      result after substitution and - optional - reduction
    • find_var

      private boolean find_var(String name)
      find parm or set variable and return true if found. Also set the following:
      1. var_type = seta|setb|setc|parm (1-4)
      2. var_loc = lcl|gbl|pos|kw|syslist
      3. setc_value = parm value if not syslist
      4. var_name_index = index to name found else -1
      5. var_name = variable name
      Notes:
      1. caller must handle subscript or sublist in exp or bal parm processing
      2. First search parms and then set variables
      3. Convert to upper case
      Parameters:
      name - variable name
      Returns:
      true if found, false otherwise
    • get_sublist_count

      private int get_sublist_count(String list)
      return number of parms in sublist
      Parameters:
      list - sublist to inspect
      Returns:
      nr of parameters counted
    • get_sublist

      private String get_sublist(String list, int sublist_index)
      1. parse list and return sublist requested or empty list
      2. incr sublist_count for each , at level 1
      Parameters:
      list - list to extract from
      sublist_index - starting point (?)
      Returns:
      string value of extracted sublist
    • find_opcode_type

      private int find_opcode_type(String opcode)
      set mac_opcode_index and return opcode type:
      • -1 - not found in opcode table
      • 0 - comment (no opcode)
      • 1-100 - machine type
      • 100-200 - assembler type
      • 200+ - macro operation
      Notes:
      1. tz390 opcode table used to find opcode type.
      2. Return 0 for comment
      Parameters:
      opcode - opcode string value (i.e. mnemonic)
      Returns:
      index value of the mnemonic definition in tz390 tables.
    • exp_ago

      private void exp_ago()
      branch to specified macro label or branch on index using list of labels Notes:
      1. For simple branch, pc_start is set to negative index of new line and no pc code required.
      2. For indexed branch, pc_op_ago opcode is generated with pc_seta pointing to GBLA array with the following:
        1. First entry is start of GBLC macro label array if TRACEP on else -1 if NOTRACEP. Note value of zero indicates error during construction.
        2. Maximum index value from 1 to n
        3. mac_line_index for each label.
      3. Key index to AGO GBLA array is stored using "A:mac_line_index to retrieve array if AGO is reused.
    • trace_break

      private void trace_break()
      skip line in trace if not in suppressed copy code
    • exp_ago_branch

      private int exp_ago_branch(int lab_index)
      return new_mac_line_index and set label_name for next ago target label.
      Parameters:
      lab_index - ???
      Returns:
      index value of label
    • exec_aif

      private void exec_aif()
      execute 1 or more AIF/AIFB tests and branch if true.
    • exec_mac_op

      private void exec_mac_op()
      execute macro operation (set,aif, ago, etc.) Note case index values must match mac_op_name array values.
    • alloc_set

      private void alloc_set(byte alloc_set_type, int alloc_set_loc)
      allocate set scalar,array, or created set variables on first occurence.

      Notes:
      1. Duplicates ignored and expand used to handle any subscript beyond first alloc.
      Parameters:
      alloc_set_type - var_seta_type | var_setb_type | var_setc_type
      alloc_set_loc - lcl_set | gbl_set
    • calc_seta_exp

      private int calc_seta_exp(String text, int text_index)
      evaluate seta expression
      Parameters:
      text - textual value of expression from source code
      text_index - ???
      Returns:
      integer value from evaluating the seta expression
    • calc_setb_exp

      private byte calc_setb_exp(String text, int text_index)
      evaluate setb expression
      Parameters:
      text - textual value of expression from source code
      text_index - ???
      Returns:
      boolean value from evaluating the setb expression
    • calc_setc_exp

      private String calc_setc_exp(String text, int text_index)
      evaluate setc expression
      Parameters:
      text - textual value of expression from source code
      text_index - ???
      Returns:
      string value from evaluating the setc expression
    • get_set_target

      private void get_set_target(byte alloc_set_type)
      set set store info form bal_label

      Notes:
      1. Sets store_pc_op to storv, storvs, stord, or stords. Then seta, setb, setc changes it to storvn for multiple values.
      Parameters:
      alloc_set_type - type indicator (?)
    • store_seta_value

      private void store_seta_value(byte op)
      store seta_value or inc/dec at store loc (shared by exp and pc)
      Parameters:
      op - internal operation code
    • store_setb_value

      private void store_setb_value()
      store setb_value at store loc (shared by exp and pc)
    • store_setc_value

      private void store_setc_value()
      store setc string at store loc (shared by exp and pc)
    • get_aread_string

      private String get_aread_string()
      read next mlc source line or next record from file specified in DDNAME=, DSNAME=, or pgmname.dat
      1. DDNAME= is extention to HLL assembler where external variable defines file to read for AREAD.
      2. DSNAME= is extention to HLL assembler where macro variable defines file to read for AREAD.
      Notes:
      1. Only DDNAME or DSNAME can be coded
      2. empty lines (CR,LF) returned as single space " "
      3. end of file returns 0 length string ""
      4. Options NOPRINT and NOSTMT ignored
      Returns:
      string read by AREAD operation
    • get_next_source_line

      private String get_next_source_line()
      return next source line from mac_file or AINSERT queue for use by AREAD
      Returns:
      string with next source line
    • set_length_80

      private String set_length_80(String text)
      set AREAD and PUNCH text lengths to 80 for HLASM compatibility if ASM and NOALLOW
      Parameters:
      text - record data to be padded
      Returns:
      string with data padded to 80 characters
    • set_aread_punch_options

      private void set_aread_punch_options(String parms, String file_dir, String file_type)
      1. set ap_file_index and ap_file_name from the following AREAD or PUNCH parms:
        1. DDNAME= environment variable to get file name
        2. DSNAME= explicit file name string
        3. DSN= epxlicit file name string (alias)
        4. ID=n file index 0-9 (0 is default) and set ap_file_io if file I/O requested
      2. Set AREAD option flags for NOPRINT, NOSTMT, CLOCKB, CLOCKD
      3. Set PUNCH option FORMAT
      Parameters:
      parms - parameter string
      file_dir - directory or path
      file_type - file type (extension)
    • get_ddname_file_name

      private String get_ddname_file_name(String ddname)
      verify ddname is defined as environment variable pointing to valid file and return full path else abort
      Parameters:
      ddname - ddname
      Returns:
      file location (path, name, extension)
    • put_pch_line

      private void put_pch_line(String pch_parms)
      write PUNCH 'text' to pch file
      1. If ,DDNAME= follows 'text' write to specified file instead of default filename.pch
      2. If ,DSNAME= follows 'text' write to specified file instead of default filename.pch
      3. If FORMAT specified as extended option on PUNCH, the output will format continuations like MLC
      Parameters:
      pch_parms - applicable parameters
    • calc_exp

      private boolean calc_exp(String text, int text_index)
      parse set/aif/variable expression and return true if ok and set set exp_var_index to result Notes:
      1. If parse_set_mode then exit without error true/false indicating if set variable exists or not
      2. If var_replacement_mode, exit after retrieving first variable and before proceeding to next operator, and ignore var not found
      3. Always turn off parse_set_mode at exit
      4. Generate pseudo code for repeat executions
      Parameters:
      text - source string for expression to evaluate
      text_index - ???
      Returns:
      true if success, false otherwise
    • exp_set_prev_op

      private void exp_set_prev_op()
      set exp_prev_op from stack or set to exp_start_op (same as exp_term_op) also set exp_prev_class and exp_prev_first
    • exp_set_next_op

      private void exp_set_next_op()
      get next expression operator and push preceding variables on stack. Also set the following:
      1. exp_token
      2. exp_next_first
      3. exp_next_op (uppercase)
      4. exp_next_class
      Notes:
      1. push zero for unary +- based on previous setting of exp_var_last
      2. push ordinary symbols starting with A-Z$@#_ as SDT string assuming there preceding T' type oper
    • exp_set_term_op

      private void exp_set_term_op()
      set next token and op to exp_term_op
    • exp_set_next_token

      private void exp_set_next_token()
      set op from exp_next_op
    • exp_perform_op

      private void exp_perform_op()
      perform next exp action based on precedence of exp_next_op and exp_prev_op

      Notes:
      1. If substring set prev_substring else reset after operation. Used by exp_substring.
    • exp_perform_prefix_op

      private void exp_perform_prefix_op()
      perform prefix operator replacing value on stack with result value
    • exp_unary_op

      private void exp_unary_op()
      execute unary operator U+ or U-
    • exec_pc_add

      private void exec_pc_add()
      add top of stack value to prev. value and pop the top stack value off
    • exec_pc_sub

      private void exec_pc_sub()
      sub top of stack value from prev. value and pop the top stack value off
    • exec_pc_mpy

      private void exec_pc_mpy()
      multiply top of stack value to prev. value and pop the top stack value off
    • exec_pc_div

      private void exec_pc_div()
      divide top of stack value into prev. value and pop the top stack value off
    • exec_pc_concat

      private void exec_pc_concat()
      concatenate two variables on stack
    • exec_pc_dup

      private void exec_pc_dup()
      duplicate string on top of stack by value of top-1 count
    • exec_pc_index

      private void exec_pc_index()
      put index of first occurance of second string within the first string on top of stack
    • exec_pc_find

      private void exec_pc_find()
      return seta index of first character in str2 found in str1 on top of stack
    • exp_compare

      private void exp_compare()
      perform compare EQ,GE,GT,LE,LT, or NE
    • setc_compare

      private int setc_compare()
      compare setc_value1 and setc_value2 in EBCDIC and return -1, 0, or 1 for low, equal, high

      Notes:
      1. If length not equal, the shorter length operand is treated as lower
      Returns:
      -1, 0, or 1 for low, equal, high
    • exec_pc_not

      private void exec_pc_not()
      perform logical not operation on stk var
    • exec_pc_and

      private void exec_pc_and()
      perform logical and operation on stk vars
    • exec_pc_or

      private void exec_pc_or()
      perform logical or operation on stk vars
    • exec_pc_xor

      private void exec_pc_xor()
      perform logical xor operation on stk vars
    • exp_string_quote

      private void exp_string_quote()
      start or end string or substring defining setc value for exp_stack

      Note:
      1. if exp_prev_substring_op set then don't put null string on stack
    • exp_substring

      private void exp_substring()
      replace string, e1, e2 values with substring
    • exp_calc_var_sub

      private void exp_calc_var_sub()
      called with var ptr and subscript on stack
      1. if subscripted set var replace stack var set ptr with subscripted set value
      2. if subscripted parm var update or replace stack var parm ptr with sublist parm value
      3. skip trailing . if any
    • exp_append_string

      private void exp_append_string()
      append var on top of stack to string var
    • exp_next_char

      private char exp_next_char()
      return next char in expression else terminator
      Returns:
      next character - tilde (~) serves as terminator
    • skip_next_token

      private void skip_next_token()
      skip next token
    • set_compare

      private void set_compare(boolean compare_result)
      add true or false (setb value) to stack
      Parameters:
      compare_result - value to be stacked
    • inc_tot_exp_stk_var

      private boolean inc_tot_exp_stk_var()
      if not over max inc tot_exp_stk_var and init stk name index -1 else abort and return false
      Returns:
      true if successful, false otherwise
    • get_compare_values

      private void get_compare_values()
      get set values from stack and pc_seta or pc_setc based on pc_parm_type. Set val_type1 as follows:
      1. If either is setb, make setb
      2. If either is seta, make seta
      3. else setc
    • get_seta_stack_values

      private void get_seta_stack_values()
      get seta_value1 and 2 from top of stack and remove from stack
    • get_seta_stack_value

      private int get_seta_stack_value(int offset)
      return seta value of stk + offset without removing
      Parameters:
      offset - offset value
      Returns:
      increment top of stack
    • get_seta_string_value

      private int get_seta_string_value(String text)
      return int value of string using symbol table value if found else numberic value else 0.
      Parameters:
      text - input text value
      Returns:
      numeric value of input text
    • get_setb_stack_value

      private byte get_setb_stack_value(int offset)
      return setb value of stk + offset without removing
      Parameters:
      offset - offset value
      Returns:
      byte value of 0 or 1
    • put_seta_stack_var

      private void put_seta_stack_var()
      add seta_value to stack
    • put_setb_stack_var

      private void put_setb_stack_var()
      add setb_value to stack
    • put_setc_stack_var

      private void put_setc_stack_var()
      add setc_value to stack
    • get_setb_stack_values

      private void get_setb_stack_values()
      set setb_value1 and 2 from top of stack
    • get_setc_stack_values

      private void get_setc_stack_values()
      set setc_value1 and 2 from top of stack without removing
    • get_setc_stack_value

      private String get_setc_stack_value()
      return setc string from top of stack and remove it
      Returns:
      string from top of stack
    • exp_push_op

      private void exp_push_op()
      put op on stack
    • exp_pop_op

      private void exp_pop_op()
      pop current op on stack
    • exp_term

      private void exp_term()
      terminate expression returning value on stack if no errors

      Notes:
      1. Don't return value if parse_mode
      2. Turn off pc_gen_exp
    • isQuotedBinInteger

      private boolean isQuotedBinInteger(String s)
      Check if a string is of the form "B'1-32 binary digits'"
      Parameters:
      s - the string to check
      Returns:
      true if the string (1) begins with "B'" (2) ends with "'" (3) has 1-32 binary digits between the quotes false otherwise
    • isQuotedHexInteger

      private boolean isQuotedHexInteger(String s)
      Check if a string is of the form "X'1-8 hexadecimal digits'"
      Parameters:
      s - the string to check
      Returns:
      true if the string (1) begins with "X'" (2) ends with "'" (3) has 1-8 hexadecimal digits between the quotes false otherwise
    • is32BitBinaryInteger

      private boolean is32BitBinaryInteger(String s, int base)
      Validate that a string represents a valid 32-bit binary integer
      Parameters:
      s - string to validate
      base - number base of the digits in the string; 10, 16 or 2
      Returns:
      true if valid 32-bit binary integer, false otherwise
    • isMaxPosIntPlusOne

      private boolean isMaxPosIntPlusOne(String s)
      Determine whether string is equal to the decimal digits representing one more than Integer.MAX_VALUE (2147483647+1)
      Parameters:
      s - string to check
      Returns:
      true if string is "2147483648", false otherwise
    • isUnaryMinusAtOffset

      private boolean isUnaryMinusAtOffset(int offset)
      Determine whether exp_stk_op entry at top (most recently added) + offset is unary minus
      Parameters:
      offset - offset from top; less than or equal to zero
      Returns:
      true if unary minus at top + offset false if not or top + offset out of stack range
    • get_int_from_string

      private int get_int_from_string(String setc_text, int base)
      return integer from string using specified base Notes:
      1. return numeric value of string base 2, 10 or 16
      2. If base 10, ignore trailing non digits
      Parameters:
      setc_text - text input string
      base - base number for conversion (radix)
      Returns:
      integer result value
    • exp_push_var

      private void exp_push_var()
      push var variable on stack if &var followed by ( then put var pointer on value stack and put ) subscript op on op stack
      else push unscripted var value on value stack and skip trailing . if any

      Notes:
      1. If exp_parse_set_mode, set exp_parse_set_name and exit.
      2. If var value is setc, check for symbol value
    • exp_push_sdt

      private void exp_push_sdt()
      convert sdt in setc_value to seta_value and push on stack

      Notes:
      1. Ordinary symbols are pushed as strings for use by prefix operators T', L'
      2. "*" pushes max_substring_len
    • push_sym

      private void push_sym()
      push current exp_token symbol on stack as setc for use by prefix operators T', L' else get sym_val else 0.
    • mz390_find_sym

      private int mz390_find_sym(String symbol)
      find ordinary symbol and return index else -1

      Notes:
      1. return -1 if not opt_asm
      2. Force az390 to finish last bal and lock az390 until next bal while mz390 accesses symbol table
      Parameters:
      symbol - name of symbol to search
      Returns:
      index value or -1 if not found
    • set_sym_macro_attr

      private void set_sym_macro_attr(String sym_lab)
      set macro call label ordinary symbol type to 'M' if currently undefined
      Parameters:
      sym_lab - symbol to add
    • get_sym_len

      private int get_sym_len(String symbol)
      return length for ordinary symbol if found else return 1
      Parameters:
      symbol - symbol to locate
      Returns:
      length of symbol
    • exp_push_string

      private void exp_push_string(String value)
      push string on stack as setc
      Parameters:
      value - value to push
    • add_lcl_set

      private int add_lcl_set(String new_name, byte new_type, int new_size, boolean set_array)
      add lcl set variable not found by find_set
      Parameters:
      new_name - name of SETx variable
      new_type - variable type
      new_size - size
      set_array - ???
      Returns:
      index of the variable, or -1 on error
    • add_gbl_set

      private void add_gbl_set(String new_name, byte new_type, int new_size, boolean set_array)
      add gbl set variable
      Parameters:
      new_name - name of SETx variable
      new_type - variable type
      new_size - size
      set_array - ???
    • parse_set_var

      private boolean parse_set_var(String text, int text_index)
      parse scalar, subscripted, or created set variable with or without subscript using expression parser in parse_set_var_mode to set:
      1. exp_parse_set_name
      2. exp_parse_set_name_index
      3. exp_parse_set_type (seta/setb/setc)
      4. exp_parse_set_loc (lcl/gbl)
      5. exp_parse_set_sub
      6. exp_parse_set_created - true/false
      7. exp_parse_set_subscript - true/false
      and return true if it exists or false if not.

      Notes:
      1. If var found but exp_parse_set_name is null, then issue error for parms
      2. Used by alloc set with alloc_set_mode to get name and sub for allocation
      3. Used by store to dynamically alloc undefined name as lcl
      Parameters:
      text - source to parse
      text_index - ???
      Returns:
      true if successfil, false otherwise
    • find_set

      private boolean find_set(String var_name, int var_sub)
      find lcl or gbl set variable else false and set var_name_index = -1 if not found. set following globals if found
      1. var_loc = var_lcl_loc or var_gbl_loc
      2. var_type = var_seta_type|var_setb_type|var_setc_type
      3. var_name_index = for lcl/gbl seta, setb, setc array
      4. set_sub = set variable subscript
      5. seta_value|setb_value|setc_value
      6. seta_index|setb_index|setc_index
      7. var_set_array set true if subscripted RPI 836
      Notes:
      1. Saves create set name for possible scalar allocation for set
      2. Global set only found if declared locally or &SYS
      3. Both lcl and gbl key index finds ready for add if not found returned
      Parameters:
      var_name - variable name
      var_sub - variable subscript (?)
      Returns:
      true if found - false otherwise
    • find_lcl_set

      private boolean find_lcl_set(String var_name, int var_sub)
      find lcl variable or label else false also set var_name_index = -1 if not found set following globals if found:
      1. var_loc = var_lcl_loc or var_gbl_loc
      2. var_type = var_seta_type|var_setb_type|var_setc_type
      3. var_name_index = for lcl/gbl seta, setb, setc array
      4. set_sub = subscript
      5. seta_value|setb_value|setc_value
      6. seta_index|setb_index|setc_index
      Parameters:
      var_name - variable name
      var_sub - variable subscript (?)
      Returns:
      true if found - false otherwise
    • find_gbl_set

      private boolean find_gbl_set(String var_name, int var_sub)
      find gbl set variable else false also set var_name_index = -1 if not found set following globals if found:
      1. var_loc = var_lcl_loc or var_gbl_loc
      2. var_type = var_seta_type|var_setb_type|var_setc_type
      3. var_name_index = for lcl/gbl seta, setb, setc array
      4. set_sub = subscript
      5. seta_value|setb_value|setc_value
      6. seta_index|setb_index|setc_index
      Parameters:
      var_name - variable name
      var_sub - variable subscript (?)
      Returns:
      true if found - false otherwise
    • get_lcl_set_value

      private void get_lcl_set_value()
      Set seta/setb/setc_value from lcl set value using:
      • var_type
      • var_name_index
      • set_sub
      and set val_type = val_seta/setb/setc_type
      1. Calc seta_index|setb_index|setc_index. If subscript out of range and alloc mode use previous ending subscript (i.e. first allocation sets size)
      2. Calc seta_value|setb_value|setc_value
      Notes:
      1. Requires var_name_index and set_sub
    • expand_set

      private int expand_set(int expand_name_index, byte expand_type, byte expand_loc, int expand_sub)
      expand set array
      Parameters:
      expand_name_index - index of set variabel array
      expand_type - variable type
      expand_loc - ???
      expand_sub - ???
      Returns:
      -1 on error; otherwise ???
    • adjust_expand_inc

      private void adjust_expand_inc(int var_loc)
      increase expansion increment to reduce overhead of repeated expansions. This is a trade-off with running out of memory
      Parameters:
      var_loc - ???
    • get_gbl_set_value

      private void get_gbl_set_value()
      1. Set seta/setb/setc_value from gbl set based on var_type, var_loc, var_name_index, and set_sub
      2. Set val_type = var_seta/setb/setc_type
    • get_label_index

      private int get_label_index(String label_source)
      find macro label and return line index-1 else abort
      Parameters:
      label_source - source from which to extract label
      Returns:
      if found index value-1; otherwise -1
    • get_label_comma_index

      private int get_label_comma_index(String label_source)
      find and return index to comma after macro label else return -1
      Parameters:
      label_source - source to scan
      Returns:
      index of first comma after label; otherwise -1
    • find_mac_entry

      private int find_mac_entry(String macro_name)
      return mac_name index if found else -1
      1. Note load_mac adds entry with -2 index to prevent mult search for macros not found.
      2. If MFC option on, then instructions and assembler control statements will not be expanded as macros.
      3. Any non-conditional macro operator can be expanded via an inline macro that can be defined via COPY statement.
      Parameters:
      macro_name - name of macro
      Returns:
      if found macro index, otherwise -1
    • call_mac

      private void call_mac()
      1. add macro to call stack
      2. If listcall option, add comment to bal
      3. process proto-type and set parms
      4. init mac_line_index to first macro statement
      5. Set macro label ordinary symbol type to 'M' if 'U'
    • put_listcall

      private void put_listcall()
      if LISTCALL
      • gen listcall comment on BAL
      • before load or call RPI 746
      Notes:
      1. If LISTCALL and MCALL, all calls are listed on PRN
    • init_pc_arrays

      private void init_pc_arrays()
      allocate pseudo code arrays

      Notes:
      1. pc_start used to opt ago, gbl?, etc.
      2. Others not alloc if nopc option.
    • init_arrays

      private void init_arrays()
      init large arrays with optional overides for size
    • init_gbl_sys

      private void init_gbl_sys()
      add global system variables
    • set_sys_dsn_mem_vol

      private void set_sys_dsn_mem_vol(String file_name)
      set sys_dsn, sys__mem, and sys_vol from file name
      Parameters:
      file_name - full file name
    • add_gbl_sys

      private void add_gbl_sys(String sys_name, byte sys_type)
      add global system variables
      Parameters:
      sys_name - variable name
      sys_type - variable type
    • init_lcl_sys

      private void init_lcl_sys()
      init local system macro variables
    • add_lcl_sys

      private void add_lcl_sys(String sys_name, byte sys_type)
      add local set variable
      Parameters:
      sys_name - variable name
      sys_type - variable type
    • check_sysops

      private void check_sysops()
      check for opcodes that update system variables
    • init_call_parms

      private void init_call_parms()
      parse proto-type to set pos and key parm initial values
    • set_call_parm_values

      private void set_call_parm_values()
      set positional and key word parm values from macro call statement

      Note mult commas force null pos parms
    • init_pos_parm

      private void init_pos_parm(String pos_parm_name)
      init positional parm
      Parameters:
      pos_parm_name - name for positional parameter
    • init_key_parm

      private void init_key_parm(String kwd_parm_name, String kwd_parm_value)
      add key work parm name and default value
      Parameters:
      kwd_parm_name - keyword parameter name
      kwd_parm_value - keyword parameter value
    • set_pos_parm

      private void set_pos_parm(String pos_parm)
      init positional parm and increment cur_pos_parm set by
      Parameters:
      pos_parm - positional parameter
    • set_key_parm

      private boolean set_key_parm(String key, String key_parm)
      set keyword parm
      Parameters:
      key - ???
      key_parm - ???
      Returns:
      true if successful; false otherwise
    • find_kwd_parm

      private int find_kwd_parm(String kwd_name)
      find keywork parm and return index else -1
      Parameters:
      kwd_name - name of keyword parameter
      Returns:
      index of keyword parameter, or -1 if not found
    • exit_mz390

      private void exit_mz390()
      wait for az390 to end and display total errors for both close files and exit to system or caller
    • put_stats

      private void put_stats()
      1. Display mz390 statistics on STA file if option STATS
      2. If asm pass file names and merge file errors from mz390 and lookahead phase of az390 for use in file xref at end of PRN
      3. put_stats called from mz390 to sync with mz390 put_stats on STA and to include total mz and az errors on TRM
      Notes:
      1. Use tz390.put_stat_line to route line to end of BAL or stat(file) option
    • put_stat_line

      private void put_stat_line(String msg)
      routine statistics line to BAL or STATS(file)
      Parameters:
      msg - statistics line of text
    • close_files

      private void close_files()
      close bal, pch, err, trm
    • close_dat_file

      private void close_dat_file(int index)
      close specific dat file
      Parameters:
      index - index of file to be closed
    • close_pch_file

      private void close_pch_file(int index)
      close specific pch file
      Parameters:
      index - index of file to be closed
    • create_mnote

      private void create_mnote(int level, String text)
      create mnote on BAL and ERR
      Parameters:
      level - mnote level
      text - text of mnote
    • process_mnote

      private void process_mnote(int level, String msg)
      put mnote message on BAL and ERR files
      Parameters:
      level - mnote level
      msg - mnote text
    • process_punch

      private void process_punch()
      punch record on PCH and list on PRN. If ASM and NOALLOW pad to 80 bytes.
    • replace_quoted_text_vars

      private String replace_quoted_text_vars(String text, boolean reduce)
      replace variables in MNOTE or PUNCH 'text' after verifying single quote text ok
      Parameters:
      text - text to handle
      reduce - indicator whether or not to reduce double ampersands and apostrophes
      Returns:
      result string
    • log_error

      private void log_error(int error, String msg)
      issue error msg to log with prefix and inc error total

      Notes:
      1. If exp_replacement mode error ignore and return setc_value = null except for 208 SYSLIST substitution error
      Parameters:
      error - error number
      msg - error message text
    • abort_error

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

      private void put_copyright()
      display mz390 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
    • find_lcl_key_index

      private int find_lcl_key_index(String user_key)
      return user_key_index for lcl user_key else -1 and set following for possible add_key_index:
      1. lcl_key_text = user_key
      2. lcl_key_hash = hash code for key
      3. lcl_key_index_last = last search entry
      lcl key types are:
      • K: - key word macro parm
      • B: - local macro label
      • P: - postional macro parm
      • L: - local set variable
      See tz390 with global find_key_index types FGMORSX
      Parameters:
      user_key - key to find
      Returns:
      user key index or -1 if not found
    • add_lcl_key_index

      private void add_lcl_key_index(int user_index)
      add lcl user_index entry based on lcl_key_text, lcl_key_hash, and lcl_key_index_last set by prior find_lcl_key_index
      Parameters:
      user_index - ???
    • gen_exp_pc

      private void gen_exp_pc(byte op)
      gen pc code for exp if pc_gen_exp
      Parameters:
      op - internal opcode (?)
    • gen_pc

      private void gen_pc(byte op)
      gen pushv or pushvs
      Parameters:
      op - internal opcode (?)
    • exec_pc

      private void exec_pc()
      move this mac line to most recently used entry and then execute pseudo code starting at pc_loc until pc_end entry found
    • get_pc

      private void get_pc(byte op)
      add new pc_op to list of pseudo codes for current mac_bal_line
      1. Set pc_loc to new pc_op entry
      2. Set pc_loc_prev to prev pc_loc else 0
      3. Set pcl_start[mac_bal_line] to first
      4. Set pc_end[mac_bal_line] to last
      5. Set pc_next[pc_loc-1] to chain start to end
      6. First try to get next entry from pc_free list
      7. If none on free list, remove least recently used entry from pc_lru and add to pc_free list while and return first free entry
      Parameters:
      op - pseudo code operation to add
    • update_mru

      private void update_mru()
      update mru with current mac_line_index
    • reuse_pc

      private void reuse_pc(int index)
      reuse pseudo code list at mac line index
      Parameters:
      index - mac line index
    • trace_pc

      private void trace_pc()
      trace pseudo code entry gen or exec
    • abort_pc

      private void abort_pc(String msg)
      issue log_error and abort pseudo code mode due to pc error
      Parameters:
      msg - error message text
    • exp_concat_var

      private void exp_concat_var()
      concatenate var to string on stack
    • push_pc_var

      private void push_pc_var()
      push scalar var on stack (shared by exp and pseudo code)
    • get_pc_var_value

      private void get_pc_var_value()
      1. Get var value in seta/setb/setc_value using var_type, var_loc, var_name_index and set_sub
      2. Set val_type = var_seta/setb/setc_type
    • exec_pc_compeq

      private void exec_pc_compeq()
      compare equal (shared exp and pseudo code)
    • exec_pc_compge

      private void exec_pc_compge()
      compare greater than or equal (shared exp and pseudo code)
    • exec_pc_compgt

      private void exec_pc_compgt()
      compare greater than (shared exp and pseudo code)
    • exec_pc_comple

      private void exec_pc_comple()
      compare less than or equal (shared exp and pseudo code)
    • exec_pc_complt

      private void exec_pc_complt()
      compare less than (shared exp and pseudo code)
    • exec_pc_compne

      private void exec_pc_compne()
      compare not equal (shared exp and pseudo code)
    • exec_pc_pushvs

      private void exec_pc_pushvs()
      push var(set_sub) value on stack

      Notes:
      1. Shared by exp and pc
    • exec_pc_sublst

      private void exec_pc_sublst()
      replace setc value and sublist index on stack with caculated sublist.

      Notes:
      1. Shared by exp and pc
    • exec_pc_substr

      private void exec_pc_substr()
      replace setc,arg1,arg2 on stack with subsubstring setc
    • get_pc_trace_val

      private String get_pc_trace_val(byte type, int parm)
      return set &type_value &PARM ? = 1, 2 or 3 for value
      Parameters:
      type - type code: 1=SETA, 2=SETB, 3=SETC
      parm - type code: 1=SETA, 2=SETB, 3=SETC
      Returns:
      result value as a string
    • get_pc_var

      private boolean get_pc_var()
      Set var variables from pseudo code entry and update if required for new macro instance
      1. var_type
      2. val_type
      3. var_loc
      4. var_name_index (update for new mac)
      Return true if ok else false if not found

      Notes:
      1. Update via find_set if new macro and local var
      Returns:
      true if successful, false ottherwise
    • opt_gen_pc_comp

      private void opt_gen_pc_comp(byte op)
      convert pusha or pushc with self defining term into op with sdt else flush and gen op with 2 stack values
      Parameters:
      op - pseudo code opcode
    • opt_gen_pc_seta

      private void opt_gen_pc_seta(byte op)
      convert pusha to op with seta sdt arg. else flush and gen op with 2 stack values
      Parameters:
      op - pseudo code opcode
    • opt_gen_pc_setc

      private void opt_gen_pc_setc(byte op)
      convert pushc to op with setc sdt arg. else flush and gen op with 2 stack values
      Parameters:
      op - pseudo code opcode
    • opt_gen_pc_pushc

      private void opt_gen_pc_pushc()
      set pending pushc after flushing any pending pc opcodes
    • opt_gen_pc_pusha

      private void opt_gen_pc_pusha()
      set pending pusha after flushing any pending pc opcodes
    • opt_gen_pc_concat

      private void opt_gen_pc_concat(byte op)
      optimize concatenation of push? by checking if prev op was pushc and combining to single push? where possible.
      Parameters:
      op - pseudo code opcode
    • flush_pc_pending

      private void flush_pc_pending()
      gen pushc or pusha if pending gen concat after pushc if pending

      Notes:
      1. push emply setc if pending
    • opt_pcl

      private void opt_pcl()
      optimize pc code list prior to first execution and reset pc_req_opt:
      1. PUSHV,ADD 1,STORV = INC
      2. PUSHV,SUB 1,STORV = DEC
    • exec_pc_store

      private void exec_pc_store(byte op)
      exec store for storv, storvs, storvn, inc, and dec
      Parameters:
      op - pseudo code opcode
    • get_pc_store_sub

      private void get_pc_store_sub(byte op)
      set store_sub and store_subscript based on op.

      Note:
      1. If pc_op_storvs, then get store_sub from top of stack after store value has been removed
      Parameters:
      op - pseudo code opcode
    • get_pc_loc_list

      private boolean get_pc_loc_list(byte[] pc_op_list)
      load pc_loc_list
      Parameters:
      pc_op_list - array pseudo code opcodes
      Returns:
      true if successful, false otherwise
    • free_pc_list

      private void free_pc_list(int head, int tail)
      free pc list starting at head and ending at tail

      Notes:
      1. User must reset any other pointers to this list from pc_next or pc_start
      Parameters:
      head - head pointer
      tail - tail tail pointer
    • exec_pc_pfx_a

      private void exec_pc_pfx_a()
      replace top of stack with A'stack indicating if symbol defined in lookahead (shared by exp and pseudo code)
    • exec_pc_pfx_d

      private void exec_pc_pfx_d()
      repalce top of stack with D'sym = 1/0 indicating if defined as ordinary symbol yet
    • exec_pc_pfx_i

      private void exec_pc_pfx_i()
      return I'sym integer value
    • exec_pc_pfx_k

      private void exec_pc_pfx_k()
      K'sym returns string length
    • exec_pc_pfx_l

      private void exec_pc_pfx_l()
      L'sym returns symbol length
    • exec_pc_pfx_n

      private void exec_pc_pfx_n()
      replace top of stack with N'stack (shared by exp and pc)
    • exec_pc_pfx_o

      private void exec_pc_pfx_o()
      return type of operator for O'sum
      • A = assembler control operator (CSECT, EQU ETC)
      • E = extended mnemonic (BH, BL, BER, ETC.)
      • O = machine opcode
      • M = macro defined
      • S = macro found in sysmac dir
      • U = unknown
    • exec_pc_pfx_s

      private void exec_pc_pfx_s()
      return exponent attrivute of ordinary symbol
    • exec_pc_pfx_t

      private void exec_pc_pfx_t()
      T'var/sym returns symbol type
    • string_numeric

      private boolean string_numeric(String text)
      return true if string or (string) numeric
      Parameters:
      text - string to check
      Returns:
      true if input evaluates as a number, false otherwise
    • exec_pc_upper

      private void exec_pc_upper()
      replace string on stack with upper case
    • exec_pc_lower

      private void exec_pc_lower()
      replace string on stack with lower case
    • exec_pc_ago

      private void exec_pc_ago()
      exec computed ago branch using
      1. ago_seta_index ptr to gbla ago array:
        • +0 = ptr to gblc label array if TRACEP else 0
        • +1 = maximum limit of ago index
        • +2 = ago line index array for macro labels
      2. ago_index = current index
    • exec_pc_ucomp

      private void exec_pc_ucomp()
      perform unary compliment on stack value
    • exec_pc_a2b

      private void exec_pc_a2b()
      convert int to binary string with leading zeros to make length 32
    • exec_pc_a2c

      private void exec_pc_a2c()
      convert int to character string of length 4 #509
    • exec_pc_a2d

      private void exec_pc_a2d()
      convert int to decimal string preceded by a plus or minus sign #509
    • exec_pc_a2x

      private void exec_pc_a2x()
      convert int to hex string of length 8 #509
    • exec_pc_b2a

      private void exec_pc_b2a()
      convert binary string to int
    • exec_pc_b2c

      private void exec_pc_b2c()
      convert binary string to char string
    • exec_pc_b2d

      private void exec_pc_b2d()
      convert binary string to decimal string preceded by plus or minus character #509
    • exec_pc_b2x

      private void exec_pc_b2x()
      convert binary string to hex string
    • exec_pc_c2a

      private void exec_pc_c2a()
      convert 0-4 character string to int
    • exec_pc_c2b

      private void exec_pc_c2b()
      convert char string to binary string
    • byteToBinaryString

      private String byteToBinaryString(byte x)
      Convert binary byte to length 8 binary string // #509
      Parameters:
      x - byte value to convert
      Returns:
      value converted to length 8 binary string
    • exec_pc_c2d

      private void exec_pc_c2d()
      convert char string to decimal string prefixed by plus or minus sign #509
    • exec_pc_c2x

      private void exec_pc_c2x()
      convert char string to hex string
    • get_text_hex

      private void get_text_hex(String text)
      return up to 2-8 hex chars for 1-4 char
      Parameters:
      text - input text string
    • exec_pc_d2a

      private void exec_pc_d2a()
      convert decimal string to int
    • exec_pc_d2b

      private void exec_pc_d2b()
      convert decimal string to binary string of length 32
    • exec_pc_d2c

      private void exec_pc_d2c()
      convert decimal string to char string
    • exec_pc_d2x

      private void exec_pc_d2x()
      convert decimal string to hex string
    • exec_pc_dclen

      private void exec_pc_dclen()
      return dc length of string after reducing double quotes and ampersands
    • exec_pc_dcval

      private void exec_pc_dcval()
      return string with reduced quotes and ampersands
    • exec_pc_dequote

      private void exec_pc_dequote()
      remove start and ending quote if any
    • exec_pc_double

      private void exec_pc_double()
      double quotes within string
    • exec_pc_isbin

      private void exec_pc_isbin()
      return 1 if 1-32 binary digits string else 0; error if 0 digits
    • isBinDigits

      private boolean isBinDigits(String s)
      Check if string is all binary digits
      Parameters:
      s - string to check
      Returns:
      true if all binary digits false otherwise
    • isBinInt

      private boolean isBinInt(String s)
      Check if string is 1-32 binary digits
      Parameters:
      s - string to check
      Returns:
      true if 1-32 binary digits false otherwise
    • isdec

      private boolean isdec(String s)
      Check if string is 1-10 decimal digits having maximum value 2147483647 (Integer.MAX_VALUE)
      Parameters:
      s - string to check
      Returns:
      true if 1-10 decimal digits and value <= 2147483647 false otherwise
    • isSignedDecimalInteger

      private boolean isSignedDecimalInteger(String s)
      Check if string 1-10 decimal digits, with possible leading sign, having value in range [Integer.MIN_VALUE = -2147483648, 2147483647 = Integer.MAX_VALUE]
      Parameters:
      s - String to check
      Returns:
      true if valid false otherwise
    • isDecDigits

      private boolean isDecDigits(String s)
      Check if string is all decimal digits
      Parameters:
      s - string to check
      Returns:
      true if all decimal digits false otherwise
    • isHexDigits

      private boolean isHexDigits(String s)
      Check if string is all hexadecimal digits
      Parameters:
      s - string to check
      Returns:
      true if all hexadecimal digits false otherwise
    • isHexInt

      private boolean isHexInt(String s)
      Check if string is 1-8 hexadecimal digits
      Parameters:
      s - string to check
      Returns:
      true if 1-8 hexadecimal digits false otherwise
    • isHexChar

      private boolean isHexChar(char c)
      Check if character is a hexadecimal digit
      Parameters:
      c - character to check
      Returns:
      true if c is a hexadecimal digit false otherwise
    • exec_pc_isdec

      private void exec_pc_isdec()
      if string 1-10 decimal digits <= 2147483647 return 1 else 0; error if 0 digits
    • exec_pc_ishex

      private void exec_pc_ishex()
      return 1 if string 1-8 hex digits else 0; error if 0 digits
    • exec_pc_issym

      private void exec_pc_issym()
      return 1 if symbol defined else 0
    • exec_pc_signed

      private void exec_pc_signed()
      convert int to signed decimal string
    • exec_pc_sla

      private void exec_pc_sla()
      shift left arithmetic
    • shiftLeftArithmetic

      private int shiftLeftArithmetic(int x, int n)
      Implement HLASM LangRef SLA built-in function

      Notes:
      1. Only the low 6 bits of n are used. For example, n = -1 = X'FFFFFFFF' is changed to X'0000003F' = 63 and n = X'80000000' (Integer.MIN_VALUE) is changed to 0.
      2. Arithmetic overflow error logged if a bit that is not the original sign bit is shifted into the sign position.
      Parameters:
      x - the number to shift
      n - the number of bits to shift
      Returns:
      x shifted left n bits if no error; else 0
    • shiftLeftArithmeticSignMask

      private int shiftLeftArithmeticSignMask(int n)
      Create mask containing n+1 one bits in the leftmost position // #509
      Parameters:
      n - number of one bits (not including sign bit); 1--31
      Returns:
      an integer containing n+1 one bits in leftmost position and zero in the remaining bit positions
    • exec_pc_sll

      private void exec_pc_sll()
      shift left logical
    • exec_pc_sra

      private void exec_pc_sra()
      shift right arithmetic
    • exec_pc_srl

      private void exec_pc_srl()
      shift right logical
    • exec_pc_sattra

      private void exec_pc_sattra()
      return int value of assembler attribute for symbol defined via EQU 4th parm
    • exec_pc_sattrp

      private void exec_pc_sattrp()
      return int value of symbol program attribute defined via EQU 5th parm
    • exec_pc_x2a

      private void exec_pc_x2a()
      convert hex string to int
    • exec_pc_x2b

      private void exec_pc_x2b()
      convert hex string to binary string
    • exec_pc_x2c

      private void exec_pc_x2c()
      convert hex string to char string
    • exec_pc_x2d

      private void exec_pc_x2d()
      convert hex string to decimal string preceded by plus or minus sign
    • get_pc_created_var

      private void get_pc_created_var(int offset)
      get created var name from stack and update var fields in pseudo code
      Parameters:
      offset - ???
    • get_pc_parms

      private void get_pc_parms()
      set pc seta or setc parms based on pc_var_type() and abort if error
    • exec_pc_pushs

      private void exec_pc_pushs()
      push ordinary symbol abs value on stack else issue error
    • get_val_type

      private byte get_val_type()
      return val_type based on var_type
      Returns:
      value type code
    • put_continued_text

      private void put_continued_text(BufferedWriter file_buff, String text)
      write text to buffered file with continuations if > 71 characters.

      Notes:
      1. Used by put_bal_line and
      2. Used by put_pch_line if extended FORMAT option specified.
      Parameters:
      file_buff - buffered writer object
      text - text to add to buffer
    • process_ainsert

      private void process_ainsert()
      insert record in in queue
    • add_ainsert_queue_rec

      private void add_ainsert_queue_rec(String rec)
      add record to front or back of ainsert queue for copy insert at front in seq.
      Parameters:
      rec - source record to add
    • insert_source_line

      private void insert_source_line()
      insert AINSERT logical record in front of current source line at mac_line index
    • get_ainsert_source_line

      private void get_ainsert_source_line()
      return mac_line with source line from AINSERT queue which may have continuations
    • set_insert_mac_line_index

      private void set_insert_mac_line_index()
      set mac_line_index to next insert for AINSERT or dynamic COPY else abort
    • check_setc_quotes

      private void check_setc_quotes(int tot_setc_args)
      if NOALLOW verify function has quoted string as first argument.
      Parameters:
      tot_setc_args - arguments
    • calc_dimension

      private int calc_dimension(String text, int start)
      return numeric array dimension > 0 else issue error and return 1
      Parameters:
      text - input string
      start - start offset within string
      Returns:
      numeric value of successive digits interpreted as a single decimal number