Editing revision 12 of SPFSE
HomePage
|
RecentChanges
|
EditorIndex
|
TextEditorFamilies
|
Preferences
Editing old revision 12. Saving this page will replace the latest revision with this text.
SPF/SE for Windows emulates the mainframe SPF editor '''Author:''' Command Technology '''HomePage:''' http://www.commandtechnology.com/ '''Family:''' IbmEditorFamily MainframeEditorFamily '''License:''' Commercial '''Platform:''' Windows (Available in console mode and graphics versions) SFP/SE is a powerful editor and file manager that emulates the IBM mainframe ISPF editor. Two versions are provided; standard which uses a command interface closest to ISPF or SPFPC and graphic which uses windows menus and dialogs. Editor line commands are the same. While the visual appearance of SPF/SE is similar to that of ISPF, it is missing important parts of the ISPF environment, including REXX support. -- SJMetz Previous versions of SPF (SPFPC 3-5) supported IBM ISPF panels, dialogs and variables using IBM REXX/2 as the macro/scripting language. SPF/SE 1-8/365 provides its own dialog manager, dialog definition language and a C-like macro/scripting language that is easy to learn and use. A small script in SPF/SE can call any REXX interpreter for text processing (or BASIC, PHP, Powershell, etc.) as well as invoking SPFPC dialogs by calling older SPFPC versions (3-5). '''Example 1:'''<pre> /*------------------------------------------------------------------- rexxservice(opt,string) Sends contents of string to REXX interpreter. Returns result. If 0 is returned, operation was not successful! EXAMPLE: rexxservice("cmd","xrange('a','z')' 'xrange('A','Z')"); rexxservice("cmd"," X2B('7') "); rexxservice("cmd"," date('n') "); rexxservice("cmd"," 'DATE = 'date('n')' TIME ='time('n') "); rexxservice("cmd"," FORMAT('54372.845',8,2) "); rexxservice("exec","h:\\u\\spfpc40\\macros\\h3.spf cmd words"); Just remember about command line character limitations ie <> | etc. Change rexxpath to point to your REXX interpreter ---------------------------------------------------------------------*/ char rexxservice(char *xopt, char *x){ char *xfins = "c:\\temp\\dret.ins"; char *xfret = "c:\\temp\\dret.ret"; char *rexxpath = "c:\\ooRexx\\rexx.exe "; //OOREXX Interpreter int xhin; int xhret; char *tr; char *td; char *xret = "OK"; char *tcmd; if(xopt == "cmd"){ tr = filedelete(xfret); td = strcompose("rs = ",x,"; tr = lineout('",xfret,"', rs, 1); tr = lineout('",xfret,"'); exit 0;"); xhin = fileopen(xfins,"w"); tr = filerecwrite(xhin,td); fileclose(xhin); tcmd = strcompose("system NOBATCH NOSTOP ",rexxpath, " c:\\temp\\dret.ins"); spfservice("cmd",tcmd); xhret = fileopen(xfret,"r"); if(xhret == 0){return("REXXERROR");} tr = filerecread(xhret,xret); fileclose(xhret); } if(xopt == "exec"){ tcmd = strcompose("system NOBATCH NOSTOP ",rexxpath,x); spfservice("cmd",tcmd); } return(xret); }//rexxservice </pre> '''Example 2:'''<pre> Code shows how to call a REXX macro passing parms from command line: Command===> SPF dir2html void spf(void) { char *trexx = "h:\\u\\pcdos\\rexx.exe h:\\u\\spfpc40\\macros\\"; char *tcmd; int i; strcat(trexx,argv[1]); //Get Name of REXX macro to execute passed from Edit command line strcat(trexx,".spf "); //Could leave this off or change to REX/CMD etc. i = 2; while (i < argc) { strcat(trexx,StrCompose(" ",argv[i])); ++i; }//wend tcmd = strcompose("system NOBATCH NOSTOP ",trexx); //Build OS Command spfservice("cmd",tcmd); //Send it to OS }//spf </pre> '''Example 3:'''<pre> Code to call REXX macro passing it the name of the edit file: Command===> ftpsend //FTPSEND.SPF contains code to build FTP command sequence void ftpsend(void){ char *tcmd; char *tfilespec; tfilespec = spfservice("query","filespec"); //Get filespec being edited from SPF/SE tcmd = strcompose("system ","h:\\u\\pcdos\\rexx.exe h:\\u\\spfpc40\\macros\\ftpsend.spf ",tfilespec); spfservice("cmd",tcmd); //Send to OS }//ftpsend </pre> SPF/SE through written for Windows will run in Linux using Wine. '''Screenshot:''' http://www.commandtechnology.com/mm5/graphics/00000001/CTC-Screenshot_929x293.png
Summary:
This change is a minor edit.
Please calculate
+
=
(Visit
Preferences
to set your user name.)
View other revisions
HomePage
|
RecentChanges
|
EditorIndex
|
TextEditorFamilies
|
Preferences