Class sz390
java.lang.Object
sz390
- All Implemented Interfaces:
Runnable
sz390 is the SVC component of z390 which handles SVC calls and associated functions
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) byte[]variable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) final String[]variable(package private) final byte[]variable(package private) String[]variable(package private) int[]variable(package private) int[]variable(package private) String[]variable(package private) int[]variable(package private) int[]variable(package private) String[]variable(package private) short[]variable(package private) intvariable(package private) BigDecimalvariable(package private) BigIntegervariable(package private) byte[]variable(package private) doublevariable(package private) floatvariable(package private) Stringvariable(package private) String[]variable(package private) BufferedReader[]variable(package private) Thread[]variable(package private) PrintStream[]variable(package private) intvariable(package private) String[]variable(package private) LinkedList<String>[]variable(package private) BufferedReader[]variable(package private) Thread[]variable(package private) Process[]variable(package private) boolean[]variable(package private) int[]variable(package private) int[]variable(package private) boolean[]variable(package private) long[]variable(package private) Thread[]variable(package private) String[]variable(package private) BigDecimalvariable(package private) BigIntegervariable(package private) byte[]variable(package private) doublevariable(package private) intvariable(package private) floatvariable(package private) Stringvariable(package private) intvariable(package private) Calendarvariable(package private) intvariable(package private) SimpleDateFormatvariable(package private) SimpleDateFormatvariable(package private) SimpleDateFormatvariable(package private) SimpleDateFormatvariable(package private) SimpleDateFormatvariable(package private) SimpleDateFormatvariable(package private) SimpleDateFormatvariable(package private) intvariable(package private) SimpleDateFormatvariable(package private) SimpleDateFormatvariable(package private) intvariable(package private) SimpleDateFormatvariable(package private) SimpleDateFormatvariable(package private) SimpleDateFormatvariable(package private) SimpleDateFormatvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) Stringvariable(package private) intvariable(package private) Stringvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) longvariable(package private) intvariable(package private) Stringvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) SimpleDateFormatvariable(package private) SimpleDateFormatvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) booleanvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) final String[]variable(package private) booleanvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) Stringvariable(package private) intvariable(package private) Stringvariable(package private) intvariable(package private) booleanvariable(package private) intvariable(package private) Stringvariable(package private) intvariable(package private) booleanvariable(package private) booleanvariable(package private) final String[]variable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) int[]variable(package private) intvariable(package private) intvariable(package private) Stringvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) booleanvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) gz390variable(package private) intvariable(package private) intvariable(package private) int[]variable(package private) int[]variable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) char[]variable(package private) Stringvariable(package private) intvariable(package private) Stringvariable(package private) Stringvariable(package private) Stringvariable(package private) Stringvariable(package private) Stringvariable(package private) booleanvariable(package private) final Lockvariable(package private) final Conditionvariable(package private) Filevariable(package private) BufferedWritervariable(package private) booleanvariable(package private) longvariable(package private) final String[]variable(package private) String[]variable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) longvariable(package private) longvariable(package private) longvariable(package private) longvariable(package private) longvariable(package private) intvariable(package private) intvariable(package private) longvariable(package private) intvariable(package private) intvariable(package private) longvariable(package private) Timervariable(package private) Stringvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) String[]variable(package private) intvariable(package private) intvariable(package private) booleanvariable(package private) Stringvariable(package private) intvariable(package private) booleanvariable(package private) pz390variable(package private) booleanvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) bytevariable(package private) intvariable(package private) intvariable(package private) booleanvariable(package private) booleanvariable(package private) longvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) booleanvariable(package private) booleanvariable(package private) booleanvariable(package private) InetAddress[]variable(package private) String[]variable(package private) DataInputStream[]variable(package private) PrintStream[]variable(package private) int[]variable(package private) Socket[]variable(package private) byte[]variable(package private) DataInputStream[]variable(package private) boolean[]variable(package private) PrintStream[]variable(package private) boolean[]variable(package private) int[]variable(package private) int[]variable(package private) Socket[]variable(package private) Thread[]variable(package private) int[]variable(package private) InetAddress[]variable(package private) String[]variable(package private) boolean[]variable(package private) int[]variable(package private) ServerSocket[]variable(package private) Thread[]variable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) InetAddressvariable(package private) intvariable(package private) Stringvariable(package private) Stringvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) booleanvariable(package private) booleanvariable(package private) intvariable(package private) bytevariable(package private) bytevariable(package private) bytevariable(package private) bytevariable(package private) bytevariable(package private) intvariable(package private) charvariable(package private) int[]variable(package private) String[]variable(package private) booleanvariable(package private) booleanvariable(package private) bytevariable(package private) Stringvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) booleanvariable(package private) byte[]variable(package private) Stringvariable(package private) longvariable(package private) booleanvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) booleanvariable(package private) Stringvariable(package private) intvariable(package private) intvariable(package private) booleanvariable(package private) longvariable(package private) longvariable(package private) Stringvariable(package private) booleanvariable(package private) BufferedReadervariable(package private) bytevariable(package private) Stringvariable(package private) booleanvariable(package private) intvariable(package private) Matchervariable(package private) intvariable(package private) intvariable(package private) byte[]variable(package private) intvariable(package private) charvariable(package private) Patternvariable(package private) intvariable(package private) longvariable(package private) booleanvariable(package private) Stringvariable(package private) Stringvariable(package private) intvariable(package private) intvariable(package private) ByteBuffervariable(package private) byte[]variable(package private) longvariable(package private) long[]variable(package private) int[]variable(package private) boolean[]variable(package private) String[]variable(package private) String[]variable(package private) long[]variable(package private) RandomAccessFile[]variable(package private) int[]variable(package private) longvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) longvariable(package private) longvariable(package private) longvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) longvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) ByteBuffervariable(package private) byte[]variable(package private) tz390variable(package private) booleanvariable(package private) intvariable(package private) intvariable(package private) vz390variable(package private) intvariable(package private) intvariable(package private) booleanvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) BufferedReadervariable(package private) intvariable(package private) booleanvariable(package private) Stringvariable(package private) JTextFieldvariable(package private) RandomAccessFilevariable(package private) char[]variable(package private) intvariable(package private) intvariable(package private) JTextAreavariable(package private) LinkedList<zACB> variable(package private) booleanvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) longvariable(package private) longvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) longvariable(package private) longvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) Stringvariable(package private) Stringvariable(package private) intvariable(package private) booleanvariable(package private) intvariable(package private) int[]variable(package private) int[]variable(package private) byte[]variable(package private) byte[]variable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) longvariable(package private) booleanvariable(package private) intvariable(package private) intvariable(package private) Stringvariable(package private) intvariable(package private) booleanvariable(package private) intvariable(package private) longvariable(package private) Stringvariable(package private) RandomAccessFilevariable(package private) Stringvariable(package private) RandomAccessFilevariable(package private) Stringvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) intvariable(package private) Stringvariable(package private) intvariable -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidabort_error(int error, String msg) issue error msg to log with prefix and increment error totalprivate voidadd_cde()add new 390 load module to cde entry table and set usage to 1private voidalloc memory for GETMAIN from current FQEvoidast_close_file(int tiot_index) close assist fileintast_open_file(String ddname, boolean input_type, int dcb_addr) open ASSIST file by ddname and return TIOT index if open successful else return -1private Stringbytes_to_hex(byte[] bytes, int byte_start, int byte_length, int chunk) Format bytes into hex string.private voidvalidate that cur_dcb_addr is on full word bound and that DCBID = EBCDIC or ASCII C'DCB1' else abort.private booleancheck_dfp_finite(byte[] dfp_bytes, int dfp_byte_index) return true if DFP value finite based on CF5 field value common to all DFP typesprivate booleantrace fqe if option tracemem on and verify address and length okprivate voidcheck_mem_area(int addr, int len) check area start end and abort S0C5 if invalid.private voidcheck for psw = break addrprivate voidcheck for test break on memory value changeprivate voidcheck for test mode break on opcode at current psw addressprivate voidcheck for test mode break on register valueprivate booleancheck wait ecbs and return true if required # of ecbs have been postedprivate voidcancel all active cmd processesprivate voidclose log, err, tre, xrd, xpr, xph, xgt, and xpt Assist filesprivate voidif exit request, send shutdown request to z390 GUI via the sysout queuevoidcmd_cancel(int cmd_id) cancel exec processcmd_get_queue(int cmd_id) retrieve next FIFO line from linklist queue synchronized so output and main thread retrieval via CMDPROC READ are safe.private voidsend input to exec command in processintcmd_proc_rc(int cmd_id) return ending rc else -1 return 0 if no process definedintcmd_proc_start(int cmd_id, String[] exec_cmd) Terminate any prior cmd process with error if non zero completion. Start new process running on separate thread. Note: cmd monitor will issue exec_term if timeout limit is reached before next start command does it.private voidcmd_put_queue(int cmd_id, String msg) add output to linklist queue synchronized so output and main thread retrieval via CMDPROC READ are safe.private intcmd_startup(int cmd_id) start Windows command processer with synchronized buffered output.voidcopy_cmd_error_to_queue(int cmd_id) copy cmd error lines to output queuevoidcopy_cmd_output_to_queue(int cmd_id) copy cmd output lines to output queueprivate voidctd_trunc(byte max_digits) trunc to max digits plus exponent and strip trailing zeros on fractionprivate voidtake eodad exit if defined else issue error message and abortprivate voiddcb_synad_error(int error_num, String error_msg) take synad exit if defined else issue error message and issue pgm checkprivate booleanif cur_cde not -1 and cde_loc not 0 #714 decrement use count for cur_cde if use count 0 freemain memory set cde_loc to 0 to release cde entry if remove CDE from CVTCDE queue is successful #714 freemain CDE storage #714 set cde_addr to 0 to indicate no cde #714 endif #714 return true else if cur_cde not -1 and cde_addr = 0 #714 return false #714 else abort: delete cde system error #714 return false endifvoiddump_ar(int ar_reg_num) dump specified access register or all if -1private voiddump_cde()dump current program cde entriesprivate voiddump cde entries for all loaded pgms and filesvoiddump_fpc(boolean fpcplus) Dump the FPC (floating-point-control register) Summary dump (just the value); if fpcplus is true, a verbose dump is also done.voidDump the FPC (floating-point-control register)voiddump_fpcplus(int fpc) Verbose dump of the FPC (floating-point-control register)voiddump_fpr(int reg_offset) dump specified fp register or all if -1voiddump_gpr(int reg_offset) dump specified register or all if -1voiddump_mem(ByteBuffer memory, int mem_addr, int mem_len) dump specified area of memoryprivate voiddisplay total allocated and free memory totals on logprivate Stringdump_psw()in amode24/amode31: return 16 character hex PSW with the following bit settings: bits 0-7 x'07' translation, I/O interrupts, and external interrupts enabled. Bits 8-14 x'84' key eight, machine checks enabled Bit 15: Problem state (should be on: no SVC mode in z390) Bits 16-23 AS(2),CC(2),MASK(4) AS - translation mode zeros CC - condition code 0=CC8, 1=CC4, 2=CC2, 3=CC1 MASK - fixed, decimal, HFP exp, HFP sig.private Stringreturn 32 character PSW in format as defined by z-PoP: bits 0-7 x'07' PER disabled, DAT enabled, I/O and external interrupts enabled Bits 8-14 x'84' key eight, machine check enabled, no wait state Bit 15: Problem state (should be on: no SVC mode in z390) Bits 16-23 AS(2),CC(2),MASK(4) AS - Address Space control: zero CC - condition code 0=CC8, 1=CC4, 2=CC2, 3=CC1 MASK - fixed, decimal, HFP exp, HFP significance Bits 24-31 x'01' Amode64 enabled Bits 32-63 x'80000000' Amode 64 requires amode31 on Bits 64-95 x'00000000' High word of PSW address always 0 Bits 96-127: next sequential instruction addressprivate voiddump_req(boolean req_dump) dump regs and optionals dump everythingvoiddump content of tiot entriesprivate voidparse and execute current test commandvoiddisplay total errors close files and exitprivate booleanreturn true if cur_cde is on link stack else false.get_ascii_env_var_string(String env_var_name) return environment variable string with leading and trailing spaces removed or return "" if not found.get_ascii_string(int mem_addr, int mem_len, boolean null_term) get ascii string with no trailing spaces from memory address and length
Notes: Translates from EBCDIC to ASCII unless in ASCII mode. Terminate string at first 0 byte if requested or at end of field.private intget_bdw_len(int len) if BDW high bit on return len = bits 1-31 else return len = bits 1-15private intreturn ccyydddf for r1 linkage=svc callsprivate voidUsing cur_dcb addr from R1 or DECB get cur_tiot index from DCBIOBAD (x'1C'). reduce index in DCBIOBAD by 1.private Stringget_dcb_file_name(String dsnam_path) Get file name from DCBDSNAM if not zero and append dsnam_path else get file from DCBDDNAM environment variable.private voidset dcb_rec to address of get/put locate buffer else abortprivate booleanset load_pgm_name from r0 else errorlongreturn current os feature bits for use by STFLE instructionintget_fpc()Get the FPC (floating-point-control register) valuebooleanget_load_dsn(int dd_dsn_addr) Set DSN from addr DDNAM with high bit or from addr DSNAM.private longConvert string of hexadecimal digits to long Returns: The converted number if successful; -1 if an error occurs; also sets global test_cmd_abort to true Note: Code is a workaround to a bug in Long.valueOf(string,16) when string is 16 digits that begins with x'8' - x'F' (Supposedly fixed in java 8)private intget_new_tiot_index(String ddname, int dcb_addr) return new tiot index or abort (used by DCB I/O and ASSIST)private intreturn memory address of [addr][+-addr] start with current test_token and continue until next test_token not +, -, ?, % or valid address If invalid return -1
Notes: EPA returns last program load addressprivate StringGet next token for test commandprivate intget_test_addr(String text) get test address and set type memory type address forms: dec = absolute decimal address hex.private voidget next test command from Z390 GUI command line or system command line or file specified with the test(ddname) optionprivate byteget_test_compare(String compare) set test compare code or issue error 0 - = 1 - != 2 - >< 3 - >= 4 - < 5 - <=private intget_test_int(String token) return integer value of token and just issue ivalid int error if error and return -1.private byte[]get_test_mem_sdt(String text) return memory sdt byte array b'...' c'...' c"..." f'...' h'...' x'...'private longget_test_reg_sdt(String text) return long sdt value for register b'...' c'...' c"..." f'...' h'...' x'...' or address hex., dec, nr%, nr?, +hex, -hex, *+hex, *-hexprivate Stringget_tiot_file_name(int tiot_index) return file name for tiot using ddname for tiotprivate voidgo_test()set count and go execute instructions until count 0 or break found or exitvoidinit_sz390(tz390 shared_tz390, pz390 shared_pz390, vz390 shared_vz390) init tz390voidinit test regular expression parser init optional test=ddname file for batch input else init test_cmd_file which is also used for wtor replies when not in GUAM GUI mode expression pattern: self defining terms B'01' C'ABC' F'nnn' H'nnn' X'0F' register nr or nR memory address hex.voidinit pz390.cur_date and calendar with current time and date or force fixed time if NOTIMING option set.private voidlist last 10 instructions in trable tablevoidissue error msg to log with prefix and increment error total Yet suppress if not gen_obj and not tracevoidSet trace file for TRACE and TRACEALL Open 390 and lst filesvoidprocess test option interactive debug commands Check for reg, memory, or opcode break and set count = 0 if hit. Decrement go count if positive. if go count = 0 read, parse, and execute test commands until go or quit command executed. Notes: Get next command from z390 GUI cmd line, system command_line, or from ddname file specified in test option test(ddname)voidput_ascii_string(String text, int mem_addr, int mem_len, char pad_char) put ascii string with trailing spaces to memory address and length
Notes: Translates from ASCII to EBCDIC unless ASCII modeprivate intput_bdw_len(int len) if DCBEFLG1 LBI bit x'04' on return len with high bit on else return len in bits 1-15private voidput msg to console or cmd process output and yield to let parent process mprivate voidroute dump lines to LOG file unless TRACE or TRACET is on in which case route to TRE file.voidWrite message to z390_log_text and/or con if running standaloneprivate voidput_log_line(String msg) put line to listing filevoidput_stat_line(String msg) routine statistics line to LOG or STATS(file)private voiddisplay statistics as comments at end of balprivate booleanremove_cde(int cde) Remove CDE from CVTCDE chainprivate voidreset wait bit in ecblistvoidrun()wait for comproc threads to end normally or issue error if abnormal terminationprivate voidset_test_break_addr(int addr) set break on specified instruction addressprivate voidset test break on memory changeprivate voidset break on opcode at current pswprivate voidset test break on register changevoidStart stimer exit when stimer_exit_request found true by instruction loop or wait loopvoidsvc(int svc_id) execute supervisor call using mem and regs for data transfervoidsvc_abend(int pic, boolean type, boolean req_dump) Display trace table, abend code, psw, instr,and gpr's If dump_reguested: display gpr's display fpr'ss display tiot dcbs dump all storage Abort if not in test modeprivate voidsvc_bldl()search for members specified in BLDL list passed in R1 using SYS390 direcotory list and set return code: 0 - all members found 4 - one or more not found entry field R (offset if all found else 4 if not) 8 - invalid entry count or entry length The R field in entries found is set to 1 and set to 0 if not found.private voidsvc_cfd()convert from display input registers: r1=a(type,out,in) conversion type code: 128 bit integer from 45 byte decimal display EH short from 45 byte scientific notation EB short from 45 byte scientific notation DH long from 45 byte scientific notation DB long from 45 byte scientific notation LH extended from 45 byte scientific notation LB extended from 45 byte scientific notation DD long from 45 byte scientific notation ED short from 45 byte scientific notation LD extended from 45 byte scientific notationprivate voidcheck decb ecb and process as follows: ecb = x'40' exit normally ecb = x'41' take synad error exit ecb = x'42' take eodad exitprivate voidcheck for DCB or ACB and route accordinglyvoidclose file if open else synad errorprivate voidsvc_cmd()exec OS command process r0+1 = CMDLOG x'00', NOCMDLOG x'01' r0+2 = cmd process id 0-9 r0+3 = cmd operation type r1 = A(command) r2 = command length r3 = timeout wait limit in milli-secprivate voidsvc_ctd()convert to display.private voiddelete loaded pgm/dsn from irtual memory if use count 0 after decrement.private voidset/reset program interruption exit if r0=0 cancel last espie added else add new espie exit if r0 negative replace exit else add if r1 not zero, save parm addressprivate voidset/reset task abend exit if r0=0 cancel last estae added else add new estae exit if r0 negative replace exit else add if r1 not zero, save parm addressprivate voidsvc_exit()If stimer_exit_running then restore r13-r15 and exit to saved psw If stae exit running, restore psw and regs from zcvt_stae. If spie exit running, restore psw and regs from zcvt_epie exit to prev link return address or exit ez390 if none.private voidextract svc supports the following functions requires function code in R0.voidInput: r0 = length to return r1 = address to return Output: set r15 to 0 of ok, else abortprivate voidsvc_get()get next record into area from dcb gm/gl
Notes: Translate to EBCDIC unless ASCII mode If GL, move to dcb_area and return addr in R1voidInput: R1 = length to allocate R0 = options: bit 0 allocate memory above the line If tz390.opt_loadhigh alloc from top down else bottom up Output: Set r0 to length of allocated area rounded to doublewords set r1 to address of area set r15 to 0 of ok, else nz set max_mem_blk to largest contig blk for use by sort etc. Notes: Use TRACEMEM option to trace FQE's If no 31 bit memory then allocate from 24 bit memory else abort if requested memory type no available. Select best fit from available blocks: Same size block to reduce fragmentation Smallest block > requested len to save largestprivate voidsvc_guam()GUAM Graphical User Access Method for user I/O vua GUAM GUI dialog window with 3 views: MCS - view for WTO and WTOR I/O SCREEN - view for TPUT and TGET I/O GRAPH - view for graphics Input registers: r1 = major/minor opcode bytesvoidsvc_link()load and then balr to 390 load module Input: r0 = addr pgm name r1 = user parms r15 = 0 use SYS390 default path search r15 = addr dsname if high bit off r15 = addr ddname if high bit on Output: r15 = user pgm return code if call ok abend s106 On first load with option GUAM on, the gz390 GUAM GUI window will be started with default title using program namevoidsvc_load()load 390 load module into virtual memory Input regs: r0 = 8 byte pgm name padded with spaces r15 = 0 use SYS390 default path search r15 = addr dsname if high bit off r15 = addr ddname if high bit on Output regs: r0 = address of 390 program entry based on lz390 rmode option and with high bit indicating amode r1 = length of 390 file loaded in doubleword count for OS compatiblity.private voidload 390 file, relocate, and set r1 lenght in double wordsprivate voidLoad non 390 file Set cde_pgm to file_name Set cde_loc to load address Set cde_len to length in bytes Set cde_ent to -1 Set R0 to load address Set r1 to length in bytesprivate voidread and apply rld records at end of 390 file.private voidset r0, r1, and r15 for loadprivate voidsvc_open()check for DCB or ACB and route accordinglyvoidsvc_open_dcb(String dsnam_path) open DCB file for sequential or random I/O and use dsnam_path prefix for dcbdsnam option
Notes: R1 = DCB R0 = OPEN OPTION x'40' - input only - dcb_oflgs_r x'20' - output only - dcb_oflgs_w x'60' - update - dcb_oflgs_rw DDNAME points to: environment variable with file path and name if DCBDSNAM has pointer to DSN null or " delimited file spec in EBCDIC/ASCII depending on mode See DCBD macro for DCB fields and see DCB macro for generation of DCB TIOT table with unique entry for each DDNAME holds open files. Take synad exit if defined else issue error message and abort. Output registers: R0 - 64 bit file lengthprivate voidset dcb file pointer r1 = address of dcb r0 = 64 bit rbaprivate voidsvc_post()post ecb completeprivate voidsvc_put()put next record from area to dcb pm/pl fileprivate voidsvc_read()read next record forward or backward into area from dcb macrf r/rw fileprivate voidsvc_snap()snap dump control blocks and/or memory.private voidprocess timer interval requestprivate voidreset ez390 trace options from string at R1 with trailing spaceprivate voidtcp/ip sockets I/Oprivate voidRead or write to TN3270 terminal
Notes: If GUAM GUI Access Method enabled, read or write to the GUAM GUI dialog. If no GUAM interface and EDIT mode use WTO/WTOR to MCS console, else error.private voidsvc_time()return time and date in requested format See TIME.MAC for additional information.private voidprocess TTIMER cancel, tu, or mic request: R0 BIT 0 = return MIC at R1 addr else TU om R0 R0 BIT 1 = CANCEL else just return timeprivate voidsvc_wait()wait for ecb posting or stimer exit request.private voidwrite next record forward or backward into area from dcb macrf r/rw fileprivate voidsvc_wtor()request WTOR reply as follows: Save r0=reply, r14 length,r15=ecb Issue wtor message if QUAM GUI option, check for gz390 cmd reply else check for z390 cmd input reply if reply found, post ecb else repeat check at every monitor_update interval until reply found.private voidsvc_xctl()delete current module and then load and then balr to 390 load module Input: r0 = addr pgm name r1 = user parms r15 = 0 use SYS390 default path search r15 = addr dsname if high bit off r15 = addr ddname if high bit on Output: r15 = user pgm return code if call ok abend s106private voidtranslate between ascii/ebcdic.private voidz390 internal sortprivate booleantcp_alloc_conn(int port_index) allocate next conn for server port useprivate voidtcp_free_conn(int conn_index) release tcp connecntion for reuseprivate voidclose all open TCP/IP portsprivate voidtcpio_close_conn(int conn_index) close connectionprivate voidclose all client and server portsprivate voidclose open TCP/IP server portprivate voidtcpio_conn_store_msg(int conn_index) store msg from conn input buffer up to specified lmsg length and return actual length stored in R1. Turn off tcp_conn_msg_ready if 0 available. Notes: First byte may be in conn_byte if conn_read = trueprivate booleanset cur_tcp_client_index to allocated client port and return true else set cur_tcp_client_index to first free client port and return false else set cur_tcp_client index to -1 and return falseprivate booleanset cur_tcp_server_index to allocated server port and return true else set cur_tcp_server_index to first free port and return true else set cur_tcp_server_index to -1 and return false indicating no ports avail.private voidreceive message from client port if nowait and message not ready RC=4 else wait for messageprivate voidreceive message from server port connection.private booleantcpio_set_conn_msg_ready(int conn_index, boolean state) if state true set conn msg ready (byte has been read by conn thread) else if no msg data available reset conn msg ready (will force read on conn thread) else leave conn ready set to true (allows main user thread to read mult msgs without switching back to conn thread for a read)private voidtest_error(String text) issue test error message and return to promptprivate voidtrace memory allocationprivate voidLog msg on z390 system log If QUAM GUI option on, display msg on gz390 mcs window viewprivate voidallocate block using zsort_mem or max avail.private voidclose and delete sortwk01 and sortwk02private booleanzsort_comp(int rec1, int rec2) compare record key fields at mem(rec1) to mem(rec2) and return true if swap requiredprivate voidzsort_error(String msg) issue error and set return code 16private voidrelease storage if alloctedprivate voidget sorted record from zsortprivate voidread next full or partial blk1 from current merge blk1_xrba to blk1_xrba_endprivate voidread next full or partial blk2 from current merge blk2_xrba to blk2_xrba_endprivate voidinitialize for internal sortprivate voidinit for merge of wk01/wk02private voidinit isort or fsort parmsprivate voidmerge sorted blocks from sortwk01 to sortwk02 and back again doubling sorted block size each time until there is 1 sorted blockprivate voidmerge records from 2 blks into 1 output blkprivate voidzsort_move_rec(int from_ptr, int to_ptr) move record of length zsort_lrecl in memoryprivate voidposition to next merge blks in curr passprivate voidopen sort work files and reset rbas to 0private voidpass unsorted record to zsortprivate voidwrite zsort statistics to sta fileprivate voidzsort_read_merge_blk(long file_xrba, long file_xrba_end, int blk_ptr, int blk_end_ptr) read blk into blk_ptr to blk_end_ptr at current merge file_xrba.private voidsort fixed length records in zsort_blk up to zsort_blk_ptrprivate voidterminate zsort freemain allocated memory close/delete sortwk1 and sortwk2private voidzsort_write_blk(RandomAccessFile file, int rec_ptr, int end_ptr) write blk from zsort_blk_addr to zsort_blk_ptr at current addr on fileprivate voidzsort_write_merge_blk(int rec_ptr, int end_ptr) write merged blk to output merge file
-
Field Details
-
max_tiot_files
int max_tiot_filesvariable -
max_cde_pgms
int max_cde_pgmsvariable -
max_link_stk
int max_link_stkvariable -
max_cmd_out
int max_cmd_outvariable -
max_cmd_proc
int max_cmd_procvariable -
max_lsn_spec
int max_lsn_specvariable -
max_dir_list
int max_dir_listvariable -
max_guam_buff
int max_guam_buffvariable -
max_ecb_count
int max_ecb_countvariable -
max_env_name_len
int max_env_name_lenvariable -
max_env_value_len
int max_env_value_lenvariable -
env_name_addr
int env_name_addrvariable -
env_value_addr
int env_value_addrvariable -
env_name
String env_namevariable -
env_value
String env_valuevariable -
tz390
tz390 tz390variable -
pz390
pz390 pz390variable -
vz390
vz390 vz390variable -
msg_id
String msg_idvariable -
pz390_running
boolean pz390_runningvariable -
put_stats_running
boolean put_stats_runningvariable -
ez390_pgm
String ez390_pgmvariable -
ez390_rc
int ez390_rcvariable -
ez390_errors
int ez390_errorsvariable -
ez390_recursive_abort
boolean ez390_recursive_abortvariable -
load_file_name
String load_file_namevariable -
z390_file
RandomAccessFile z390_filevariable -
log_file
File log_filevariable -
log_file_buff
BufferedWriter log_file_buffvariable -
opt_parms
String opt_parmsvariable -
opt_ok
boolean opt_okvariable -
exit_request
boolean exit_requestvariable -
system_abend
boolean system_abendvariable -
user_abend
boolean user_abendvariable -
svc_abend_type
boolean svc_abend_typevariable -
svc_req_dump
boolean svc_req_dumpvariable -
dump_taken
boolean dump_takenvariable -
long_psw_amode31_bit
long long_psw_amode31_bitvariable -
stimer_exit_time
long stimer_exit_timevariable -
stimer_exit_addr
int stimer_exit_addrvariable -
stimer_exit_request
boolean stimer_exit_requestvariable -
stimer_exit_running
boolean stimer_exit_runningvariable -
stimer_save_r13
int stimer_save_r13variable -
stimer_save_r14
int stimer_save_r14variable -
stimer_save_r15
int stimer_save_r15variable -
stimer_save_psw
int stimer_save_pswvariable -
gz390
gz390 gz390variable -
guam_major
int guam_majorvariable -
guam_minor
int guam_minorvariable -
guam_args
int guam_argsvariable -
guam_view_mcs
int guam_view_mcsvariable -
guam_view_tn3270
int guam_view_tn3270variable -
guam_view_graph
int guam_view_graphvariable -
guam_view
int guam_viewvariable -
guam_x
int guam_xvariable -
guam_y
int guam_yvariable -
guam_x2
int guam_x2variable -
guam_y2
int guam_y2variable -
guam_color
int guam_colorvariable -
guam_width
int guam_widthvariable -
guam_height
int guam_heightvariable -
guam_row
int guam_rowvariable -
guam_col
int guam_colvariable -
guam_bg_rgb
int guam_bg_rgbvariable -
guam_text_rgb
int guam_text_rgbvariable -
guam_lfield
int guam_lfieldvariable -
guam_cursor_type
int guam_cursor_typevariable -
guam_font
int guam_fontvariable -
guam_abuff
int guam_abuffvariable -
guam_lbuff
int guam_lbuffvariable -
guam_key_amod
int guam_key_amodvariable -
guam_key_achar
int guam_key_acharvariable -
guam_key
int guam_keyvariable -
guam_mouse
int[] guam_mousevariable -
guam_left
int guam_leftvariable -
guam_right
int guam_rightvariable -
guam_wait
boolean guam_waitvariable -
tpg_flags
int tpg_flagsvariable -
tpg_op_mask
int tpg_op_maskvariable -
tpg_op_tget
int tpg_op_tgetvariable -
tpg_op_tput
int tpg_op_tputvariable -
tpg_wait_mask
int tpg_wait_maskvariable -
tpg_wait
int tpg_waitvariable -
tpg_nowait
int tpg_nowaitvariable -
tpg_type_mask
int tpg_type_maskvariable -
tpg_type_edit
int tpg_type_editvariable -
tpg_type_asis
int tpg_type_asisvariable -
tpg_type_control
int tpg_type_controlvariable -
tpg_type_fullscr
int tpg_type_fullscrvariable -
tget_byte
byte[] tget_bytevariable -
tget_buff
ByteBuffer tget_buffvariable -
tput_byte
byte[] tput_bytevariable -
tput_buff
ByteBuffer tput_buffvariable -
guam_text
String guam_textvariable -
ins_count
int ins_countvariable -
io_count
int io_countvariable -
monitor_timer
Timer monitor_timervariable -
monitor_cmd_time_total
long monitor_cmd_time_totalvariable -
monitor_last_time
long monitor_last_timevariable -
monitor_next_time
long monitor_next_timevariable -
monitor_cur_interval
long monitor_cur_intervalvariable -
monitor_last_ins_count
int monitor_last_ins_countvariable -
monitor_next_ins_count
int monitor_next_ins_countvariable -
monitor_last_io_count
int monitor_last_io_countvariable -
monitor_next_io_count
int monitor_next_io_countvariable -
monitor_cur_ins
long monitor_cur_insvariable -
monitor_cur_int
long monitor_cur_intvariable -
monitor_cur_rate
long monitor_cur_ratevariable -
wto_fld
int wto_fldvariable -
wto_len
int wto_lenvariable -
wtor_reply_buff
BufferedReader wtor_reply_buffvariable -
wtor_reply_pending
boolean wtor_reply_pendingvariable -
wtor_reply_string
String wtor_reply_stringvariable -
wtor_reply_addr
int wtor_reply_addrvariable -
wtor_reply_len
int wtor_reply_lenvariable -
wtor_ecb_addr
int wtor_ecb_addrvariable -
ecb_waiting
int ecb_waitingvariable -
ecb_posted
int ecb_postedvariable -
wait_count
int wait_countvariable -
wait_addr
int wait_addrvariable -
wait_retry
boolean wait_retryvariable -
cmd_proc
Process[] cmd_procvariable -
cmd_proc_thread
Thread[] cmd_proc_threadvariable -
cmd_error_thread
Thread[] cmd_error_threadvariable -
cmd_output_thread
Thread[] cmd_output_threadvariable -
cmd_error_reader
BufferedReader[] cmd_error_readervariable -
cmd_output_reader
BufferedReader[] cmd_output_readervariable -
cmd_input_writer
PrintStream[] cmd_input_writervariable -
cmd_output_queue
LinkedList<String>[] cmd_output_queuevariable -
cmd_proc_running
boolean[] cmd_proc_runningvariable -
cmd_proc_cmdlog
boolean[] cmd_proc_cmdlogvariable -
cmd_proc_rc
int[] cmd_proc_rcvariable -
cmd_proc_io
int[] cmd_proc_iovariable -
cmd_proc_start_time
long[] cmd_proc_start_timevariable -
cmd_error_msg
String[] cmd_error_msgvariable -
cmd_output_msg
String[] cmd_output_msgvariable -
cmd_read_line
String[] cmd_read_linevariable -
tot_cmd
int tot_cmdvariable -
cmd_io_total
int cmd_io_totalvariable -
tot_log_queue
int tot_log_queuevariable -
test_first_cmd
boolean test_first_cmdvariable -
test_file_name
String test_file_namevariable -
test_cmd_abort
boolean test_cmd_abortvariable -
test_loop_count
int test_loop_countvariable -
test_cmd_file
BufferedReader test_cmd_filevariable -
test_cmd
String test_cmdvariable -
test_pattern
Pattern test_patternvariable -
test_match
Matcher test_matchvariable -
test_token
String test_tokenvariable -
test_bias
char test_biasvariable -
test_token_len
int test_token_lenvariable -
test_opcode
char test_opcodevariable -
test_addr
int test_addrvariable -
test_next_addr
int test_next_addrvariable -
test_sdt
String test_sdtvariable -
test_addr_type
byte test_addr_typevariable -
test_addr_mem
byte test_addr_memvariable -
test_addr_reg
byte test_addr_regvariable -
test_addr_sdt
byte test_addr_sdtvariable -
test_addr_psw
byte test_addr_pswvariable -
test_compare
byte test_comparevariable -
test_base_addr
int test_base_addrvariable -
test_mem_loc
int test_mem_locvariable -
test_mem_len
int test_mem_lenvariable -
test_reg_loc
int test_reg_locvariable -
test_reg_sdt
long test_reg_sdtvariable -
test_mem_sdt
byte[] test_mem_sdtvariable -
test_v_retcode
int test_v_retcodevariable -
test_script_mode_batch
boolean test_script_mode_batchvariable -
test_break_addr_mode
boolean test_break_addr_modevariable -
test_break_reg_mode
boolean test_break_reg_modevariable -
test_break_mem_mode
boolean test_break_mem_modevariable -
test_break_op_mode
boolean test_break_op_modevariable -
tot_test_break_addr
int tot_test_break_addrvariable -
max_break_addr
int max_break_addrvariable -
test_break_addr
int[] test_break_addrvariable -
test_break_op_ins
long test_break_op_insvariable -
test_break_addr_cmd
String[] test_break_addr_cmdvariable -
test_break_reg_cmd
String test_break_reg_cmdvariable -
test_break_mem_cmd
String test_break_mem_cmdvariable -
test_break_op_cmd
String test_break_op_cmdvariable -
test_break_reg
boolean test_break_regvariable -
test_break_mem
boolean test_break_memvariable -
test_break_reg_loc
int test_break_reg_locvariable -
test_break_reg_compare
int test_break_reg_comparevariable -
test_break_reg_val
long test_break_reg_valvariable -
test_break_reg_sdt
long test_break_reg_sdtvariable -
test_break_mem_loc
int test_break_mem_locvariable -
test_break_mem_byte
byte test_break_mem_bytevariable -
test_break_mem_compare
int test_break_mem_comparevariable -
test_break_mem_equal
int test_break_mem_equalvariable -
test_break_mem_sdt
byte[] test_break_mem_sdtvariable -
test_break_op1
int test_break_op1variable -
test_break_op2
int test_break_op2variable -
test_break_op2_index
int test_break_op2_indexvariable -
test_break_op2_mask
int test_break_op2_maskvariable -
cur_date_MMddyy
SimpleDateFormat cur_date_MMddyyvariable -
cur_tod_hhmmss
SimpleDateFormat cur_tod_hhmmssvariable -
cur_tod_hhmmss00
SimpleDateFormat cur_tod_hhmmss00variable -
cur_date_yyyy
SimpleDateFormat cur_date_yyyyvariable -
cur_date_MM
SimpleDateFormat cur_date_MMvariable -
cur_date_dd
SimpleDateFormat cur_date_ddvariable -
cur_date_HH
SimpleDateFormat cur_date_HHvariable -
cur_date_mm
SimpleDateFormat cur_date_mmvariable -
cur_date_ss
SimpleDateFormat cur_date_ssvariable -
cur_date_ms
SimpleDateFormat cur_date_msvariable -
cur_date_yyddd
SimpleDateFormat cur_date_yydddvariable -
cur_date_yyyyddd
SimpleDateFormat cur_date_yyyydddvariable -
cur_date_MMddyyyy
SimpleDateFormat cur_date_MMddyyyyvariable -
cur_date_ddMMyyyy
SimpleDateFormat cur_date_ddMMyyyyvariable -
cur_date_yyyyMMdd
SimpleDateFormat cur_date_yyyyMMddvariable -
cur_date_year
int cur_date_yearvariable -
cur_date_month
int cur_date_monthvariable -
cur_date_day
int cur_date_dayvariable -
tod_hour
int tod_hourvariable -
tod_min
int tod_minvariable -
tod_sec
int tod_secvariable -
tod_msec
int tod_msecvariable -
time_mil
long time_milvariable -
cur_date_cal
Calendar cur_date_calvariable -
tod_start_day
long tod_start_dayvariable -
tod_start_pgm
long tod_start_pgmvariable -
tod_end_pgm
long tod_end_pgmvariable -
tot_sec
long tot_secvariable -
tod_time_limit
long tod_time_limitvariable -
next_time_ins
int next_time_insvariable -
next_time_check
int next_time_checkvariable -
log_tod
boolean log_todvariable -
z390_log_text
JTextArea z390_log_textvariable -
z390_command_text
JTextField z390_command_textvariable -
ez390_startup
boolean ez390_startupvariable -
load_code_ver
char[] load_code_vervariable -
z390_flags
char[] z390_flagsvariable -
z390_flags_amode31
int z390_flags_amode31variable -
z390_flags_rmode31
int z390_flags_rmode31variable -
load_dsn
String load_dsnvariable -
load_dsn_addr
int load_dsn_addrvariable -
load_pgm_dir
String load_pgm_dirvariable -
load_pgm_name
String load_pgm_namevariable -
alias_name_byte
byte[] alias_name_bytevariable -
load_pgm_type
String load_pgm_typevariable -
load_vcdt_entry
String load_vcdt_entryvariable -
load_vcdt_mode
boolean load_vcdt_modevariable -
load_code_load
int load_code_loadvariable -
load_code_len
int load_code_lenvariable -
load_code_ent
int load_code_entvariable -
load_code_rlds
int load_code_rldsvariable -
tot_cde
int tot_cdevariable -
cur_cde
int cur_cdevariable -
cde_name
String[] cde_namevariable -
cde_file
String[] cde_filevariable -
cde_use
short[] cde_usevariable -
cde_loc
int[] cde_locvariable -
cde_len
int[] cde_lenvariable -
cde_ent
int[] cde_entvariable -
cde_addr
int[] cde_addrvariable -
cded_len
int cded_lenvariable -
tot_link_stk
int tot_link_stkvariable -
link_stk_cde
int[] link_stk_cdevariable -
link_stk_ret
int[] link_stk_retvariable -
rld_loc
int rld_locvariable -
rld_len
byte rld_lenvariable -
ctd_display_len
int ctd_display_lenvariable -
ctd_e
float ctd_evariable -
ctd_d
double ctd_dvariable -
ctd_byte
byte[] ctd_bytevariable -
ctd_bi
BigInteger ctd_bivariable -
ctd_bd
BigDecimal ctd_bdvariable -
ctd_text
String ctd_textvariable -
cfd_e
float cfd_evariable -
cfd_d
double cfd_dvariable -
cfd_byte
byte[] cfd_bytevariable -
cfd_bi
BigInteger cfd_bivariable -
cfd_bd
BigDecimal cfd_bdvariable -
cfd_text
String cfd_textvariable -
lock
variable -
lock_condition
variable -
tcpio_server_running
boolean tcpio_server_runningvariable -
tcpio_conn_ready_count
int tcpio_conn_ready_countvariable -
max_tcp_server_port
int max_tcp_server_portvariable -
cur_tcp_server_index
int cur_tcp_server_indexvariable -
tcp_server_port
int[] tcp_server_portvariable -
tcp_server_open
boolean[] tcp_server_openvariable -
tcp_server_thread
Thread[] tcp_server_threadvariable -
tcp_server_conn_index
int[] tcp_server_conn_indexvariable -
tcp_server_socket
ServerSocket[] tcp_server_socketvariable -
tcp_server_host_text
String[] tcp_server_host_textvariable -
tcp_server_host_ip
InetAddress[] tcp_server_host_ipvariable -
max_tcp_conn
int max_tcp_connvariable -
cur_tcp_conn
int cur_tcp_connvariable -
tcp_conn_thread
Thread[] tcp_conn_threadvariable -
tcp_conn_socket
Socket[] tcp_conn_socketvariable -
tcp_conn_server_port
int[] tcp_conn_server_portvariable -
tcp_conn_server_index
int[] tcp_conn_server_indexvariable -
tcp_conn_msg_ready
boolean[] tcp_conn_msg_readyvariable -
tcp_conn_read
boolean[] tcp_conn_readvariable -
tcp_conn_byte
byte[] tcp_conn_bytevariable -
tcp_conn_input
DataInputStream[] tcp_conn_inputvariable -
tcp_conn_output
PrintStream[] tcp_conn_outputvariable -
max_tcp_client_port
int max_tcp_client_portvariable -
cur_tcp_client_index
int cur_tcp_client_indexvariable -
tcp_client_port
int[] tcp_client_portvariable -
tcp_client_socket
Socket[] tcp_client_socketvariable -
tcp_client_host_text
String[] tcp_client_host_textvariable -
tcp_client_host_ip
InetAddress[] tcp_client_host_ipvariable -
tcp_client_input
DataInputStream[] tcp_client_inputvariable -
tcp_client_output
PrintStream[] tcp_client_outputvariable -
tcpio_op
int tcpio_opvariable -
tcpio_flags
int tcpio_flagsvariable -
tcpio_wait
boolean tcpio_waitvariable -
tcpio_conn
int tcpio_connvariable -
tcpio_amsg
int tcpio_amsgvariable -
tcpio_lmsg
int tcpio_lmsgvariable -
tcpio_lmax
int tcpio_lmaxvariable -
tcpio_lmin
int tcpio_lminvariable -
tcpio_host_ip_addr
int tcpio_host_ip_addrvariable -
tcpio_host_ip_text
String tcpio_host_ip_textvariable -
tcpio_host_name
String tcpio_host_namevariable -
tcpio_host_ip
InetAddress tcpio_host_ipvariable -
tcpio_port
int tcpio_portvariable -
tot_tcpio_oper
int tot_tcpio_opervariable -
tot_tcpio_openc
int tot_tcpio_opencvariable -
tot_tcpio_opens
int tot_tcpio_opensvariable -
tot_tcpio_closec
int tot_tcpio_closecvariable -
tot_tcpio_closes
int tot_tcpio_closesvariable -
tot_tcpio_send
int tot_tcpio_sendvariable -
tot_tcpio_recv
int tot_tcpio_recvvariable -
tot_tiot_files
int tot_tiot_filesvariable -
cur_tiot_index
int cur_tiot_indexvariable -
tot_dcb_oper
int tot_dcb_opervariable -
tot_dcb_open
int tot_dcb_openvariable -
tot_dcb_close
int tot_dcb_closevariable -
tot_dcb_get
int tot_dcb_getvariable -
tot_dcb_put
int tot_dcb_putvariable -
tot_dcb_read
int tot_dcb_readvariable -
tot_dcb_write
int tot_dcb_writevariable -
cur_decb_addr
int cur_decb_addrvariable -
cur_ecb
int cur_ecbvariable -
decb_ecb
int decb_ecbvariable -
decb_type
int decb_typevariable -
decb_dcb
int decb_dcbvariable -
decb_area
int decb_areavariable -
cur_rba
long cur_rbavariable -
cur_dcb_addr
int cur_dcb_addrvariable -
cur_open_opt
int cur_open_optvariable -
cur_dcbe_addr
int cur_dcbe_addrvariable -
cur_dcb_ddnam
String cur_dcb_ddnamvariable -
cur_dcb_file_name
String cur_dcb_file_namevariable -
cur_dcb_oflgs
int cur_dcb_oflgsvariable -
cur_dcb_synad
int cur_dcb_synadvariable -
cur_dcb_eodad
int cur_dcb_eodadvariable -
cur_dcb_macrf
int cur_dcb_macrfvariable -
cur_dcb_recfm
int cur_dcb_recfmvariable -
cur_dcb_area
int cur_dcb_areavariable -
cur_dcb_lrecl_f
int cur_dcb_lrecl_fvariable -
cur_dcb_blksi_f
int cur_dcb_blksi_fvariable -
cur_vrec_lrecl
int cur_vrec_lreclvariable -
cur_rec_text
String cur_rec_textvariable -
cur_rec_len
int cur_rec_lenvariable -
dcb_dsorg
int dcb_dsorgvariable -
dcb_dsorg_ps
int dcb_dsorg_psvariable -
dcb_dsorg_da
int dcb_dsorg_davariable -
dcb_iobad
int dcb_iobadvariable -
dcb_eodad
int dcb_eodadvariable -
dcb_recfm
int dcb_recfmvariable -
dcb_recfm_f
int dcb_recfm_fvariable -
dcb_recfm_v
int dcb_recfm_vvariable -
dcb_recfm_fb
int dcb_recfm_fbvariable -
dcb_recfm_vb
int dcb_recfm_vbvariable -
dcb_recfm_ft
int dcb_recfm_ftvariable -
dcb_recfm_vt
int dcb_recfm_vtvariable -
dcb_ddnam
int dcb_ddnamvariable -
dcb_id
int dcb_idvariable -
dcb_oflgs
int dcb_oflgsvariable -
dcb_oflgs_open
int dcb_oflgs_openvariable -
dcb_oflgs_r
int dcb_oflgs_rvariable -
dcb_oflgs_w
int dcb_oflgs_wvariable -
dcb_oflgs_rw
int dcb_oflgs_rwvariable -
dcb_macrf
int dcb_macrfvariable -
dcb_macrf_gm
int dcb_macrf_gmvariable -
dcb_macrf_pm
int dcb_macrf_pmvariable -
dcb_macrf_gl
int dcb_macrf_glvariable -
dcb_macrf_pl
int dcb_macrf_plvariable -
dcb_macrf_r
int dcb_macrf_rvariable -
dcb_macrf_w
int dcb_macrf_wvariable -
dcb_macrf_rw
int dcb_macrf_rwvariable -
dcb_synad
int dcb_synadvariable -
dcb_blksi_f
int dcb_blksi_fvariable -
dcb_lrecl_f
int dcb_lrecl_fvariable -
dcb_rec
int dcb_recvariable -
dcb_dsnam
int dcb_dsnamvariable -
dcb_dcbe
int dcb_dcbevariable -
dcb_io
int dcb_iovariable -
dcb_len
int dcb_lenvariable -
dcbe_flg1
int dcbe_flg1variable -
dcbeulbi
int dcbeulbivariable -
dcbe_eodad
int dcbe_eodadvariable -
dcbe_synad
int dcbe_synadvariable -
dcb_synad_recur
boolean dcb_synad_recurvariable -
tiot_dcb_open
boolean[] tiot_dcb_openvariable -
tiot_ddnam
String[] tiot_ddnamvariable -
tiot_dsn
String[] tiot_dsnvariable -
tiot_dcb_addr
int[] tiot_dcb_addrvariable -
tiot_vrec_blksi
int[] tiot_vrec_blksivariable -
tiot_cur_rba
long[] tiot_cur_rbavariable -
tiot_eof_rba
long[] tiot_eof_rbavariable -
tiot_file
RandomAccessFile[] tiot_filevariable -
ascii_lf
int ascii_lfvariable -
ascii_cr
int ascii_crvariable -
ascii_period
int ascii_periodvariable -
ascii_space
int ascii_spacevariable -
ebcdic_period
int ebcdic_periodvariable -
ebcdic_space
int ebcdic_spacevariable -
req_addr
int req_addrvariable -
req_len
int req_lenvariable -
req_opt
int req_optvariable -
cur_fqe
int cur_fqevariable -
cur_fqe_len
int cur_fqe_lenvariable -
prev_fqe
int prev_fqevariable -
next_fqe
int next_fqevariable -
next_fqe_len
int next_fqe_lenvariable -
best_cur_fqe
int best_cur_fqevariable -
best_prev_fqe
int best_prev_fqevariable -
best_fqe_len
int best_fqe_lenvariable -
max_mem_blk
int max_mem_blkvariable -
opt_getmain_amode31
int opt_getmain_amode31variable -
opt_getmain_cond
int opt_getmain_condvariable -
cur_vsam_op
int cur_vsam_opvariable -
vsam_op_open
int vsam_op_openvariable -
vsam_op_clsoe
int vsam_op_clsoevariable -
zsort_pfx
String zsort_pfxvariable -
zsort_start
String zsort_startvariable -
zsort_ended
String zsort_endedvariable -
zsort_elapsed
String zsort_elapsedvariable -
zsort_id
int zsort_idvariable -
zsort_abort
boolean zsort_abortvariable -
zsort_put
boolean zsort_putvariable -
zsort_get
boolean zsort_getvariable -
zsort_parm_addr
int zsort_parm_addrvariable -
zsort_lrecl
int zsort_lreclvariable -
zsort_mem
int zsort_memvariable -
zsort_min_blk_rec
int zsort_min_blk_recvariable -
zsort_max_keys
int zsort_max_keysvariable -
zsort_tot_keys
int zsort_tot_keysvariable -
zsort_key_off
int[] zsort_key_offvariable -
zsort_key_len
int[] zsort_key_lenvariable -
zsort_key_type
byte[] zsort_key_typevariable -
zsort_key_order
byte[] zsort_key_ordervariable -
zsort_psw_cc
int zsort_psw_ccvariable -
zsort_tot_sorts
int zsort_tot_sortsvariable -
zsort_tot_passes
int zsort_tot_passesvariable -
zsort_sortwk01_dsn
String zsort_sortwk01_dsnvariable -
zsort_sortwk02_dsn
String zsort_sortwk02_dsnvariable -
zsort_sortwk01_file
RandomAccessFile zsort_sortwk01_filevariable -
zsort_sortwk02_file
RandomAccessFile zsort_sortwk02_filevariable -
zsort_sortwk_len
long zsort_sortwk_lenvariable -
zsort_tot_read
int zsort_tot_readvariable -
zsort_tot_write
int zsort_tot_writevariable -
zsort_tot_svc_put
int zsort_tot_svc_putvariable -
zsort_tot_svc_get
int zsort_tot_svc_getvariable -
zsort_tot_comp
int zsort_tot_compvariable -
zsort_tot_move
int zsort_tot_movevariable -
zsort_fm_len
int zsort_fm_lenvariable -
zsort_blk_len
int zsort_blk_lenvariable -
zsort_blk_addr
int zsort_blk_addrvariable -
zsort_blk_end
int zsort_blk_endvariable -
zsort_blk_ptr
int zsort_blk_ptrvariable -
zsort_blk1_addr
int zsort_blk1_addrvariable -
zsort_blk1_ptr
int zsort_blk1_ptrvariable -
zsort_blk1_ptr_end
int zsort_blk1_ptr_endvariable -
zsort_blk2_addr
int zsort_blk2_addrvariable -
zsort_blk2_ptr
int zsort_blk2_ptrvariable -
zsort_blk2_ptr_end
int zsort_blk2_ptr_endvariable -
zsort_blk3_addr
int zsort_blk3_addrvariable -
zsort_blk3_ptr
int zsort_blk3_ptrvariable -
zsort_blk3_ptr_end
int zsort_blk3_ptr_endvariable -
zsort_blk1_xrba
long zsort_blk1_xrbavariable -
zsort_blk2_xrba
long zsort_blk2_xrbavariable -
zsort_blk1_xrba_end
long zsort_blk1_xrba_endvariable -
zsort_blk2_xrba_end
long zsort_blk2_xrba_endvariable -
zsort_read_len
int zsort_read_lenvariable -
zsort_write_len
int zsort_write_lenvariable -
zsort_merge_wk01
boolean zsort_merge_wk01variable -
zsort_wk_name
String zsort_wk_namevariable -
zsort_merge_mem_blk_len
int zsort_merge_mem_blk_lenvariable -
zsort_merge_wk_blk_len
long zsort_merge_wk_blk_lenvariable -
zsort_merge_pass
int zsort_merge_passvariable -
cc_descriptions
String[] cc_descriptionsvariable -
maskbit_descriptions
String[] maskbit_descriptionsvariable -
on_off
String[] on_offvariable -
byte_mask_bit
final byte[] byte_mask_bitvariable -
mask_name
variable -
flag_name
variable -
DFPRoundingMode_name
variable -
BFPRoundingMode_name
variable -
zACB_list
LinkedList<zACB> zACB_listvariable
-
-
Constructor Details
-
sz390
public sz390()Dummy constructor - no initialization needed
-
-
Method Details
-
svc
public void svc(int svc_id) execute supervisor call using mem and regs for data transfer- Parameters:
svc_id- - SVC number, can be different from MVS assignment
-
put_log
Write message to z390_log_text and/or con if running standalone- Parameters:
msg- - text of message to be logged
-
put_log_line
put line to listing file- Parameters:
msg- - text of message to be written
-
put_con
put msg to console or cmd process output and yield to let parent process m- Parameters:
msg- - text of message to be written
-
log_error
issue error msg to log with prefix and increment error total Yet suppress if not gen_obj and not trace- Parameters:
error- - error codemsg- - text of error message
-
abort_error
issue error msg to log with prefix and increment error total- Parameters:
error- - error numbermsg- - error message
-
exit_ez390
public void exit_ez390()display total errors close files and exit -
close_z390_guam
private void close_z390_guam()if exit request, send shutdown request to z390 GUI via the sysout queue -
put_stats
private void put_stats()display statistics as comments at end of bal -
put_stat_line
routine statistics line to LOG or STATS(file)- Parameters:
msg- - message text
-
close_files
private void close_files()close log, err, tre, xrd, xpr, xph, xgt, and xpt Assist files -
close_cmd
private void close_cmd()cancel all active cmd processes -
init_time
public void init_time()init pz390.cur_date and calendar with current time and date or force fixed time if NOTIMING option set.
Notes:- This NOTTIMING option is used in regression testing timing functions for repeatable results.
-
init_test
public void init_test()- init test regular expression parser
- init optional test=ddname file for batch input else init test_cmd_file which is also used for wtor replies when not in GUAM GUI mode
- self defining terms
- B'01'
- C'ABC'
- F'nnn'
- H'nnn'
- X'0F'
- register
- nr or nR
- memory address
- hex. for absolute memory address
- dec for decimal addr (for list len)
- +hex or -hex for rel base address
- *+hex or *-hex for rel instr. addr
- nnr% for 24 bit indirect reg addr
- nnR& for 31 bit indirect reg addr
- break compare operators
- =, <, >, !=, >=, <=
- test commands (b,g,h,l,m,q,t)
- test break opcode names
- set operator =
-
open_files
public void open_files()- Set trace file for TRACE and TRACEALL
- Open 390 and lst files
-
svc_exit
private void svc_exit()- If stimer_exit_running then restore r13-r15 and exit to saved psw
- If stae exit running, restore psw and regs from zcvt_stae.
- If spie exit running, restore psw and regs from zcvt_epie
- exit to prev link return address or exit ez390 if none.
-
svc_extract
private void svc_extract()extract svc supports the following functions requires function code in R0. Supported function code values:- GETENV get environment variable
- input r1=name with null terminator
- output r2=getmain'd area value and null terminator
- GETENV get environment variable
-
svc_load
public void svc_load()load 390 load module into virtual memory Input regs:- r0 = 8 byte pgm name padded with spaces
- r15 = 0 use SYS390 default path search
- r15 = addr dsname if high bit off
- r15 = addr ddname if high bit on
- r0 = address of 390 program entry based on lz390 rmode option and with high bit indicating amode
- r1 = length of 390 file loaded in doubleword count for OS compatiblity. Length in bytes if not 390 file
- r15 = return code 0 ok or 4 if not found
- Add CDE to chain from CVTCDE else increment CVTUSE for access by user programs
- Amode is taken from load module's amode option as set by lz390
- If not 390 file, r0 = load address
- Add CDE entry for new entry else if already loaded, increment cde_use and return existing load address.
-
svc_load_set_regs
private void svc_load_set_regs()set r0, r1, and r15 for load -
svc_load_390
private void svc_load_390()load 390 file, relocate, and set r1 lenght in double words -
svc_load_rlds
private void svc_load_rlds()read and apply rld records at end of 390 file. -
svc_load_file
private void svc_load_file()- Load non 390 file
- Set cde_pgm to file_name
- Set cde_loc to load address
- Set cde_len to length in bytes
- Set cde_ent to -1
- Set R0 to load address
- Set r1 to length in bytes
-
svc_xctl
private void svc_xctl()delete current module and then load and then balr to 390 load module Input:- r0 = addr pgm name
- r1 = user parms
- r15 = 0 use SYS390 default path search
- r15 = addr dsname if high bit off
- r15 = addr ddname if high bit on
- r15 = user pgm return code if call ok
- abend s106
-
get_load_dsn
public boolean get_load_dsn(int dd_dsn_addr) Set DSN from addr DDNAM with high bit or from addr DSNAM.- If vcdt_load then strip .xxx and set vcdt_entry = xxx else set to ACBNAME
- Set following from ddname/dsname:
- load_pgm_dir (overrides dir_390 default)
- load_pgm_name
- load_pgm_type
- Return true if ok else false
- If dir_addr high bit on, get user list from 8 byte ddname env. var. at dir_addr
- else get user list from dir_addr with null delimited or double quote delimiter
- Parameters:
dd_dsn_addr- = pointer to DD or DSN- Returns:
- boolean
-
get_eploc_pgm_name
private boolean get_eploc_pgm_name()set load_pgm_name from r0 else error- Returns:
- true if successful, false otherwise
-
svc_delete
private void svc_delete()delete loaded pgm/dsn from irtual memory if use count 0 after decrement.
Input regs:- r0 = 8 byte pgm name padded with spaces
- r15 = 0 use SYS390 default path search
- r15 = addr dsname if high bit off
- r15 = addr ddname if high bit on
- r15 = 0 if successfully deleted
- r15 = 4 if not found in memory
-
find_link_cde
private boolean find_link_cde()return true if cur_cde is on link stack else false. Used to prevent deleting link entries.- Returns:
- true if successful, false otherwise
-
delete_cur_cde
private boolean delete_cur_cde()if cur_cde not -1 and cde_loc not 0 #714 decrement use count for cur_cde if use count 0 freemain memory set cde_loc to 0 to release cde entry if remove CDE from CVTCDE queue is successful #714 freemain CDE storage #714 set cde_addr to 0 to indicate no cde #714 endif #714 return true else if cur_cde not -1 and cde_addr = 0 #714 return false #714 else abort: delete cde system error #714 return false endif- Returns:
- true if successful, false otherwise
-
remove_cde
private boolean remove_cde(int cde) Remove CDE from CVTCDE chain- Parameters:
cde- address of CDE to remove- Returns:
trueif CDE removed, elsefalse
-
add_cde
private void add_cde()add new 390 load module to cde entry table and set usage to 1 -
svc_link
public void svc_link()load and then balr to 390 load module Input:- r0 = addr pgm name
- r1 = user parms
- r15 = 0 use SYS390 default path search
- r15 = addr dsname if high bit off
- r15 = addr ddname if high bit on
- r15 = user pgm return code if call ok
- abend s106
- On first load with option GUAM on, the gz390 GUAM GUI window will be started with default title using program name
-
svc_getmain
public void svc_getmain()Input:- R1 = length to allocate
- R0 = options: bit 0 allocate memory above the line
- If tz390.opt_loadhigh alloc from top down else bottom up
- Set r0 to length of allocated area rounded to doublewords
- set r1 to address of area
- set r15 to 0 of ok, else nz
- set max_mem_blk to largest contig blk for use by sort etc.
- Use TRACEMEM option to trace FQE's
- If no 31 bit memory then allocate from 24 bit memory else abort if requested memory type no available.
- Select best fit from available blocks:
- Same size block to reduce fragmentation
- Smallest block > requested len to save largest
-
alloc_from_fqe
private void alloc_from_fqe()alloc memory for GETMAIN from current FQE -
svc_freemain
public void svc_freemain()Input:- r0 = length to return
- r1 = address to return
- set r15 to 0 of ok, else abort
-
check_fqe_ok
private boolean check_fqe_ok()trace fqe if option tracemem on and verify address and length ok- Returns:
- true if okay, false otherwise
-
trace_mem
trace memory allocation- Parameters:
mem_type- memory typemem_addr- starting addressmem_len- length in bytesmem_nxt- pointer to next chunk
-
svc_time
private void svc_time()return time and date in requested format See TIME.MAC for additional information.- R0 LH = date type
- R0 LL = time type
- R1 = storage address for MIC,STCK,STCKE
- When option NOTIMING is specified, the time and date are fixed at:
- TOD = 22:33:44:567 milliseconds
- DATE = 2005.002 (Jan 2, 2005)
- See mac\TIME.MAC for documentation
-
svc_ttimer
private void svc_ttimer()process TTIMER cancel, tu, or mic request:- R0 BIT 0 = return MIC at R1 addr else TU om R0
- R0 BIT 1 = CANCEL else just return time
-
svc_stimer
private void svc_stimer()process timer interval request -
start_stimer_exit
public void start_stimer_exit()Start stimer exit when stimer_exit_request found true by instruction loop or wait loop -
get_ccyydddf
private int get_ccyydddf()return ccyydddf for r1 linkage=svc calls- Returns:
- an integer value is returned whose bit pattern represents the date ccyyddd as a packed decimal with X'F' sign nibble
-
svc_bldl
private void svc_bldl()search for members specified in BLDL list passed in R1 using SYS390 direcotory list and set return code:- 0 - all members found
- 4 - one or more not found entry field R (offset if all found else 4 if not)
- 8 - invalid entry count or entry length
-
svc_abend
public void svc_abend(int pic, boolean type, boolean req_dump) - Display trace table, abend code, psw, instr,and gpr's
- If dump_reguested:
- display gpr's
- display fpr'ss
- display tiot dcbs
- dump all storage
- Abort if not in test mode
- Parameters:
pic- program interrupt codetype- true if System abend, false for user abendsreq_dump- true if memory dump requested
-
list_trace_table
private void list_trace_table()list last 10 instructions in trable table -
dump_psw
in amode24/amode31: return 16 character hex PSW with the following bit settings:- bits 0-7 x'07' translation, I/O interrupts, and external interrupts enabled.
- Bits 8-14 x'84' key eight, machine checks enabled
- Bit 15: Problem state (should be on: no SVC mode in z390)
- Bits 16-23 AS(2),CC(2),MASK(4)
- AS - translation mode zeros
- CC - condition code 0=CC8, 1=CC4, 2=CC2, 3=CC1
- MASK - fixed, decimal, HFP exp, HFP sig.
- Bits 24-31 zeros (64 bit addressing if 31 and 32 are one)
- Bit 31 basic addressing mode 0=24, 1=31
- Bits 32-63 - address of next instruction
- bits 0-7 x'07' PER disabled, DAT enabled, I/O and external interrupts enabled
- Bits 8-14 x'84' key eight, machine checks enabled; No Wait state
- Bit 15: Problem state (should be on: no SVC mode in z390)
- Bits 16-23 AS(2),CC(2),MASK(4)
- AS - Address Space control: zero
- CC - condition code 0=CC8, 1=CC4, 2=CC2, 3=CC1
- MASK - fixed, decimal, HFP exp, HFP significance
- Bits 24-31 x'01' Amode64 enabled
- Bits 32-63 x'80000000' Amode 64 requires amode31 on
- Bits 64-95 x'00000000' High word of PSW address always 0
- Bits 96-127: next sequential instruction address
- Returns:
- formatted PSW for current amode
-
dump_psw16
return 32 character PSW in format as defined by z-PoP:- bits 0-7 x'07' PER disabled, DAT enabled, I/O and external interrupts enabled
- Bits 8-14 x'84' key eight, machine check enabled, no wait state
- Bit 15: Problem state (should be on: no SVC mode in z390)
- Bits 16-23 AS(2),CC(2),MASK(4)
- AS - Address Space control: zero
- CC - condition code 0=CC8, 1=CC4, 2=CC2, 3=CC1
- MASK - fixed, decimal, HFP exp, HFP significance
- Bits 24-31 x'01' Amode64 enabled
- Bits 32-63 x'80000000' Amode 64 requires amode31 on
- Bits 64-95 x'00000000' High word of PSW address always 0
- Bits 96-127: next sequential instruction address
- Returns:
- formatted 32-bit psw
-
dump_req
private void dump_req(boolean req_dump) dump regs and optionals dump everything- Parameters:
req_dump- true to request a dump, false to suppress dumping
-
dump_gpr
public void dump_gpr(int reg_offset) dump specified register or all if -1- Parameters:
reg_offset- Offset in bytes in register array of register to be dumped
-
dump_ar
public void dump_ar(int ar_reg_num) dump specified access register or all if -1- Parameters:
ar_reg_num- access register number
-
get_fpc
public int get_fpc()Get the FPC (floating-point-control register) value- Returns:
- the FPC value
-
dump_fpc
Dump the FPC (floating-point-control register)- Parameters:
cmd- the command; "FPC" or "FPC+"
-
dump_fpc
public void dump_fpc(boolean fpcplus) Dump the FPC (floating-point-control register) Summary dump (just the value); if fpcplus is true, a verbose dump is also done.- Parameters:
fpcplus- true means verbose FPC; false means summary FPC
-
dump_fpcplus
public void dump_fpcplus(int fpc) Verbose dump of the FPC (floating-point-control register)- Parameters:
fpc- the FPC
-
dump_fpr
public void dump_fpr(int reg_offset) dump specified fp register or all if -1- Parameters:
reg_offset- offset in bytes within register array; negative to dump all
-
dump_mem
dump specified area of memory- Parameters:
memory- array that implements memory to be dumpedmem_addr- offset where dump should startmem_len- length in bytes of area to dump
-
bytes_to_hex
Format bytes into hex string. If chunk > 0 insert space after each chunk except the last chunk.- Parameters:
bytes- byte array from which to take the input databyte_start- starting offset within the byte arraybyte_length- nr of bytes to formatchunk- chunk size in bytes- Returns:
- formatted dunp - hex string of contents of the byte array
-
put_dump
route dump lines to LOG file unless TRACE or TRACET is on in which case route to TRE file.- Parameters:
text- specifies the text to be logged/traced
-
dump_mem_stat
private void dump_mem_stat()display total allocated and free memory totals on log -
svc_open
private void svc_open()check for DCB or ACB and route accordingly -
svc_open_dcb
open DCB file for sequential or random I/O and use dsnam_path prefix for dcbdsnam option
Notes:- R1 = DCB
- R0 = OPEN OPTION
- x'40' - input only - dcb_oflgs_r
- x'20' - output only - dcb_oflgs_w
- x'60' - update - dcb_oflgs_rw
- DDNAME points to:
- environment variable with file path and name
- if DCBDSNAM has pointer to DSN null or " delimited file spec in EBCDIC/ASCII depending on mode
- See DCBD macro for DCB fields and see DCB macro for generation of DCB
- TIOT table with unique entry for each DDNAME holds open files.
- Take synad exit if defined else issue error message and abort.
- R0 - 64 bit file length
- Parameters:
dsnam_path- dsname or path string
-
get_dcb_locate_buffer
private void get_dcb_locate_buffer()set dcb_rec to address of get/put locate buffer else abort -
get_dcb_file_name
Get file name from DCBDSNAM if not zero and append dsnam_path else get file from DCBDDNAM environment variable.
Notes:- DCBDSNAM is EBCDIC uless in ASCII mode.
- File spec up to 265 long spacey name with drive and path.
- Parameters:
dsnam_path- dsname or path string- Returns:
- file name; empty string on failure
-
get_tiot_file_name
return file name for tiot using ddname for tiot- Parameters:
tiot_index- tiot table index- Returns:
- file path and name with correct separators for current environment
-
svc_close
private void svc_close()check for DCB or ACB and route accordingly -
svc_close_dcb
public void svc_close_dcb()close file if open else synad error -
svc_get
private void svc_get()get next record into area from dcb gm/gl
Notes:- Translate to EBCDIC unless ASCII mode
- If GL, move to dcb_area and return addr in R1
-
svc_put
private void svc_put()put next record from area to dcb pm/pl file -
svc_read
private void svc_read()read next record forward or backward into area from dcb macrf r/rw file -
svc_write
private void svc_write()write next record forward or backward into area from dcb macrf r/rw file -
svc_check
private void svc_check()check decb ecb and process as follows:- ecb = x'40' exit normally
- ecb = x'41' take synad error exit
- ecb = x'42' take eodad exit
-
svc_point
private void svc_point()set dcb file pointer- r1 = address of dcb
- r0 = 64 bit rba
-
dcb_synad_error
take synad exit if defined else issue error message and issue pgm check- Parameters:
error_num- error numbererror_msg- error message
-
dcb_eodad_exit
private void dcb_eodad_exit()take eodad exit if defined else issue error message and abort -
check_dcb_addr
private void check_dcb_addr()validate that cur_dcb_addr is on full word bound and that DCBID = EBCDIC or ASCII C'DCB1' else abort.
Notes:- Also reset dcb_synad_recur
- Incr DCB I/O request counter
-
get_cur_tiot_index
private void get_cur_tiot_index()- Using cur_dcb addr from R1 or DECB get cur_tiot index from DCBIOBAD (x'1C').
- reduce index in DCBIOBAD by 1.
- If index not -1, verify tiot_dcb_addr and that dcb is open.
- If index = -1 or dcb's don't match add new entry for DCBDDNAM.
-
get_new_tiot_index
return new tiot index or abort (used by DCB I/O and ASSIST)- Parameters:
ddname- DDname to storedcb_addr- DCB address to store- Returns:
- tiot index value if successful, -1 otherwise
-
get_ascii_env_var_string
return environment variable string with leading and trailing spaces removed or return "" if not found.- Parameters:
env_var_name- name of environment variable- Returns:
- value of environment variable
-
get_ascii_string
get ascii string with no trailing spaces from memory address and length
Notes:- Translates from EBCDIC to ASCII unless in ASCII mode.
- Terminate string at first 0 byte if requested or at end of field.
- Parameters:
mem_addr- start location of string in memorymem_len- length in bytes of string to extractnull_term- true indicates string ends at null character, when false embedded nulls are allowed- Returns:
- ascii string value
-
put_ascii_string
put ascii string with trailing spaces to memory address and length
Notes:- Translates from ASCII to EBCDIC unless ASCII mode
- Parameters:
text- text to storemem_addr- start location in memory for stored stringmem_len- length of string in memorypad_char- padding character to be used if text parm is short
-
svc_cmd
private void svc_cmd()exec OS command process- r0+1 = CMDLOG x'00', NOCMDLOG x'01'
- r0+2 = cmd process id 0-9
- r0+3 = cmd operation type
- r1 = A(command)
- r2 = command length
- r3 = timeout wait limit in milli-sec
-
cmd_startup
private int cmd_startup(int cmd_id) start Windows command processer with synchronized buffered output.
Notes:- Start process cmd_id
- Send input commands via cmd_input(id,msg)
- Retrieve output from cmd_output_queue
- Cancel via cmd_cancel(cur_id);
- Parameters:
cmd_id- identifier- Returns:
- return code
-
cmd_proc_start
- Terminate any prior cmd process with error if non zero completion.
- Start new process running on separate thread.
- Parameters:
cmd_id- identifierexec_cmd- array of strings - each string being a command to be executed- Returns:
- 0 if okay; -1 if error occurs
-
cmd_input
send input to exec command in process- Parameters:
cmd_id- identifiercmd_line- command to execute
-
cmd_proc_rc
public int cmd_proc_rc(int cmd_id) return ending rc else -1 return 0 if no process defined- Parameters:
cmd_id- identifier- Returns:
- 0 if okay, -1 otherwise
-
cmd_cancel
public void cmd_cancel(int cmd_id) cancel exec process- Parameters:
cmd_id- identifier
-
run
public void run()wait for comproc threads to end normally or issue error if abnormal termination -
copy_cmd_output_to_queue
public void copy_cmd_output_to_queue(int cmd_id) copy cmd output lines to output queue- Parameters:
cmd_id- identifier
-
copy_cmd_error_to_queue
public void copy_cmd_error_to_queue(int cmd_id) copy cmd error lines to output queue- Parameters:
cmd_id- identifier
-
cmd_put_queue
add output to linklist queue synchronized so output and main thread retrieval via CMDPROC READ are safe.- Parameters:
cmd_id- identifiermsg- message to add
-
cmd_get_queue
retrieve next FIFO line from linklist queue synchronized so output and main thread retrieval via CMDPROC READ are safe. If no string ready, return null- Parameters:
cmd_id- identifier- Returns:
- command from queue or null string
-
svc_tget_tput
private void svc_tget_tput()Read or write to TN3270 terminal
Notes:- If GUAM GUI Access Method enabled, read or write to the GUAM GUI dialog.
- If no GUAM interface and EDIT mode use WTO/WTOR to MCS console, else error.
-
svc_guam
private void svc_guam()GUAM Graphical User Access Method for user I/O vua GUAM GUI dialog window with 3 views:- MCS - view for WTO and WTOR I/O
- SCREEN - view for TPUT and TGET I/O
- GRAPH - view for graphics
- r1 = major/minor opcode bytes
-
svc_snap
private void svc_snap()snap dump control blocks and/or memory. Input registers:- r0 - flags
- x'8000' - dump storage range (r14,r15)
- x'4000' - dump gpr r0-r15
- x'2000' - dump fpr f0-f15
- x'1000' - dump cde program info
- x'0800' - dump dcb file info
- x'0400' - dump all memory
- r0 - flags
-
dump_cde_pgms
private void dump_cde_pgms()dump cde entries for all loaded pgms and files -
dump_cde
private void dump_cde()dump current program cde entries -
dump_tiot
public void dump_tiot()dump content of tiot entries -
wto_msg
- Log msg on z390 system log
- If QUAM GUI option on, display msg on gz390 mcs window view
- Parameters:
wto_pfx- Prefix for WTO messagemsg_addr- Address of message text in memorymsg_len- Length of message text
-
svc_wait
private void svc_wait()wait for ecb posting or stimer exit request. Retry the wait after stimer exit assuming r1 restored to wait ecb parm.
Notes:- WTOR ecb's are posted by gz390 wtor thread at which time reply is fetched and stored.
- Don't wait on a user defined ecb unless another process or an stimer exit will post it.
-
check_wait_ecbs
private boolean check_wait_ecbs()check wait ecbs and return true if required # of ecbs have been posted- Returns:
- true when all ECBs posted; false if any ECB still waiting
-
reset_wait_list
private void reset_wait_list()reset wait bit in ecblist -
svc_post
private void svc_post()post ecb complete -
svc_wtor
private void svc_wtor()request WTOR reply as follows:- Save r0=reply, r14 length,r15=ecb
- Issue wtor message
- if QUAM GUI option, check for gz390 cmd reply else check for z390 cmd input reply
- if reply found, post ecb else repeat check at every monitor_update interval until reply found.
-
svc_espie
private void svc_espie()set/reset program interruption exit- if r0=0 cancel last espie added else add new espie exit
- if r0 negative replace exit else add
- if r1 not zero, save parm address
-
svc_estae
private void svc_estae()set/reset task abend exit- if r0=0 cancel last estae added else add new estae exit
- if r0 negative replace exit else add
- if r1 not zero, save parm address
-
svc_xlate
private void svc_xlate()translate between ascii/ebcdic. Input registers:- r0 = area address
- high bit on for EBCDIC to ASCII
- high bit off for ASCII to EBCDIC
- r1 = length
- r0 = area address
-
svc_ctd
private void svc_ctd()convert to display. Input registers:- r1=a(type,in,out)
- 128 bit integer to 45 byte decimal display
- EH short to 45 byte scientific notation
- EB short to 45 byte scientific notation
- DH long to 45 byte scientific notation
- DB long to 45 byte scientific notation
- LH extended to 45 byte scientific notation
- LB extended to 45 byte scientific notation
- DD long to 45 byte scientific notation
- ED short to 45 byte scientific notation
- LD extended to 45 byte scientific notation
-
ctd_trunc
private void ctd_trunc(byte max_digits) trunc to max digits plus exponent and strip trailing zeros on fraction- Parameters:
max_digits- max digit count
-
svc_cfd
private void svc_cfd()convert from display input registers:- r1=a(type,out,in)
- 128 bit integer from 45 byte decimal display
- EH short from 45 byte scientific notation
- EB short from 45 byte scientific notation
- DH long from 45 byte scientific notation
- DB long from 45 byte scientific notation
- LH extended from 45 byte scientific notation
- LB extended from 45 byte scientific notation
- DD long from 45 byte scientific notation
- ED short from 45 byte scientific notation
- LD extended from 45 byte scientific notation
-
process_test_cmd
public void process_test_cmd()process test option interactive debug commands- Check for reg, memory, or opcode break and set count = 0 if hit.
- Decrement go count if positive.
- if go count = 0
- read, parse, and execute test commands
- until go or quit command executed.
- Get next command from z390 GUI cmd line, system command_line, or from ddname file specified in test option test(ddname)
-
get_test_cmd
private void get_test_cmd()get next test command from Z390 GUI command line or system command line or file specified with the test(ddname) option -
check_test_break_addr
private void check_test_break_addr()check for psw = break addr -
check_test_break_reg
private void check_test_break_reg()check for test mode break on register value -
check_test_break_mem
private void check_test_break_mem()check for test break on memory value change -
check_test_break_op
private void check_test_break_op()check for test mode break on opcode at current psw address -
exec_test_cmd
private void exec_test_cmd()parse and execute current test command -
get_test_int
return integer value of token and just issue ivalid int error if error and return -1.- Parameters:
token- token to be processed- Returns:
- integer value of token; -1 if not a valid integer
-
get_next_test_token
Get next token for test command- Returns:
- next test command token or null
-
get_next_test_addr
private int get_next_test_addr()return memory address of [addr][+-addr] start with current test_token and continue until next test_token not +, -, ?, % or valid address If invalid return -1
Notes:- EPA returns last program load address
- Returns:
- result address; -1 if invalid
-
test_error
issue test error message and return to prompt- Parameters:
text- Text to be traced
-
go_test
private void go_test()set count and go execute instructions until count 0 or break found or exit -
set_test_break_addr
private void set_test_break_addr(int addr) set break on specified instruction address- Parameters:
addr- Instruction address for breakpoint
-
set_test_break_reg
private void set_test_break_reg()set test break on register change -
set_test_break_mem
private void set_test_break_mem()set test break on memory change -
set_test_break_op
private void set_test_break_op()set break on opcode at current psw -
get_test_addr
get test address and set type memory type address forms:- dec = absolute decimal address
- hex. = absolute hex address
- +hex = base + hex offset
- -hex = base - hex offset
- * = pz390.psw_loc
- nr% indirect 24 bit
- nr? indirect 31 bit
- ? indirect address
- EPA last load address // RPI 395
- nnr or rnn
- Parameters:
text- command text- Returns:
- address; -1 if invalid
-
get_test_compare
set test compare code or issue error- 0 - =
- 1 - !=
- 2 - ><
- 3 - >=
- 4 - <
- 5 - <=
- Parameters:
compare- Compare command text- Returns:
- comparator index 0-5; -1 if invalid
-
get_test_reg_sdt
return long sdt value for register- b'...'
- c'...'
- c"..."
- f'...'
- h'...'
- x'...'
- or address hex., dec, nr%, nr?, +hex, -hex, *+hex, *-hex
- Parameters:
text- command text- Returns:
- evaluation result; -1 if invalid
-
get_long_from_hex_string
Convert string of hexadecimal digits to long Returns:- The converted number if successful;
- -1 if an error occurs; also sets global test_cmd_abort to true
- Parameters:
data- input string value- Returns:
- evaluation result
-
get_test_mem_sdt
return memory sdt byte array- b'...'
- c'...'
- c"..."
- f'...'
- h'...'
- x'...'
- Parameters:
text- input string to evaluate- Returns:
- byte array
-
init_sz390
init tz390- Parameters:
shared_tz390- tz390 instance to be createdshared_pz390- pz390 instance to be createdshared_vz390- vz390 instance to be created
-
get_feature_bits
public long get_feature_bits()return current os feature bits for use by STFLE instructionbyte bit 0 0 - Y zos and 390 instructions avail. 1 - Y zos mode installed 2 - Y zos mode active 7 - Y STFLE facility installed 2 16 - N extended translation 2 18 - N long displacement 19 - N long displacement performance 20 - Y HFP multiply and add/subtract 21 - Y extended immediate 22 - N extended translation 3 23 - Y HFP unnormailized 3 24 - Y extended timer 2 25 - Y store clock fast 28 - N extended TOD steering 30 - N extended timer 3- Returns:
- fixed bit string as a long value
-
svc_tcpio
private void svc_tcpio()tcp/ip sockets I/OInputs: r0 = operation 1 - open server port r1=port 2 - open client port connection r1=port r14=host ip addr or 0 (HOST=*) 3 - close port connection r1=port 4 - send message r1=port r2=connection id r14=msg addr r15=msg length 5 - receive message r1=port r2=connection id or -1 r14=buffer address r15=max msg length Output: r1 = message length for receive r2 = connection id for receive r15= return code 0 - ok 4 - no msg and nowait 12- error on last operation -
tcpio_find_server_port
private boolean tcpio_find_server_port()set cur_tcp_server_index to allocated server port and return true else set cur_tcp_server_index to first free port and return true else set cur_tcp_server_index to -1 and return false indicating no ports avail.
- Returns:
- true if successful; false otherwise
-
tcpio_find_client_port
private boolean tcpio_find_client_port()set cur_tcp_client_index to allocated client port and return true else set cur_tcp_client_index to first free client port and return false else set cur_tcp_client index to -1 and return false- Returns:
- true if successful; false otherwise
-
tcpio_close_ports
private void tcpio_close_ports()close all client and server ports -
tcpio_close_client_port
private void tcpio_close_client_port()close all open TCP/IP ports -
tcpio_close_server_port
private void tcpio_close_server_port()close open TCP/IP server port -
tcpio_close_conn
private void tcpio_close_conn(int conn_index) close connection- Parameters:
conn_index- index for connection to close
-
tcpio_receive_client_port
private void tcpio_receive_client_port()receive message from client port if nowait and message not ready RC=4 else wait for message -
tcpio_receive_server_port
private void tcpio_receive_server_port()receive message from server port connection. If no connection id is specified (-1), then next message from any conncetion. if nowait and message not ready RC=4 else wait for next message..
Notes:- Connection # returned in R2
-
tcpio_conn_store_msg
private void tcpio_conn_store_msg(int conn_index) - store msg from conn input buffer up to specified lmsg length and return actual length stored in R1.
- Turn off tcp_conn_msg_ready if 0 available.
- First byte may be in conn_byte if conn_read = true
- Parameters:
conn_index- index for connection to use
-
tcpio_set_conn_msg_ready
private boolean tcpio_set_conn_msg_ready(int conn_index, boolean state) if state true set conn msg ready (byte has been read by conn thread) else if no msg data available reset conn msg ready (will force read on conn thread) else leave conn ready set to true (allows main user thread to read mult msgs without switching back to conn thread for a read)- Parameters:
conn_index- index of connection to usestate- connection status- Returns:
- true if data was found; false otherwise
-
tcp_alloc_conn
private boolean tcp_alloc_conn(int port_index) allocate next conn for server port use- Parameters:
port_index- port index number- Returns:
- true if successful; false otherwise
-
tcp_free_conn
private void tcp_free_conn(int conn_index) release tcp connecntion for reuse- Parameters:
conn_index- index of connection to free
-
check_dfp_finite
private boolean check_dfp_finite(byte[] dfp_bytes, int dfp_byte_index) return true if DFP value finite based on CF5 field value common to all DFP types- Parameters:
dfp_bytes- byte array holding DFP valuedfp_byte_index- offset in array where DFP value is to be checked- Returns:
- true if finite; false otherwise
-
get_bdw_len
private int get_bdw_len(int len) if BDW high bit on return len = bits 1-31 else return len = bits 1-15- Parameters:
len- BDW- Returns:
- block lenth in bytes
-
put_bdw_len
private int put_bdw_len(int len) if DCBEFLG1 LBI bit x'04' on return len with high bit on else return len in bits 1-15- Parameters:
len- length- Returns:
- length formatted as a BDW
-
check_mem_area
private void check_mem_area(int addr, int len) check area start end and abort S0C5 if invalid.- Parameters:
addr- start address of rangelen- length of range in bytes
-
ast_open_file
open ASSIST file by ddname and return TIOT index if open successful else return -1- Parameters:
ddname- DDnameinput_type- input type code: true for read-only, false for read/writedcb_addr- pointer to DCB- Returns:
- index of tiot entry in tiot array
-
ast_close_file
public void ast_close_file(int tiot_index) close assist file- Parameters:
tiot_index- index in tiot array
-
svc_zsort
private void svc_zsort()z390 internal sortr0 = operation type: 1 - intenal sort 2 - file sort 3 - put record to internal sort 4 - get record from internal sort r1 = address parm list for op 1 and 2 a(rec) for get/put 0 4 - LRECL 4 4 - max memory or 0 for max avail from MEM option 8 4 - key field N offset from 0 12 4 - key field N length 16 2 - key type code and VL bit for last key 18 2 - ascending = 0, descending 1 (also VL bit for last key) r15 = return code 0 ok 4 eof for get 16 abort due to error -
zsort_move_rec
private void zsort_move_rec(int from_ptr, int to_ptr) move record of length zsort_lrecl in memory- Parameters:
from_ptr- Pointer to source locationto_ptr- Pointer to destination location
-
zsort_open_sortwk
private void zsort_open_sortwk()open sort work files and reset rbas to 0 -
zsort_write_blk
write blk from zsort_blk_addr to zsort_blk_ptr at current addr on file- Parameters:
file- instance of RandomAccessFilerec_ptr- start address of block to be writtenend_ptr- end address+1 of block to be written
-
zsort_write_merge_blk
private void zsort_write_merge_blk(int rec_ptr, int end_ptr) write merged blk to output merge file- Parameters:
rec_ptr- pointer to recordend_ptr- points after record
-
zsort_read_merge_blk
private void zsort_read_merge_blk(long file_xrba, long file_xrba_end, int blk_ptr, int blk_end_ptr) read blk into blk_ptr to blk_end_ptr at current merge file_xrba. Return bytes read up to blk size or end of file, or 0 if at end- Parameters:
file_xrba- offset in work filefile_xrba_end- end of block in work fileblk_ptr- start of block in storageblk_end_ptr- end of block in storage
-
zsort_init_parms
private void zsort_init_parms()init isort or fsort parms -
zsort_init_isort
private void zsort_init_isort()initialize for internal sort -
zsort_put
private void zsort_put()pass unsorted record to zsort -
zsort_get
private void zsort_get()get sorted record from zsort -
zsort_alloc_blk
private void zsort_alloc_blk()allocate block using zsort_mem or max avail. -
zsort_term
private void zsort_term()terminate zsort- freemain allocated memory
- close/delete sortwk1 and sortwk2
-
zsort_freemain
private void zsort_freemain()release storage if allocted -
zsort_close_wk
private void zsort_close_wk()close and delete sortwk01 and sortwk02 -
zsort_put_stats
private void zsort_put_stats()write zsort statistics to sta file -
zsort_error
issue error and set return code 16- Parameters:
msg- Error message
-
zsort_sort_blk
private void zsort_sort_blk()sort fixed length records in zsort_blk up to zsort_blk_ptr -
zsort_comp
private boolean zsort_comp(int rec1, int rec2) compare record key fields at mem(rec1) to mem(rec2) and return true if swap required- Parameters:
rec1- record 1 locationrec2- record 2 location- Returns:
- true if swap[ required; false otherwise
-
zsort_merge
private void zsort_merge()merge sorted blocks from sortwk01 to sortwk02 and back again doubling sorted block size each time until there is 1 sorted block -
zsort_init_merge_pass
private void zsort_init_merge_pass()init for merge of wk01/wk02 -
zsort_get_merge_blk1
private void zsort_get_merge_blk1()read next full or partial blk1 from current merge blk1_xrba to blk1_xrba_end -
zsort_get_merge_blk2
private void zsort_get_merge_blk2()read next full or partial blk2 from current merge blk2_xrba to blk2_xrba_end -
zsort_merge_blk_rec
private void zsort_merge_blk_rec()merge records from 2 blks into 1 output blk -
zsort_next_merge_blks
private void zsort_next_merge_blks()position to next merge blks in curr pass -
svc_systrace
private void svc_systrace()reset ez390 trace options from string at R1 with trailing space
-