What is RXMON ?
RXMON is a project to mix a lot of concepts from Mainframe and Unix/Windows platforms.It is a deamon, like a telnetd from Unix. It runs Rexx and COBOL workload but it uses TN3270 for online transactions/application. All tasks runs in threadsafe mode using PThread POSIX model.
He can be used either as a deamon, providing access by terminal emulator or when we need to run a batch REXX scripts (like a long process). For this cases we have two differents engines, "zrx" as a interpreter and "zssss" as a server.
Nowadays I am the mainly user of RXMON.
I have a great passion by TSO, REXX, CMS, VM and ISPF, and of course, 3270 protocol, emulators, green screens..... I tried to implement some pieces from known program products in RXMON. (I will show some examples) I have a couple of JCL and transactions in my lab to improve procedures and tasks, like backup/restore, send/receive emails, to collect data using 3270 panels, code generators, file transfers....
Who had a chance to work with CICS/IMS/CMS or TSO will be able to compare RXMON with them. It is a mix from them. But we can forget that basically is a monitor to run infrastructure applications or business transactions.
Where can we use RXMON?
- production applications, to improve data entry (no mouse! no graphical slow interfaces!)
- scheduler tasks
- Mainframe migrations, emulating CICS or IMS transactions, JCL and other mainframe concepts
- Development teams, when we need to save CPU consuption by TSO and edit/compile/test procedures (just using to mainframe to run applications)
Features from version 1.0 (alpha) :
- Running under Windows (CYGWIN) or Linux
- TN3270 traffic to use emulator terminals (like PCOM, EXTRA, x3270)
- portable to use Regina REXX (REXXSAA)
- support to use MYSQL clients, directly from REXX- internal SQLite support to manage product database or application data (like a VSAM to MVS)
- TCPIP support and CURL interface (TCPIP protocols support)
- provided a DSS subsystem as a REXX Host Command Interface
- OpenCobol support (see http://www.opencobol.org/ )
Please, let me know if you have comments or doubts about this product.
DSS Host Command Summary :
- CONVERSE
- EXECIO <*n> DISKWAR
Example :
In this sample, you can select which records will be loaded to STEM variable or stack area.
say 'mode='execmode()
dados='/home/gaeta/sss/arq2.txt'
'execio * diskr dados (stem ll. filter selectrec'
say 'rc='rc
say 'total='ll.0
do i=1 to ll.0
say i'->'ll.i
end
exit
selectrec: parse arg act,rec
rec=strip(rec)
execio='NOREAD'
if substr(rec,1,2)='11' then execio='READ'
return
- PANEL
- MAP <*vsocket>
- REFRESH ?
- CBTASK
- LIST INS
to manage linked lists.
- BROWSE DEFINE
to manage browse resource in 3270 panels SYSRETR
to extract system variables
- DBOPEN file DBCLOSE
to open/close user databases (MYSQL and SQLite supports)
- DBSQL
to run queries and returns SQL fields retrieved into REXX variable as STEM model.
Example :
'dbopen test.db'
var1="select * from tab1"
'set sqlline field'
'dbexec var1'
say 'sqlrecs=' sqlrecs
do i=1 to sqlrecs
say cod.i substr(nome.i,1,40) fone.i
end
'dbclose test.db'
exit
- DBEXEC
to run SQL DML commands
- SYS
like a DBSQL command, but runs a query from IPD (Internal Product Database)
- SHOW flush a output data
- RXTHREAD
- GLOBALV CLEAR PUSH
- LOG sysid sysappl msgclass
- SPOOL OPEN CLOSE PURGE sysid jobid
to manage spool data, used by JCL feature or application/transactions. You can interchange spool data from online to batch scripts
- SPWRITE sysid jobid jobstep jobfile
write/read record to/from spool
- PERFORM lbl1,lbl2...lbln
call Rexx internal procedures
- DEF BEGIN 1
to manage records, using to COBOL record concepts
"SET" commands :
SET SYSTEM $USERID
sets internal data
SET OUTMODE OFFon
?
SET MAPDELAY OFF0-milisec
sets a delay for each receive map
SET MAPCASE UcaseMixed
force a uppercase in data map
SET FEATURE offon
load a lot of features to BATCH Rexx script
SET SQLLIM NOmaxrecs
sets a number max record to ceate a STEM variables using to DBSQL or SYS commands
SET SQLEXT OFFon
sets a SQL extensions on or off, to bring Rexx procedures as SQL SELECT functions.
Example :
'set sqlext on'
esql="attach database 'test.db' as test"'sysexec esql'
var1="select vardata,rxproc('ff1',varname,'f') as x from sssreg"'sys var1 var1_field.'say 'sqlresult=' sqlresultsay 'sqlmsg=' sqlmsg
do i=1 to sqlrecs say vardata.i 'x=' x.iendsay 'sqlrecs=' sqlrecs
if execmode()='BATCH' then do 'set feature off'end
exit
ff1: parse arg p1,p2 say 'p1=' p1 ' p2=' p2 sqlexpr='$'p1'$'return
SET SQLPROC onOFF
sets a Rexx procedure as a record callback from SQL SELECT command.
Example :
'dbopen test.db'say 'dbopen rc='rc
'set sqlproc to each_record'esql='select * fxom tab1''dbsql esql ff.'do i=1 to ff.0 say i'='ff.iend
'dbclose test.db'say 'dbclose rc='rc
exit
each_record: parse arg p1,p2 say 'p1='p1 say 'p2='p2return
SET DEBUG OFFon
sets a debug on/off to DSS commands
SET SQLLINE compactFIELD
sets a type of output record from SQL SELECT commands compact - all fields will be concat in a one field field - each field will be a STEM
SET
sets a map field attribute
SET MAPEVENT OFFon,procedure
sets a map events on/off
SET KEY PFx,label,vcmd
sets a command to PFxx
Built-in :
E2A(ebcdic-string), converts ebcdic to ascii
A2E(ascii-string), converts ascii to ebcdic
LITEM(
LCOUNT(
SEARCH('stem',vstr,istart,iend), search in a STEM variable, using vstr argument, from
REMOVE(vname), ?
EXECMODE(), returns ONLINE or BATCH mode
STORAGE(ioffset,ibytesread,
SERVICE('SET',vsysid,vgroup,vname,vdata), to manage internal registry 'GET',vsysid,vgroup,vname 'DEL',vsysid,vgroup,vname
RECORD('P',
Variables :
ZCURSOR
ZSOCKET
ZFIELDS
ZMAPOUT
ZMAPIN
ZDEBUG
ZSQLLINE
ZOUTMODE
ZSYSID
ZMAPCASE
ZBRWBND1
ZBRWBND2
ZBRWCSR
ZBRWPAGE
ZTEST
ZTESTID
ZUSER
ZSUPER
ZMAPDELAY
ZMAPUCASE
Customize utilities :
rxb.rexx - a browse routine
rxe.rexx - a edit routine
rxf.rexx - a file list routine
rxq.rexx - a queue routine