RXMON

RXMON
RXMON Screen

RXMON Screenshot

RXMON Screenshot
RXE (a editor)

terça-feira, 6 de janeiro de 2009

RXMON (alpha)

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 send/reveive a 3270 datastream to terminal



- EXECIO <*n> DISKWAR (STEM stem FILTER label like a TSO EXECIO with some improvements like FILTER callback and DISKA, for append feature



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 show a map in a based NCurses terminal from STEM map variable


- MAP <*vsocket> like a PANEL command, but send/receive a map to/from TN3270 terminal


- REFRESH ?


- CBTASK to start a OC Cobol task


- LIST INS SELECT LOADFILE SAVEFILE DEL COUNT GET ADD DESTROY
to manage linked lists.


- BROWSE DEFINE REFRESH UPDATE NEXT PREV RESET
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 qualif SQLCODE SQLROWS SQLRECS SQLMSG SQLRESULT
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 SYSEXEC
to run SQL DML commands


- SYS qualif SQL
like a DBSQL command, but runs a query from IPD (Internal Product Database)



- SHOW flush a output data


- RXTHREAD to start a new REXX thread - DUMP to DUMP internal structures, used to debug data


- GLOBALV CLEAR PUSH ... POP ... to interchange Rexx variables between programs, you can PUSH variables to Rexx called and restore using POP parameter.


- LOG sysid sysappl msgclass internal LOG structure


- 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 SPREAD sysid jobid jobstep jobfile
write/read record to/from spool


- PERFORM lbl1,lbl2...lbln
call Rexx internal procedures


- DEF BEGIN 1 n-lvl * ... END LIST
to manage records, using to COBOL record concepts


"SET" commands :


SET SYSTEM $USERID $SYSID $SUPER OFFon
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 CURSOR NORMAL,UNPROT BRIGHT,UNPROT NORMAL,ASKIP BRIGHT,ASKIP DARK BLINK NORMAL,REVERSE ULINE,NORMAL ULINE,BRIGHT
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(,), retrieve a item from linked list pointed by


LCOUNT(), count a linked list items


SEARCH('stem',vstr,istart,iend), search in a STEM variable, using vstr argument, from to item


REMOVE(vname), ?


EXECMODE(), returns ONLINE or BATCH mode


STORAGE(ioffset,ibytesread,), to manage Rexx task storage (about 32K)


SERVICE('SET',vsysid,vgroup,vname,vdata), to manage internal registry 'GET',vsysid,vgroup,vname 'DEL',vsysid,vgroup,vname


RECORD('P',,), to manage Rexx Record Structure 'G',
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

Red Monster! Across any place!

Red Monster! Across any place!

My sister... Rafting moment

My sister... Rafting moment

Perfect day... Night rafting

Perfect day... Night rafting

Still a perfect day...

Still a perfect day...

A fun moment

A fun moment

Happy couple!

Happy couple!

Wife, mother and sister

Wife, mother and sister

My brother-in-law

My brother-in-law

Making X-Burgers with my father

Making X-Burgers with my father

My paradise....

My paradise....

My paradise

My paradise

The BIG GRANDMA!

The BIG GRANDMA!

My parents... A long long marriage!

My parents... A long long marriage!

Wife and my godparents!

Wife and my godparents!

Gaeta's couple duet

Gaeta's couple duet

Personal

Personal
Enjoying the life!

Teaching...

Teaching...
Teaching my dog to go for a swim