MECAFF Manual 0.9.7x 0.9.7

User Manual: Pdf

Open the PDF directly: View PDF PDF.
Page Count: 65

MECAFFManual0.9.7(beta) Page1/65
MECAFF
M
ultiline
E
xternal
C
onsole
A
nd
F
ullscreen
F
acility
 forVM/370R6SixPack1.2
Version0.9.7(beta)
Dr.HansWalterLatz
WARNINGS:
Thissoftwareisdeliveredasiswithnopromiseorcommitmenttobeusableforanyparticular
purpose.
Useitatyourownrisks!
TheMECAFFsoftwareanddocumentationhasbeenwrittenbyahobbyistforhobbyistsandshould
notbeusedforanyimportantorevencriticaltasks.
MECAFFisworkinprogressanditscurrentimplementationmaydifferfromthisdocumentation.
MECAFFManual0.9.7(beta) Page2/65
Contents
1Introduction.....................................................................................................................................4
1.1WhatisMECAFF?....................................................................................................................4
1.2Features...................................................................................................................................5
1.2.1MECAFFconsole..............................................................................................................5
1.2.2Supported3270terminals...............................................................................................6
1.2.3ConnectionsfromMECAFFtotheVM/370machine.....................................................6
1.3Testedenvironments...............................................................................................................7
2Installation.......................................................................................................................................8
2.1Prerequisites............................................................................................................................8
2.2Filesinthepackage.................................................................................................................8
2.3RunningtheexternalMECAFFprocess...................................................................................9
2.4InstallingtheMECAFFCMSprograms...................................................................................11
2.4.1Loadingtheinstallationtapes.......................................................................................11
2.4.2MECAFFCMStoolspostinstallationoptions................................................................13
2.5InstallingtheMECAFFCMShelpfiles....................................................................................16
3TheMECAFFconsole.....................................................................................................................17
4TheMECAFFtoolsforCMS............................................................................................................19
4.1FSQRYQueryInformations................................................................................................19
4.2FSCTL....................................................................................................................................21
4.3CMSsessioncustomizationwithCKMECAFF/MCFFPROF...................................................22
4.4HandlingoffileidentificationsinEE,FSLISTandFSVIEW.....................................................24
4.5EEFullscreeneditor............................................................................................................24
4.5.1Introduction...................................................................................................................24
4.5.2Editingmultiplefilesandmodetransitions...................................................................25
4.5.3Prefixcommands...........................................................................................................26
4.5.4Commands.....................................................................................................................27
4.5.5CustomizingwithSYSPROFEEandPROFILEEE...........................................................39
4.5.6Rescuemode.................................................................................................................39
4.6FSLISTFullscreenfilelist.....................................................................................................40
4.7FSVIEWFullscreenfilebrowser..........................................................................................42
4.8FSHELPFullscreenhelp.......................................................................................................43
5MECAFFAPI...................................................................................................................................46
5.1Queryterminalinformation..................................................................................................46
5.2Fullscreenwrite....................................................................................................................47
5.3Fullscreenread.....................................................................................................................48
5.3.1Standard(synchronous)Read.......................................................................................49
5.3.2Extended(generalized)Read.........................................................................................49
5.3.3Graceperiodsetting......................................................................................................51
5.3.4Releasefullscreenterminalownership/cancelfullscreenmode................................51
5.4QueryingtheversionofMECAFF..........................................................................................51
5.5MiscellaneousOperations.....................................................................................................51
5.6APIfilesandlinking................................................................................................................51
5.7DemonstrationprogramfortheMECAFFAPI.......................................................................52
6Knownrestrictions/problems......................................................................................................54
6.1General..................................................................................................................................54
MECAFFManual0.9.7(beta) Page3/65
6.2MECAFFconsole....................................................................................................................54
6.3EEImplementationlimitations...........................................................................................55
7Possibleextensionsandimprovements........................................................................................56
7.1EE...........................................................................................................................................56
7.2Others....................................................................................................................................56
8Changehistory...............................................................................................................................57
8.10.9.00.9.1.........................................................................................................................57
8.20.9.10.9.3.........................................................................................................................58
8.30.9.30.9.4.........................................................................................................................60
8.40.9.40.9.5.........................................................................................................................61
8.50.9.50.9.6.........................................................................................................................63
8.60.9.60.9.7.........................................................................................................................64
MECAFFManual0.9.7(beta) Page4/65
1 Introduction
1.1 WhatisMECAFF?
MECAFFisanoninvasiveextensiontoVM/370R6providingfullscreencapabilitiesandaserialstyle
(insteadofpageoriented)consoleinterfacewith3270terminalemulators.
Moreprecisely,MECAFFsupportsVM/370andVM/380SixPackversion1.2runninginsideaHercules
S/370resp.S/380emulator(theterm“VM/370”willbeusedhereforbothVM/370andVM/380).
Theterm“noninvasive”meansthatnomodificationsarerequiredintheVM/370systemtouse
MECAFF.Thenewfullscreencapabilityresp.themodifiedconsoleinterfaceareprovidedby
anexternalprogramworkingbetweenthe3270terminalsandtheVM/370host.
The3270terminalsconnecttoMECAFF,whichopensaconnectiontotheVM/370machine,
providingeachsessionwiththenewconsole(withascrollableoutputlinehistoryanda
commandinputhistory)andtheabilitytosharetheconnected3270screenwith(fullscreen)
applicationsonthehost.
asmallAPIallowingCMSprogramstoaccessthefullscreenfacilityofMECAFF.
ThisAPIcommunicateswithMECAFFthroughtheterminalconnectionusing(hopefully)
rarelyusedcharactersequencestodoboththehandshakingwithMECAFFtosharethe3270
terminalandtheencodingthe3270datastreamsinbothdirections.
TheAPIprovides(amongothers)the3basicoperationsneededtobuildfullscreen
applications:
queryterminalproperties
senda3270outputstream
receivea3270inputstreamafterwaitingforuserinput
LikeHerculesisthe“hardware”onwhichVM/370runs,theexternalMECAFFprocesscanbeseenas
anadditional(“hardware”)componentinstalledbetweenthe3270terminalsandthehost,extending
thefunctionalityofthehost’sterminallines.However,theoperationofthisadditionalcomponentis
notmanagedbyCP.Instead,theenhancedfunctionalityiscontrolledbyeachconnectedVMitself
withcommandsembeddedbytheMECAFFAPIintotheterminaldatastream.
BasedontheMECAFFAPI,someCMSprogramsareprovidedwithMECAFF:
FSQRY :displaycharacteristicsofthe3270terminalconnectedtoMECAFFandthe
 settingsoftheconsole
FSCTL:setthepropertiesoftheconsole
FSHELP:afullscreenhelp(displayingthestandardCMShelp)
EE:acombinedfullscreenfileeditor(EE),filelistviewer(FSLIST)andfilebrowser
(FSVIEW),alsoallowingtoinvokethesebasicfunctionsfromtheCMScommand
line.
NoninvasivealsomeansthatevenifallMECAFFelementsareinstalled,theVM/370systemcanstill
beusedasiftheyweren’t,simplybyconnectingthe3270terminalemulatordirectlytoHercules
insteadofusingMECAFF.
Theterm“multiline”inMECAFFmeansthatseveralterminalscanconnectinparalleltotheMECAFF
processtostartfullscreencapablesessionsontheVM/370machine.
MECAFFManual0.9.7(beta) Page5/65
TheexternalMECAFFprocessisimplementedasastandaloneJava™program.TheCMScomponents
(MECAFFAPIandCMSprograms)aremainlyimplementedinCwiththenativeCruntimelibrary
GCCLIBandasmallassemblyroutine.
1.2 Features
1.2.1 MECAFFconsole
ThemostnotabledifferencebetweenthestandardVM/370console(for3270terminals)andthe
MECAFFconsoleisthatalthoughworkingwitha3270terminaltheMECAFFconsolesimulatesa
lineorientedterminalusingascrollingmetaphor.Upto65536outputlinesareremembered,
allowingtopagethroughtheoutputhistoryofthecurrentsession.
MECAFFhasasimilarscreenlayouttotheVM/370consolefor3270terminalswithaninputzoneat
thebottomofthescreen,theoutputzonefillingthescreenspaceabovetheinputzoneandaVM
statusindicator(whereMECAFFusesmixedcasestatenamesfortheequivalentVMstates:
“Running”,“VMread”etc),forexample:
| Welcome to VM/370 and VM/380 "SixPack" version 1.2! |
+-----------------------------------------------------------------------------+
For a list of CMS commands, type HELP CMSCMDS. For a list of CP commands, type
HELP CPCMDS.
Other useful documentation and sample programs can be found on MAINT 19D,
accessed as your U disk.
For more details, type HELP WELCOME ( MORE
For information on building the CP or CMS nucleus, read SYSPROG MEMO.
Ready; T=0.02/0.07 20:35:45
dir * direct
Filename Filetype Fm Format Recs Blocks Date Time Label
DOSVS DIRECT A1 F 80 12 2 02/18/06 21:07 MNT191
SIXPACK DIRECT A1 F 80 326 33 09/30/10 21:19 MNT191
VM50 DIRECT A1 F 80 301 31 05/03/06 2:16 MNT191
3 files, 66 blocks: 52,800 bytes.
Ready; T=0.01/0.02 20:35:52
Running >> q disk
However,theMECAFFconsoletakesadvantageofthe3270terminalcharacteristicslikecolorsand
largerscreensizes(see1.2.2).
LiketheVM/370console,theMECAFFconsolemusthavea“More…”statushandlingtogivethe
usertheopportunitytoreadandacknowledgechunksofoutputlines(insteadofseeingafast
scrollingoutput).MECAFFtakesamore*Xlikeapproachwheretheoutputisheldwiththe
“More…”promptafteranoutputzoneheighthasbeenwrittensincethelastuserinput.So
commandswritingoutonlyafewlines(lessthananoutputzoneheight)orprogramsdoing
questionresponsecycleswithafewoutputlinesbetweenpromptswillnotenterthe“More…”
state.Releasingthe“More…statetogetthenextpendinglineswrittentothescreenissimply
donewiththeENTERkey.
AndofcoursetheMECAFFconsoleisbuilttosharethe3270screenwithaCMSfullscreenprogram
basedontheMECAFFAPI.
MECAFFManual0.9.7(beta) Page6/65
1.2.2 Supported3270terminals
MECAFFsupportsthefollowingTN3270terminalstypesconnectingasclientswiththementioned
screengeometries:
IBM32782E,IBM32792E,IBM32782,IBM32792
80colsx24lines
IBM32783E,IBM32793E,IBM32783,IBM32793
80colsx32lines
IBM32784E,IBM32794E,IBM32784,IBM32794
80colsx43lines
IBM32785E,IBM32795E,IBM32785,IBM32795
132colsx27rows
IBMDYNAMIC
arbitraryscreengeometrywithinthe14bitbufferaddressingrangewithatleast24rows
and80columns(theoreticallyallowingscreensizesbetween80colsx204rowsand682cols
x24rows)
Ifnotdisabled,theterminalcapabilities(alternativebuffersize,supportforcolorandextended
highlighting)aredeterminedfromtheterminalusinga3270structuredfieldquery,evenforstandard
types(allowingforexampletorecognize“Customgeometry”settingsforthex3270terminal
emulation).Iftheterminaltypedoesnotindicatethattheterminalsupportsextendeddatastreams
(i.e.:theterminaltypedoesnotendwithE’),MECAFFwillnotattempttoquerytheterminal
capacitieswithanadditionalquery,stickingtothedefaultcapabilitiesasidentifiedbytheterminal
type(e.g.24x80,nocolors,noextendedhighlightingifitisaIBM32782).
Ifqueryingtheterminalcapabilitiesisdisabledusedthenodynamic”switch(see2.3),onlythe
predefinedterminaltypes(allmentionedaboveexceptIBMDYNAMIC)withtheirstandard
characteristicsareknown.
1.2.3 ConnectionsfromMECAFFtotheVM/370machine
Foreach3270terminalconnectingtotheMECAFFprocess,adedicatedTCP/IPconnectionisopened
totheHerculesprocesshostingVM/370,presentingitselfeitherasa3270terminal(morepreciselya
minimalIBM32784emulation)orasaplaintelnetclient(seenbyVM/370as3215terminal).
DependingontheterminaltypeusedbyMECAFF,CPuses2differentconsoleflavorstomanage
consoleI/O,whicharebothmappedtotheMECAFFconsolepresentationandinteraction.Thedevice
typefortheconsoleisidentifiedbyaCPQUERYVIRTUALcommandeitherasGRAFfora3270
terminalorCONSfora3215terminal.Inspiredfromthesedevicenames,theterm“GRAFstyle”is
usedforMECAFFconnectingas3270andtheterm“CONSstyle”isusedfora3215typeconnection.
WhichtypeofconnectiontoVM/370istobeusedbyMECAFFisdeterminedbytheTCP/IPportto
whichthe3270terminalopenstheconnectiontoMECAFF:
Connectingtoport3277willuseaGRAFstyleconnectiontoVM/370.
Connectingtoport3215willuseaCONSstyleconnectiontoVM/370.
(thegivenportnumberscanbeoverriddenusingcommandlineparametersforMECAFF,see2.3)
MECAFFManual0.9.7(beta) Page7/65
ForGRAFstyleconnections,MECAFFsupportsall3270linesprovidedbyVM/370,asemulatinga
model4terminalallowsMECAFFsessionstobeconnectedtodevicesdefinedinDMKRIOasmodel2
orasmodel4.
FurthermoreaLUnamemayoptionallybegivenforGRAFstyleconnectionstobindtheoutgoing
3270linetoagroupoflinesdefinedintheHerculesconfiguration.TheLUnameforaMECAFF
sessioncanbespecifiedat2levels:
ThedefaultLUnamecanbepredefinedasparameterfortheMECAFFprocess.
The3270terminalemulatorconnectingtoMECAFFcanalsodefineaLUnameinits
connectionspecification.
Ifbotharespecified,theLUnameoftheterminalconnectingtoMECAFFhaspriority.
Bothconnectionstylesbehavethesameforfullscreenapplications,asitistheprogrambasedonthe
MECAFFAPIwhichinteractstransparentlywiththe3270terminalconnectedtoMECAFF.
Ontheconsoleinteractionlevel(commandresponses),MECAFFcannotcompletelyhidethe
differencesonhowCPhandlespageoriented(3270=GRAF)andserial(3215=CONS)terminaltypes
(see6.2).
1.3 Testedenvironments
MECAFFhasbeentestedinthefollowingenvironments:
WindowsVista32Bit
Hercules3.0732Bit
Java1.6.01332Bit
VM/370SixPack1.2(also:SixPack1.0/1.1withstaticallylinkedMECAFFtoolsforCMS)
wc32703.3.0
Windows7Professional64Bit
Hercules3.07:3801.064Bit
Java1.6.026b0364Bit
VM/380SixPack1.2
wc32703.3.0
UbuntuLinux9.10
Hercules3.0764Bit
Java1.6.02664Bit
VM/370SixPack1.2
x32703.3.4p6
MECAFFManual0.9.7(beta) Page8/65
2 Installation
2.1 Prerequisites
TheexternalMECAFFprocessisimplementedasJavaprogramandrequiresaJavaruntime
Environment(JRE)Version1.6.
IfGRAFstyleconnectionsaretobeboundto3270linegroupsviaLUnames(forexampleto
directconnectionstolinesconfiguredas3270model4inDMKRIO),thecorrespondinggroup
nameshavetobeaddedtothedevicedefinitionsintheHerculesconfiguration(.conffile).
ThestandardSixPack1.2configurationfilealreadydefinesthegroupsMOD2andMOD4.
ForCONSstyle,serialterminallineswithouttheNOPROMPToptionareneededinthe
Herculesconfiguration(.conffile)andtheVM/370hardwareconfiguration(DMKRIO)to
allowMECAFFtoconnect.ThestandardSixPack1.2configurationforHerculesdoesnot
provideanyfreelinesofthistype(line0009isavailable,butreservedfortheintegrated
console).BasedonthestandardDMKRIOconfiguration,thedevices0004to0008andline
000AcanbeusedforCONSstylebyaddingthefollowinglinestotheHerculesconfiguration:
0004.5 3215
000A 3215
MECAFFscanstheterminaldatastreamcominginfromCP(VMstate,passwordprompts,…)
andHercules(promptstringfor3215lines)forcharacteristictextstomanagetheownstate
(promptstate,sessionend,…).
ThisscanningrecognizesthespecifictextsissuedbytheVM/370R6SixPackVersion1.2on
HerculesVersion3.07resp.VM/380SixPackVersion1.2onHercules3.07:3801.0.
Ifthesetextsfromthementionedsoftwareversionsaremodifiedorifothersoftware
versionsareused(forexamplenotVM/370SixPackversion1.2),MECAFFmustpossiblybe
adaptedforacorrectstateandsessionhandling.
MECAFFreliesonthestandarddefinitionofthelineendcharacter(character#,see
command CP TERMINAL LINEND)whensendingtheHTorHXcommandstoleavethe
“More…”stateprematurely.
2.2 Filesinthepackage
UnpackingtheMECAFFarchivecopythefollowingfilestothecurrentdirectory:
mecaff.jar
therunnablejarfilefortheMECAFFprocess
mecaff.aws
theAWStapefileinCMSTAPEformatcontainingtheMECAFFCMStoolsandAPI
mecaff_s.aws
theAWStapefileinCMSTAPEformatcontainingonlytheMECAFFCMStoolsasstatically
linkedMODULEs
mecaff_h.aws
theAWStapefileinCMSTAPEformatcontainingthehelpfilesforMECAFFtools
sixpack+mecaff.conf
asampleHerculesconfigurationforSixPack1.2;thisconfigurationistheoriginalfilefrom
theSixPack1.2finalrelease,modifiedtoprovideadditional3215devicesforCONSstyle
connections(andcorrectingdirectorynamestolowercasefor*XOSes).
MECAFFManual0.9.7(beta) Page9/65
sixpack+mecaff.cmd
startupscriptforWin32/Win64intendedforastandard(fresh)SixPack1.2installation,
usingsixpack+mecaff.confasconfiguration.Thisscriptstartsthefollowing
componentsinparallel:
o theMECAFFprocess
o theHerculesbasedVM/370machine
o one87x32color3270terminalconnectedtoVM/370viaMECAFFusingGRAFstyle
run3270-delayed.cmd
scriptusedbysixpack+mecaff.cmdtostarttheWC3270emulator(whichispartof
SixPack1.2)
sixpack+mecaff.sh
startupshellscriptfor*XOSesequivalenttosixpack+mecaff.cmd,butusingx3270
asterminalemulation(itisassumedthatx3270isinstalledandavailableonthePATH)
MECAFF-Manual-version.pdf
thisfile.
AlthoughMECAFFisnoninvasive,itisprobablynotagoodideatodothefirstexperimentswith
MECAFFintheown“productive”environment.Thisiswhythesixpack+mecaffscriptsallowto
makethefirststepswithMECAFFonafreshSixPack1.2installation:
Forthis,theMECAFFarchivehastobeunpackedinthebasedirectoryoftheSixPack
installationtobeextended,i.e.thedirectorywherethefilessixpack.cmd,
sixpack.confandsixpack.sharelocated.
TheonlyrequirementisthatbothHerculesandaJavaRuntime1.6areonthePATHforall
users(aswellasx3270on*X).
WhentheHerculesmachinestartedbyasixpack+mecaffscriptends,thestartupscript
automaticallyterminatestheMECAFFprocessandthe3270emulation(infactallrunning
3270emulators).
ThedeliveredscriptscanbeusedastemplatestoextendtheownVM/370environment.
Theonly“trick”touseMECAFFistoruntheexternalMECAFFprocessinparalleltotheVM/370
Herculesmachineandthatthe3270terminalemulatorsconnecttothisprocessinsteadofdirectlyto
theHercules.
2.3 RunningtheexternalMECAFFprocess
TheMECAFFprocessisimplementedasJavaprogramandneedsaJavaRuntimeVersion1.6.
ItisbundledasrunnableJARfile,soitcanbestartedwiththefollowingcommandline:
java -jar mecaff.jar [ options ]
TheMECAFFprogramacceptsthefollowingcaseinsensitiveoptions(parameterstooptionsmaynot
beseparatedfromtheoption):
-h
writeoutusageinformationandterminate.
MECAFFManual0.9.7(beta) Page10/65
-vmHostName:hostname
SpecifiesthehostonwhichtheVM/370(orVM/380)machineislocated.
Default:localhost
-vmHostPort:port
TCP/IPporttoconnecttoonhostname,thisistheCNLSPORTparameteroftheHercules
configuration.
Default:3270
-vmLUName:luname
OptionallyspecifiestheLUNametousewhenopeningaGRAFstyleconnectiontothe
VM/370(orVM/380)machine.Thelunameisthegroupnameassignedto3270devicesin
theHerculesconfiguration.Asthegroupnameiscasesensitive,itmustbespecifiedinthe
MECAFFoptionasspelledintheHerculesconfigurationfile.
ThisoptiondefinesthedefaultLUnametouseiftheconnectingterminaldoesnotspecifya
LUnamebyitself.IfnoLUnameisspecified(neitherbytheterminalnortheoption
vmLUName),MECAFFwillconnectwithoutspecifyingaLUnameandHerculeswillassigna
free3270deviceontheVM/370machine.
Nodefault,i.e.don’tuseadefaultLUNamewhenopeningaGRAFstyleconnection.
-portGRAF:port
TCP/IPlistenporttoopenforGRAFstyleconnections.
Default:3277
-portCONS:port
TCP/IPlistenporttoopenforCONSstyleconnections.
Default:3215
-do:style
Specifieswhichport(s)toopen(whichconnectionstyle(s)tosupport,possiblevaluesfor
styleare:
 CONSopenonlytheCONSstyleport
 GRAFopenonlytheGRAFstyleport
 BOTHopenbothports
Default:BOTH
-noDYNAMIC
DisablequeryingtheterminalcharacteristicsthroughaWSFquery,soonlythepredefined
terminaltypes(allmentionedin1.2.2exceptIBMDYNAMIC)withtheirstandard
characteristicsareknown.
Default:queryingisenabled.
-sendDelay:count
DefinethetimeintervalthatMECAFFwillwaitbetweenwriteoperationstotheterminal
whenupdatingtheconsolestatedisplayedonthe3270screen.Thevaluecountmustbein
therange0..9.
Default:0
-minColorCount:count
Definethenumberofcolorsaconnected3270terminalemulationmustatleastsupportto
beacceptedasacolorterminal.Thenumberofsupportedcolorsisreportedbytheterminal
emulatorinresponsetotheWSFquery(see-noDYNAMIC).Thevaluecountmustbeinthe
range3..8.
Default:4
MECAFFManual0.9.7(beta) Page11/65
-dumpParms
Dumpcommunicationparametersonstartup.
Example:
java -jar mecaff.jar –portgraf:8000 –portcons:8001
AssoonastheMECAFFprocessandofcoursetheVM/370machinearestarted,3270terminal
emulationscanbeconnectedtoMECAFFthroughoneitslistenports.
However,whenusingCONSstyle,theVM/370startupshouldbecompletelydone(i.e./enable
allhasbeenexecuted),ashavingMECAFFconnectingasaserialterminalbeforetheoperator’s
consoleisconnectedtotheHerculeswindow(throughdevice0009)mayleadtoconflictingaccesses
tothedevice0009,resultingatleastinrepeatingerrormessagesontheHerculesconsole.
2.4 InstallingtheMECAFFCMSprograms
2.4.1 Loadingtheinstallationtapes
TheCMSprogramfilesforMECAFFarecontainedin2AWStapefileswrittenwiththeCMSTAPE
utility:
Thetapefilemecaff.awscontainsthecommonfilesforMECAFFandtheMECAFFtoolsfor
CMS(see4)uptothefirsttapemarkandtheMECAFFAPIfileswithademoprogram(see
5.6)uptothetapeend.
TheMECAFFtoolscontainedinthisAWStapefileareMODULEslinkedagainstthenative
CMSGCCruntimelibraryGCCLIB.AstheseprogramsrelyontheGCCnativeruntimeloaded
intoCMSresidentmemory,theseversionsoftheprogramsarecalled“dynamicallylinked”.
Thetapefilemecaff_s.awscontainstheMECAFFtoolsdirectlylinkedagainsttheobjects
oftheGCCnativeruntime.
TheseversionsoftheMECAFFtoolsdonotdependontheGCCruntimeloadedintoresident
memoryandarethereforecalled“staticallylinked”.Theseversionscanbeusedifthe
residentGCCruntimeisnotavailableorcannotbeusedtoavoidruntimeconflicts(for
examplewhenDOSprogramsareused,asbothusetheDOSTRANSnucleusfield).
Thetapemecaff.awshasthefollowingcontent:
SAMPLE EE F2
SYSPROF EE F2
FS-QRY MODULE F2
FS-CTL MODULE F2
EE MODULE F2
FSHELP MODULE F2
CKMECAFF EXEC F2
FSLIST EXEC F2
FSVIEW EXEC F2
MECAFF SYNONYM F2
tape-mark
FSIO H F2
BOOL H F2
FSRDTEST C F2
FSIO TEXT F2
WR3270 TEXT F2
CMSMIN TEXT F2
FSRDTEST MODULE F2
tape-mark
tape-mark
MECAFFManual0.9.7(beta) Page12/65
Thetapemecaff_s.awshasthefollowingcontent:
FS-QRY MODULE F2
FS-CTL MODULE F2
EE MODULE F2
FSHELP MODULE F2
tape-mark
FSRDTEST MODULE F2
tape-mark
tape-mark
TousethestaticallylinkedMECAFFCMStools,thefilesfromthetapemecaff.awshavetobefirst
loadedandthenoverwrittenwiththefilesofthetapemecaff_s.aws.
Thefilescanbeloadedtoaprivateminidisk(forexampleCMSUSERsdiskF)forlocaltests.
Tomakethetoolsavailabletoallusers,diskY(19E)shouldbeagoodtargetforinstallingtheMECAFF
files.LoadingtheMECAFFAPIfilesafterthefirsttapemarkisonlynecessaryifownfullscreen
applicationswillbeprogrammed.
ToinstallaMECAFFtapeontheYdisk:
OntheHerculesconsoleenter:
 devinit 480 mecaff.aws
LogonasMAINT
AccesstheYdiskinR/Wmode:
 release y
access 19E y
AttachthetapedeviceandloadthefilestodiskY:
 attach 480 to maint 181
tape load * * y
tape load * * y
ReaccessdiskYinR/Omode:
 release y
access 19E y/s
(theabovecommandsalsoapplyforloadingthestaticallylinkedfilesfromthetapemecaff_s.aws
afterinstallingthedynamicallylinkedMECAFFfiles)
UsersloggingonafterthefileshavebeeninstalledondiskYwillbeabletousetheMECAFFtools.
However,toprovidethefullfunctionalityatthecommandlinelevel,apostinstallationprocedureis
necessary(see2.4.2).
ThefileSAMPLE EEisasampleEEprofile,whichcanbecopiedtoPROFILE EE Aandadaptedto
theownneeds(see4.5.5).
Installationconsiderations:
DecidingwhethertoinstallthestaticallylinkedMECAFFtoolsdependsontheenvironment
resp.theexpectedusageoftheVM/370system.
If:
o MECAFFisusedwithVM/370R6orVM/380inaversionolderthanSixPack1.2
o orloadingoftheGCCLIBintoresidentmemoryisnotenabledinthesystemwide
SYSPROF EXEC
MECAFFManual0.9.7(beta) Page13/65
o oranyDOSrelatedprogramsisusedunderCMS
then:
thestaticallylinkedversionoftheMECAFFtoolsmustbeinstalled,asthe
dynamicallylinkedtoolswillnotworkatallorwillprovokeABENDsinconjunction
withtheDOSprograms.
IfMECAFFversion0.9.0wasinstalled,theoldversionofFSLISTshouldberemovedto
preventusingitbyinadvertence,astheoldseparateprogramisnowobsoleteandreplaced
byasynonymforEE,providingmorefunctionality.Removingtheoldversioncansimplybe
donewith:
erase fslist module *
UnderSixPack1.2,diskAofuserMAINThasaSYSPROF EXECthathidesthesystemwide
oneandpreventsloadingthenativeGCCruntimeintoresidentmemoryforthisuser.
BeforethedynamicallylinkedMECAFFtoolscanbeusedbyMAINT,thelocalSYSPROFEXEC
hastobedisabledbyrenamingitaway(andreIPLingCMSorloggingoffandonagain),for
example:
  rename sysprof exec a sysprof_ exec a
2.4.2 MECAFFCMStoolspostinstallationoptions
StartingwithMECAFFversion0.9.7,thefullscreentoolssupportspecifyingthefileidentificationsand
listpatternswiththedotnotation,wherethecomponentsofthefileidentificationareconcatenated
withadot,asanalternativetothetraditionalseparationwithwhitespace(see4.4).
Ifusingthedotnotationforfileidsfromthecommandlineisnotinterestingenoughfortheusersof
theVM/370installationandwillnotbeusedatall,nofurtherpostinstallationstepsarerequired.
Therestofthissectioncanbeskippedinthiscase.
Thepostinstallationisalsonotnecessaryiftheextendedparameterlistisnotsupported(VM/370
R6priortoSixPack1.0).
Asasinglefileidentificationindotnotationmaybemorethan8charactersinlength,itcanbeused
forinvokingoneofthecommandsEE,FSLISTorFSVIEWonlyiftheextendedparameterlistis
available.
ThisisthecaseifthecommandsareissueddirectlyontheCMScommandlineprompt(VM/370R6
SixPackstartingwithversion1.0),butnotifthefileidentificationispassedtotheprogrambyan
EXEC,astheEXECprocessortruncatesallparametersto8charactertokens.
Forthisreason,theuseofEXECstoprovidethecommandsFSLISTandFSVIEWasredirectionstoEEis
obsoleted.Instead,theEXECsshouldberemovedafterinstallationandprovisionsshouldbemade
fortheEEprogramtobeinvokeddirectlyasFSLISTorFSVIEW,either
bycopyingtheEE MODULE YtoFSLIST MODULE YandFSVIEW MODULE Y
orbyusingsynonymsforEE.Thesynonymscanberegisteredwiththecommandresolution
mechanismofCMSeither
‐explicitlybyloadingthedeliveredSYNONYMfile
‐orimplicitlyusingtheMECAFFprofilemechanismbyinvokingCKMECAFF(see4.3).
Thisisusuallydoneintheuser’sPROFILEEXEC,butregisteringtheSYNONYMfilecanalsobe
doneinthesystemwideprofileSYSPROFEXECsupportedsinceSixPack1.2.
MECAFFManual0.9.7(beta) Page14/65
BothapproachesallowFSLISTandFSVIEWtobeinvokedfromthecommandlineusingbothfile
identificationconventions,buteachapproachhasadvantagesanddisadvantages:
copyingthefilesmakesFSLISTandFSVIEWdirectlyavailabletoalluserswithoutanyfurther
configurationsteps,butneedsmorediskspaceandrequiresthecopyingoperationstobe
repeated(andnotforgotten)foreachMECAFFupdate.
registeringthesynonyms(explicitlyorwithCKMECAFF)requireseachuserwishingtouse
FSLISTandFSVIEWtoadapttheownPROFILEEXECoralternativelyasystemprogrammerto
extendtheSYSPROFEXEC.ExtendingtheSYSPROFEXECrelievestheusersfrommodifying
theirPROFILEEXEC,butthisiseffectivelya(small)systemmodification.
However,updatesofMECAFFwillnotrequiretoredotheadaptationsteps.
DependingontheusageoftheVM/370system,thefollowingsetupsarerecommended:
ifthesystemisusedbyonlyoneuser,onlythePROFILEEXECofthisusershouldbemodified.
ifseveralusersworkwiththesystem,thesynonymsshouldberegisteredintheSYSPROF
EXECanduserswishingtodoMECAFFcustomizationscanusetheMECAFFprofile
mechanismintheirPROFILE EXEC.
Allmentionedpostinstallationalternativesformakingthedotnotationforfileidsavailablefor
FSLISTandFSVIEWonthecommandlinewillbediscussedinthenextsections.
CommontoallvariantsisthedeactivationofthedeliveredEXECs(assumingMECAFFwasinstalledon
diskY):
access 19e y
copy fslist exec y2 _fslist exec y2 ( repl
copy fsview exec y2 _fsview exec y2 ( repl
erase fslist exec y2
erase fsview exec y2
ThisdeactivationwillbenecessarywitheachupdateofMECAFF,asMECAFFdeliverieswillintendto
beusableoutofthebox,evenifnopostinstallationisperformed.ThisiswhytheMECAFFtools
includeEXECsforthecommandsFSLISTandFSVIEW,sothesetoolsareavailabletoallusersright
fromthestartaftercopyingthetoolsfromthetape(s)totheYdisk.
2.4.2.1 Postinstallationalternative:copyMODULEs
TheFSLISTandFSVIEWcommandscanbemadeavailablewiththefollowingcommands(assuming
MECAFFwasinstalledondiskY):
access 19e y
copy ee module y2 fslist = =
copy ee module y2 fsview = =
2.4.2.2 Postinstallationalternative:modifyPROFILEEXEC
AfterdeactivationoftheEXECsforFSLISTandFSVIEW,eachuserwishingtousethesecommandshas
toextendtheownPROFILE EXECwithoneofthefollowingcommands:
synonym mecaff synonym *
or
 exec ckmecaff
MECAFFManual0.9.7(beta) Page15/65
(thesecondcommandusestheMECAFFprofilemechanism,see4.3,andshouldbethelastCMS
commandexecutedinthePROFILE)
2.4.2.3 Postinstallationalternative:modifySYSPROFEXEC
ThesystemwideprofileSYSPROF EXEC,whichisalwaysexecutedbeforetheuser’sPROFILE
EXEC,isonlyavailablesinceVM/370R6SixPack1.2.Thefollowingpostinstallationalternative
cannotbeimplementedforVM/370priortothisversion.
WARNINGS:
UsingMECAFFprofilefunctionality(CKMECAFF)intheSYSPROF EXECisdiscouraged,as
usinganyconsolestackmanipulationinthePROFILE EXECmayremovethecommand
enteredtransparentlybytheMECAFFprocess,effectivelydisablingtheprofilingmechanism
(see4.3).
Therefore,theSYSPROF EXECshouldregistertheMECAFFsynonymstoprovidetheFSLIST
andFSVIEWcommands.
However,invokingCKMECAFFfromtheSYSPROFispossibleandfunctional,aslongasall
usersrenounceusingconsolestackmanipulationsintheirPROFILE EXEC.
ModifyingtheSYSPROF EXECisasystemmodification,astheCMSSEGandCMSshared
segmentsmustberegenerated.
Beforedoingthismodification,itisadvisabletobackupthesystem(forexamplebybacking
uptheHerculesshadowfilesforthediskpacksoftheVM/370installation).
ThefollowingcommandsequencesarebasedonthefileSYSPROGMEMOofuserMAINT
underSixPack1.2.TheexactcommandstouseforothersystemswithaSYSPROFlike
functionalitymaydiffer.
AdaptingthesystemwideSYSPROF EXECcanbedonebytheuserMAINTwiththefollowing
commands(textsinitalicsarecommentsandarenottobeentered):
editSYSPROFEXEC
 access 190 z (accessdiskSinR/Wmode,notpossiblevia:acc190s)
 ee sysprof exec z2(attention:filemodemustbeZ2)
  (see2.4.2.2forthecommandtoinsert)
 release z
regeneratetheCMSSEGandCMSsharedsegments
 define storage 16m
 ipl 190
 access ( noprof
  (ignorethemessage:CMSSEGsystemname'CMSSEG'notavailable.)
 access 093 b
 access 193 c
 cmsxgen f00000 cmsseg
ipl 190
savesys cms
#cp logoff
MECAFFManual0.9.7(beta) Page16/65
2.5 InstallingtheMECAFFCMShelpfiles
ThehelpfilesfortheMECAFFprogramsarecontainedintheAWStapefilemecaff_h.awsinCMS
TAPEformat.Thistapecontainsthehelpfilesforthefollowingitems:
HelpfilesfortheMECAFFCMScommandsFSQRY,FSCTL,EE,FSLIST,FSVIEW,FSHELP;
thesearestandardCMShelpfiletypeHELPCMDsupportedby(CMS)HELPandFSHELP
HelpfilesforEEsubcommandsandatoplevelhelptopicforEE’sinternalhelp;
thesearenonstandardhelpfiletypesHELPEEandHELP_EEsupportedbyFSHELPonly
ThehelpfilesmustbeinstalledontheUdisk.ToinstalltheMECAFFhelpontheUdisk:
OntheHerculesconsoleenter:
 devinit 480 mecaff_h.aws
LogonasMAINT
AccesstheUdiskinR/Wmode:
 release u
access 19D u
AttachthetapedeviceandloadthefilestodiskU:
 attach 480 to maint 181
tape load * * u
tape load * * u
IfthehelpmenuforFSHELP(see4.8)istobemadeavailablegloballytoallusers(insteadof
eachuserhavinganownmenufile),thishelptopiccanbesuppliedwith:
fshelp ( rebuild
copy menu fshelp a2 = = u2
(forthis,theuserMAINTmustbeabletousetheMECAFFtoolseitherbyinstallingthe
staticallylinkedtoolsorbyactivatingtheresidentmemoryGCCLIB,see2.4)
ReaccessdiskUinR/Omode:
 release u
access 19D u/s
MECAFFManual0.9.7(beta) Page17/65
3 TheMECAFFconsole
LikethestandardVM/370consolehandlerfor3270terminals,theMECAFFconsolesubdividesthe
screeninaninputareaonthebottomofthescreen(oneortwolineshigh,dependingonthescreen
geometry),leavingthelargerupperareaofthescreenfortheoutputarea(see1.2.1).
TheinputareahasontheleftapromptindicatingthecurrentstateofVMequivalenttoindicationon
thelowerrightofthestandardVM/370screenlayoutfor3270.Theinputfieldis130characterslong
andswitchestoinvisibletextwhenapasswordpromptisrecognizedbyMECAFF.
Inputissuedonthecommandline(exceptpasswordinput)issavedinalocalhistoryandcanbe
cyclicallyrecalledforeditingandreissuing:
PF12stepsbackininputhistory,theretrievedcommandreplacesthecurrentcommandline
content.
PF11stepsforwardintheinputhistory.
PF3clearstheinputareaandresetstheinternalhistorypointer,sothenextPF12willagain
retrievethelastcommandentered.
DataenteredonthecommandlineissenttoVMbypressingtheENTERkey.PressingthePA1keywill
enterCP(inGRAFstyle,aPA1AidissenttoVM;inCONSstyle,a #CP commandissent).
Ontheoutputarea,theMECAFFconsoletriestosimulatealineorientedterminalonthebasically
pageoriented3270device.InsteadofthestandardCPapproachoffillingthescreenandasktheuser
toclearthescreenwhenitisfull,theMECAFFconsoleemulatesascrollingbehaviorontheoutput
area:
Wheninitiallystartingwithablankscreen,incominglinesarewrittenfromtoptobottom
untilthelastlineoftheoutputareaiswritten.
Asnewlinesarewritten,thecurrentscreencontentisscrolledup.
Linesmovedoutofthescreendonotvanish,theMECAFFconsoleremembersupto65536
outputlines,allowingtoscrollbackandforthusingthetraditionalPF07/PF08keysforpage
upanddownandadditionallywithPF06/PF09tojumptothetopresp.bottomoftheline
buffer.Iftheoutputzonewaspagedupontheoutputhistory,enteringacommandwilljump
backtothelastpageofoutputhistorywhentheENTERkeyispressed.
Afterwritingoutascreenheightofoutputlinessincethelastuserinputatthecommand
prompt,theMECAFFconsolewillenterthe“More…state,waitingfortheusertopressthe
ENTERkeytoacknowledgethecurrentscreencontentandtoallowfurtheroutput.Leaving
the“More…”statusisanexplicituseraction,thereisnotimeout.
WhiletheMECAFFconsoleisinthe“More…”status,theuserhasthefollowingoptions:
o PagethroughtheoutputhistorywiththePF06,PF07,PF08,PF09keys.
o Preparethenextcommandtoenter,possiblyusingthePF03/PF11/PF12toaccess
thecommandhistory.HoweverthecommandwillnotbesenttotheVMaslongas
theMECAFFconsoleisin(orreturnsto)the“More…”status.
o HalttypingbypressingthePA2key(sendingaHTimmediatecommand).
o TerminatetherunningprogrambypressingthePA3key(sendingaHXimmediate
command).
AfterpressingPA2orPA3,pressingENTERisnecessarytoshowthenewstate.
MECAFFManual0.9.7(beta) Page18/65
ThehandlingofPFkeysintheMECAFFconsoleisstrictlylocaltoMECAFF,thedefinitionofPFkeysin
CP(SET PFxx…)ismeaninglessforaMECAFFconnectedterminal.
ThecommandsboundtothePFkeyscanbequeriedwiththeMECAFFcommandFSQRYand
changedwiththecommandFSCTL.BesidestheMECAFFinternalfunctionalitymentionedabove
(initiallyboundtothePFkeys),almostarbitraryCMSorCPcommandtextscanboundtothePFkeys,
sendingthesecommandstoVMwhenthePFkeyispressedontheterminal.
Asdefault,PF01invokestheMECAFFtoolFSHELP,displayingamenuofthehelptopicsavailableon
diskU.
Similarlythecolorsettingsresp.highlighting(formonochrome3270displays)forthedifferent
displayedscreenelementsoftheMECAFFconsole(normaloutputfromVM,inputarea,echoed
input,…)canbequeriedwiththecommandFSQRYandmodifiedwiththecommandFSCTL.
WhenaprogrambasedontheMECAFFAPIstartsfullscreenoperations,thisprogramandthe
MECAFFconsolehavetosharetheterminaltohandletheirrespectiveI/Ooperations:
Ifanyserialoutputiswrittenbytheprogram(orthesurroundingEXEC)atstartup,initiating
thefullscreenmodewillfirstenterthe“More…status.
Theprogramhasexclusiveandtransparentaccesstothe3270terminalduringtherecurring
fullscreen“writescreen“and“receiveuserinput”cycles.
Theprogram“owns”theterminalduringeachsinglecycle,includingthehandlingofall
transmissiontriggeringkeys,soMECAFFsPFandPAsettingsaremeaninglesswhilethe
programownstheterminal.
MECAFFhastheopportunitytoregaincontrolovertheterminalonlybetweenthefullscreen
cycles(i.e.aftertheinputdataresp.stateinfullscreenmodehasbeensenttotheprogram).
AslongasnoserialoutputfromVMoccurs,theenvironmentwillstayinfullscreenmode.
Whiletheprogramownstheterminal,anyoutputissuedasynchronouslybyCP(like“TAPE
181ATTACHED”ormessagesfromotherusers)isbufferedbyMECAFFuntilthefullscreen
cycleiscompletedandMECAFFmayregainownershipontheterminal:thescreenisthen
switchedbacktoconsolemodeandthebufferedlinesarethennormallyoutput.Anyother
outputafterafullscreencyclealsoletsMECAFFswitchbacktoconsolemode.
Ifanylineswerewritteninconsolemodesincethelastfullscreencycle,the“More…status
willbeenteredwhenthenextfullscreencycleisstartedbytheprogram.
WhenaVMsessionendsonaconnectedterminal(eitherviaLOGOFF,DISCONNorbeingFORCEd),
MECAFFentersthe“More…”state,whichisautomaticallyreleasedafter3seconds,clearingthe
outputlineandcommandhistorybuffers.
MECAFFManual0.9.7(beta) Page19/65
4 TheMECAFFtoolsforCMS
BasedontheMECAFFAPI,someCMSfullscreentoolsareavailable,aswellasprogramstolistthe
consolecharacteristicsandchangeitssettings.
ThefullscreentoolsEE(editor),FSLIST(filelistviewer)andFSVIEW(filebrowser)areinfact
integratedintoasingleprogramtoallowthenavigationbetweenbasicfunctionalmodesEE,FSLIST
andFSVIEW.DependingonhowitisinvokedfromCMS,theprogramstartsinonetheEE,FSLISTor
FSVIEWmodes,allowingdifferenttransitionsbetweenthefunctionalmodesdependingontheinitial
mode.Forthisreason,themodesEE,FSLISTandFSVIEWwillbedescribedasseparateitems(asif
theywereseparateprograms).
TheprogramFSHELPdisplaystheCMShelpfilesondiskUinfullscreenmode,alsoprovidingan
overviewmenupageandnavigationtootherhelptopics.
IftheuserdidnotlogintotheVMwithaMECAFFconnectedterminal,theinternalcommunicationof
theMECAFFAPIwillsimplybewrittenoutontheterminalinsteadoftheexpectedfullscreensetup
oftheprogram.AsthefirstAPIcallexecutedwillalwaysbequeryingtheterminaltype,this
commandsequencetoMECAFFwillbedisplayedaswellasaninstructiontextthatshouldbe
followedbysimplypressingENTER:
fs-qry
<{>}T Please press ENTER to cancel fullscreen operation
Inthiscase,theMECAFFAPIwillrecognizethattheexternalMECAFFprocessisnotpresentandthe
programwillterminatewithanerrormessageandanappropriateexitcode:
** no valid response (terminal probably not connected to a MECAFF)
Ready(00001); T=0.01/0.01 21:23:59
Whentheterminalconnectionislost(theterminalisclosedortheMECAFFprocessisterminated),
theVMsessionisdisconnected.IfaMECAFFbasedapplicationisinfullscreenmodewhenthis
happens,theprogramwilltrytoreestablishthefullscreensessionwhentheuserreconnectstothe
VM.WhenenteringtheBEGINcommandontheCPlevelafterthereconnect,theEE,FSLIST,FSVIEW
andFSHELPprogramswillcontinuetoworkandtrytorestartthecommunicationwithMECAFF:
thiswillsucceedifthe3270terminalisagainconnectedviaMECAFF,allowingtoproceed
withfullscreenmodeafterleavingthe“More…state.However,theeditingchangesmade
onthelastEEscreenbeforedisconnectionwillbelost.
ifthe3270terminalisdirectlyconnectedtoHercules(ortheterminalisnota3270
emulation),fullscreenmodecannotberestored.TheprogramsFSLIST,FSVIEWandFSHELP
willterminatewithanappropriateerrormessage.TheeditorEEwillenteraminimal
commandlineloop(“rescuemode”)allowingtosavemodifiedfiles,althoughnoeditingis
supported(see4.5.6).
4.1 FSQRYQueryInformations
TheCMScommandFS-QRYliststhecharacteristicsofthe3270terminalemulatorconnectedto
MECAFF,thecurrentdisplayattributesforvisualelementsoftheconsoleandthecurrentPFsettings
oftheMECAFFconsole.
MECAFFManual0.9.7(beta) Page20/65
Thecommandhasthefollowingparameterstospecifywhichinformationtodisplay(optionalpartsof
parametersaregiveninlowercase):
VERsions
listtheversioninformationoftheMECAFFprocessand‐API
fs-qry versions
Version information for MECAFF:
MECAFF process version : 0.9.7
MECAFF API version ... : 0.9.7
Ready; T=0.01/0.01 21:43:20
Running >>
TErm
listthecharacteristicsofthe3270terminalemulatorconnectedtoMECAFF
fs-qry term
Characteristics of attached 3270 terminal:
Terminal type .... : 'IBM-DYNAMIC'
Alt-Screen ....... : yes
Colors ........... : yes
Extended Highlight : yes
Max. Screensize .. : 87 cols x 50 rows
SessionMode ...... : 3270
Ready; T=0.01/0.02 21:14:50
Running >>
ThemeaningofthelinesissuedbyFSQRYshouldbeobviousandsimplyverbalizethe
correspondingfieldsoftheMECAFFAPI.Theline“Max.Screensize”willtellthesizeofthe
alternatescreeniftheterminal“AltScreen”is“yes”or80x24iftheterminalisamodel‐2not
supportinganalternatescreen.
ATtrs
listthedisplayattributesforvisualelementsoftheconsole,theseelementsare:
OutNormal:outputlinesfromVM/370
OutEchoInput:commandsenteredontheMECAFFcommandpromptdisplayedinthe
outputarea
OutFsBg:outputlinesfromVM/370receivedwhiletheterminalisownedbytheCMS
programinfullscreenmode(temporaryattributeusedtohighlighttheselineswhilein
More…state)
ConsoleState:stateindicatorinfrontoftheinputpromptoftheMECAFFconsole.
CmdInput:theinputpromptoftheMECAFFconsole.
theattributesconsistofanoptionalHighlightindicator(relevantformonochrome3270
terminals)andthecolorspecification(Default,Blue,Red,Pink,Green,Turquoise,Yellow,White)
fs-qry attrs
Settings of MECAFF console:
OutNormal ........ : Blue
OutEchoInput ..... : Turquoise Highlight
OutFsBg .......... : Pink
ConsoleState ..... : Yellow
CmdInput ......... : Turquoise
Ready; T=0.01/0.04 22:01:15
Running >>
MECAFFManual0.9.7(beta) Page21/65
PFkeys
listthesettingsofthePFkeysoftheMECAFFconsole
internalMECAFFcommandsassignabletoPFkeysstartwithanexclamationmark:
fs-qry pfkeys
PF-Key settings of MECAFF console:
PF01 : FSHELP
PF02 not set
PF03 : !CMDCLR
PF04 not set
PF05 not set
PF06 : !TOP
PF07 : !PAGEUP
PF08 : !PAGEDOWN
PF09 : !BOTTOM
PF10 not set
PF11 : !CMDNEXT
PF12 : !CMDPREV
PF13 not set
PF14 not set
PF15 not set
PF16 not set
PF17 not set
PF18 not set
PF19 not set
PF20 not set
PF21 not set
PF22 not set
PF23 not set
PF24 not set
Ready; T=0.02/0.06 22:08:35
Running >>
ALl
listalltheinformationabove.
STATe
checkiftheterminalisconnectedviaMECAFFandsetthereturncodeaccordingly:
 RC=0:theterminalisconnectedthroughMECAFFandMECAFFtoolscanbeused
RC!=0:theterminalisconnecteddirectlytoHercules,theMECAFFtoolswon’twork
nooutputiswrittentothescreen.
4.2 FSCTL
TheCMScommandFSCTLallowstosetthedisplayattributesforthevisualselementsoftheMECAFF
consoleaswellasthefunctionalityboundtothePFkeyswhentheterminalisownedbytheMECAFF
console.
Thecommandhasthefollowingsyntax(optionalpartsofcommandtokensaregiveninlowercase):
FS-CTL ATTR elem color [ HIGHLight ] [elem color [ HIGHLight ] …]
PF pfno [ cmd-text ]
UsingthesubcommandATTRsetsthecolorandoptionallythehighlightingfortheelementsofthe
MECAFFconsole,whereelemcanbe:
NORMal:outputlinesfromVM/370
ECHOinput:commandsenteredontheMECAFFcommandpromptdisplayedinthe
outputarea
FSBG:outputlinesfromVM/370receivedwhiletheterminalisownedbytheCMS
programinfullscreenmode(temporaryattributeusedtohighlighttheselineswhilein
More…state)
MECAFFManual0.9.7(beta) Page22/65
CONSolestate:stateindicatorinfrontoftheinputpromptoftheMECAFFconsole.
CMDInput:theinputpromptoftheMECAFFconsole.
Thecolorcanbeoneof:Default,Blue,Red,Pink,Green,Turquoise,Yellow,White.
SeveralvisualelementscanbesetwithoneFS-CTLcommand,whenspecifyingthesameelements
morethanonceonlythelastsettingwillbeuse.
Example:
FS-CTL ATTR NORMAL GREEN ECHO WHITE HIGHLIGHT FSBG RED
ThesubcommandPFsetsthecommandissuedbyMECAFFwhenthecorrespondingkeyispressed
whilethescreenisownedbytheMECAFFconsole.ThecommandboundtoaPFkeycanbeeitheran
internalMECAFFcommandoracommandstringthatwillbesenttotheVMasifithadbeengivenon
thecommandline.
ThefollowinginternalcommandscanbeboundtoPFkeys(withthePFkeytheyareassignedper
default):
!CMDCLRclearinputareaoftheconsole(PF03)
!TOP scrolltheoutputareatothestartofthebufferedlines(PF06)
!BOTTOMscrolltheoutputareatotheendofthebufferedlines(PF09)
!PAGEUPscrolltheoutputareaonepagetowardsthestartofthebufferedlines(PF08)
!PAGEDOWNscrolltheoutputareaonepagetowardstheendofthebufferedlines(PF07)
!CMDPREVsteptheinputpromptbackininputhistory(PF12)
!CMDNEXTsteptheinputpromptforwardininputhistory(PF11)
AcommandtexttobesenttoVMcanbeupto60characterslong,longercommandstringswillbe
truncated.Ifnocommandisgiven,thecommandcurrentlyboundtothePFkeywillberemoved.
Examples:
FS-CTL PF 2 FSLIST * C
(setPF02tosendthecommand“FSLIST*C“toCMS)
FS-CTL PF 1 !CMDPREV
(setPF01toretrievethepreviousentryofthecommandhistoryintothepromptarea)
FS-CTL PF 12
(removethecommandboundtoPF12)
4.3 CMSsessioncustomizationwithCKMECAFF/MCFFPROF
IfFS-CTLisdirectlyusedinthePROFILE EXECtocustomizetheMECAFFconsole,the
initializationoftheCMSsessionmaylockupandrequiremanualinteractionifthe3270terminal
emulatorisnotconnectedthroughMECAFF(see4).
Toavoidthissituation,theCKMECAFF EXECfileisdeliveredwithMECAFFallowingto
conditionallyperformMECAFFrelatedinitializationsonlyiftheterminalisconnected
throughMECAFF,
provideaprofilefunctionalityforMECAFFsimilartootherprofiles.
MECAFFManual0.9.7(beta) Page23/65
TheCKMECAFF EXECsendsacommandtotheMECAFFprocess,requestingtosendbackaCMS
commandasifitwasenteredonthecommandprompt:
IftheMECAFFprocessisnotpresent,thetextsentbyCKMECAFFissimplydisplayedonthe
screenandnothingmorehappens(exceptforastrangelinewrittentotheconsole).
IftheterminalisconnectedthroughMECAFF,theMECAFFprocessinterpretsthecommand
andsendsbacktheCMScommandportion,allowingtheinitializationofthesessionto
proceedontheCMSside.
InvokingtheCKMECAFF EXECshouldbedonefromtheuser’sPROFILE EXECoralternatively
fromthesystemwideSYSPROF EXEC.Ineithercase,itmustbeensuredthattheconsolestackis
emptywhenCKMECAFFisinvoked,soitshouldbethelastactionofthePROFILE/SYSPROFEXEC,asa
commandwill(probably)besenttoCMSforexecution,possiblyinterferingwithstackoperationsin
theinvokingprofile.
IfCKMECAFFisinvokedbySYSPROF EXEC,thennoconsolestackmanipulationsmaybedonein
thePROFILE EXEC,asthesemanipulationsmaydiscardthecommandenteredbyMECAFFto
confirmitspresence,effectivelydisablingtheMECAFFprofilefunctionality.Ifconsolestack
manipulationsarenecessaryintheuser’sPROFILE,thenCKMECAFFshouldbeinvokedinthePROFILE
insteadfromSYSPROF.
IftheterminalisconnectedthroughMECAFF,thefollowingactionsareperformed:
ThesynonymsforEE(FSLIST,FSVIEW)areaddedtothesynonymtable.
Theuser’sMECAFFprofileMCFFPROF EXECisinvokedifthefileisfoundonanydisk
accessed.
ThefileMCFFPROF EXECcandofurtherMECAFFrelatedoperations,forexamplecustomizethePF
keysoftheMECAFFconsoleandinformtheuserabouttheavailabilityoftheMECAFFfunctionality,
forexample
&CONTROL OFF
FS-CTL PF 2 FSLIST * C
FS-QRY VERSION
&EXIT 0
AsexecutingtheprofileactionistriggeredbyacommandenteredtoCMSinthebackgroundbythe
MECAFFprocess,itwillbeexecutedafterthestandardPROFILEiscompletelyprocessed,sothe
PROFILEwillapparentlyhave2Readymessages:
Other useful documentation and sample programs can be found on MAINT 19D,
accessed as your U disk.
For more details, type HELP WELCOME ( MORE
Ready; T=0.02/0.04 20:31:35
Ready; T=0.01/0.01 20:31:35
Running >>
IftheaboveMCFFPROF EXECispresent,theoutputfromthisprofilewillbedisplayedbetweenthe
2Readymessages:
MECAFFManual0.9.7(beta) Page24/65
Other useful documentation and sample programs can be found on MAINT 19D,
accessed as your U disk.
For more details, type HELP WELCOME ( MORE
Ready; T=0.02/0.05 20:28:46
Version information for MECAFF:
MECAFF process version : 0.9.7
MECAFF API version ... : 0.9.7
Ready; T=0.01/0.03 20:35:46
Running >>
4.4 HandlingoffileidentificationsinEE,FSLISTandFSVIEW
TheMECAFFtoolsEE,FSLISTandFSVIEWallowspecifyingfileidentificationswith2alternative
conventions:
withthe“traditional”CMSconventionwiththecomponentsfilename,filetypeand
(optionally)filemodeseparatedwithwhitespace(oneormoreblanks):
  fnft[fm]
withthedotconventionusedbymanyotherOSes,separatingthe3componentswithadot,
joiningthemtoasinglecharacterstring:
  fn.ft[.fm]
Bothconventionscanevenbemixed,sothefollowingidentificationsspecifythesamefile:
PROFILE EXEC A
PROFILE.EXEC.A
PROFILE EXEC.A
PROFILE.EXEC A
WhenspecifyinganewfileidentificationinEEoranewfilepatterninFSLIST,itispossibleto
referencecomponentsfromthecontext(thecurrentfileidentificationorpattern)bygivingtheequal
sign(=)forthecorrespondingcomponents.Forexample:
whileeditingthefile: FOO C A1
specifying: = h
willopenthefile:FOO H A1
havingthepattern:X* MODULE S
inFLISTandgiving:=.=.a
willlistthefiles:X* MODULE A
Asasinglefileidentificationindotnotationmaybemorethan8charactersinlength,itcanbeused
forinvokingoneofthecommandsEE,FSLISTorFSVIEWonlyiftheextendedparameterlistis
available.
See2.4.2forthepostinstallationoptionstoensurethatthedotnotationcanbeusedonthe
commandlinebyallMECAFFfullscreenprograms.
4.5 EEFullscreeneditor
4.5.1 Introduction
EEisaMECAFFbasedfullscreeneditorallowingtoeditfileswithaLRECLupto255.Usageand
screenlayoutresembletoother3270fullscsreeneditorsandsupportseditingseveralfilesinparallel.
MECAFFManual0.9.7(beta) Page25/65
TheeditorEEisinvokedfromCMSwith
EE fn ft [ fm ]
or
EE fn.ft[.fm]
IftheCMSfilefnft[fm]doesnotexists,thecharacteristics(RECFM,LRECL,casehandling)forthe
newfilearetakenfromtheFTDEFAULTScommand(see4.5.4.4)forthefiletype(specifiedinoneif
EE’sprofiles,see4.5.5).
Unlikeothereditors,wheneditingfileswiththeLRECLlargerasthescreeniswide(lesstheprefix
zone),EEdoesnotprovide“shiftleft”or”shiftright”functionality.Instead,thelinesofthefileare
wrappedatthescreenboundaries,eachlinehavingasingleinputfieldwithfullLRECLlength
spanning2ormorelinesonthescreen.Foraneasierorientation,thegapfromtheendofalineinput
fieldtothenextborder(screenborderortheprefixzoneifplacedattheright)canbemarkedwith
fillchars.
AsMECAFFandEEbothsupportnonstandardterminalscreensizes,itispossibletochoosethe
terminalsizeaccordingtothemostusedLRECL.ForexampleforLRECL80files,aterminalwith87
columnsissuitabletoeditthesefilesina“natural”way:
File: MEMCHECK C A1 RECFM: V LRECL: 80 Lines: 37 Current: 25
===== BlockPtr p = (BlockPtr)malloc(sizeof(Block));
===== p->next = root;
===== return p;
===== }
=====
===== int main() {
===== BlockPtr ptr;
===== BlockPtr root = NULL;
=====
===== ptr = newBlock(root);
===== int count = 0;
===== while(ptr) {
....+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
===== count++;
===== root = ptr;
===== ptr = newBlock(root);
===== }
=====
===== printf("allocated %d blocks -> %d bytes\n", count, count*sizeof(Block));
=====
===== while(root) {
===== ptr = root->next;
===== free(root);
===== root = ptr;
===== }
===== }
* * * Bottom of file * * *
===>
02=RNxt 03=Quit 04=Srch 06=SpltJ 07=PgUp 08=PgDown 10=PInput 11=Clear 12=Recall
Unchanged EE V0.9.7, 1 File(s)
IfafileloadedintoEEcontainsbinarycharacters(codes0x00to0x3For0xFF),thesecharactersare
replacedwithadot(‘.’)inthefilebuffer,thefileismarkedasbinaryandEEwillpreventallwrite
operationstotheoriginaldiskfile.Ifnecessary,thisprotectioncanberemoved(seeUNBINARY).
4.5.2 Editingmultiplefilesandmodetransitions
EEallowseditingmorethanonefileatatime.AfterstartingEEwiththefirstfile,morefilescanbe
openedforeditingorcreatedwiththeEEsubcommandorbyselectingafileforeditingfromthe
FSLISTortheFSVIEWmodes.
MECAFFManual0.9.7(beta) Page26/65
Allfilesopenedforeditingareheldinaring,fromwhichonefileisthecurrentlyedited.The
commandsRINGNextorRINGPrevswitchthecurrentlyeditedfilebysteppingthroughtheringof
filesloaded.
ThefollowingdiagramshowsthetransitionsbetweenthemodesoftheEEprogramtostartorend
editingfiles,alsoshowingwiththecommands(CMD)orPFkeys(PFxx)tochangefrommodeto
mode:
CMS
PF3
[Q]QUIT[ALL]
[F]FILE
E
E
EE
FSVIEWFSLIST
PF12
PF3
FSLIST PF2
PF3
EE
PF2
4.5.3 Prefixcommands
EEsupportsthefollowing(caseinsensitive)commandsintheprefixarea:
/ setthislinetobethecurrentline
.csetthelinemarkconthisline,replacingapossibleexistingmarkwiththesame
name;
linemarknamesconsistofasingleletterA..Z,soupto26linemarkscanbe
definedperfileinanEEsession.
@ignoreanddiscardmodificationsmadetothislineinthefileareaonthescreen
I insertanemptylineafterthisline
D deletethisline
DDmarkoneoftheboundariesofalineblocktobedeleted
" duplicatethisline
""markoneoftheboundariesofalineblocktobeduplicated
<[n][o] shiftthislinetotheleft(seebelowfortheoptionalparameters)
<<[n][o] markoneoftheboundariesofalineblocktobeshiftedtotheleft(seebelowfor
theoptionalparameters)
<[n][o] shiftthislinetotheright(seebelowforoptionalparameters)
>>[n][o] markoneoftheboundariesofalineblocktobeshiftedtotheright(seebelowfor
optionalparameters)
M movethis(single)linetothetargetspecifiedbyeitheraForaPprefixcommand
MM markoneoftheboundariesofalineblocktobemovedtothetargetspecifiedby
eitheraForaPprefixcommand
MECAFFManual0.9.7(beta) Page27/65
C movethis(single)linetothetargetspecifiedbyeitheraForaPprefixcommand
CC markoneoftheboundariesofalineblocktobecopiedtothetargetspecifiedby
eitheraForaPprefixcommand
F placetheline(s)tocopyormoveafter(following)thisline
P placetheline(s)tocopyormovebefore(preceding)thisline
Theshiftingprefixcommandssupportthefollowingoptionalparameters(whichcanbespecifiedon
anyoftheboundariesforblockshiftingprefixcommands):
n:thenumberofcharacterpositionstoshiftby.Thismustbeasingledigitfrom1to9,with
thedefaultspecifiedwiththeSHIFTCONFigcommandifnisnotspecified.
o:theshiftmodeforhandlingshiftingbeyondtheleftorrightfileborder,overridingthe
defaultgivenwiththeSHIFTCONFigcommand.Thismustbeoneofthefollowing
charactersidentifyingoneoftheshiftmodes(seethecommandSHIFTCONFigin4.5.4.4):
 ?CHECKall
 :MINimal
 #LIMit
 !TRUNCate
Ifalineblockneedingatargetposition(MM..MMorCC..CC)isnotspecifiedatonceonthesame
screen,thetargetposition(ForP)mustbespecifiedafterbothboundariesoftheblockareselected
(ortogetherwiththesecondboundary).Iftheblockisdefinedbutthetargetisnot,theselected
block(boththeprefixandthefilezones)willbemadereadonlyuntilthecommandisfinalizedby
givingthetarget.
PrefixmoveandcopyoperationscanbeperformedbetweenfileseditedinEEbyspecifyingthe
source(M,C,MM..CCorCC..CC)andtarget(Fresp.P)oftheoperationindifferentfiles(see
RINGNext/RINGPrev).
Aslongasprefixcommandsdonotconflict,morethanonesinglelinecommandandpossiblyone
linerangecommandcanbeissuedononescreeninput.Singlelinecommandsareprocessedbefore
apossiblygivenblockcommandandtargetposition.
IfEEcannotensureameaningfulexecution,allprefixcommandsonthescreenareignoredand
removed.
Afterexecutingprefixcommands,EEwilltrytoplacethecursoratameaningfulplaceinthefilearea.
Theplacementlinedependsontheprefixcommand(e.g.thelineinsertedwiththeIprefix
command,butthelineafterthedeletionforD/DDoperation).Ifthislineisdisplayedonthescreen,
thecursorwillbeplacedatthecurrentindentation(ofthelastpreviousnonblankline)fortheI
commandresp.onthefirstnonblankcharacteroftheline.Ifthelineforthecursorplacementisnot
visible(forexampleaprefixcommandwasenteredbutthefilecontentwasalsoscrolledwithaPF
key),thecursorisplacedatthecommandprompt.Ifmorethanoneprefixcommandisgiven,the
cursorisplacedbythefirst(topmost)command.
4.5.4 Commands
Commandscanbeenteredatthecommandpromptarrowwithatotalcommandlengthof120
characters.
MECAFFManual0.9.7(beta) Page28/65
Thecommandandparameterkeywordsmaybeabbreviated,theminimalpartofthekeywordsis
giveninthefollowingdescriptionsinuppercase.
Ifthetextgivenontheinputpromptisnotrecognizedasavalidcommand,theinputwillbetreated
asalocationtarget(seecommandLocate)ifthefirsttokenstartswithadigitoroneofthe
characters+-.:or/
4.5.4.1 DefaultPFsettings
Forthefullscreeneditingmode,themeaningofthePFkeyscanbefreelydefinedbyassigninga
commandtoaPFkeywiththecommandPF(see4.5.4.4),eitherintheprofilesforEE(see4.5.5)or
ontheEEcommandprompt.EEusesthefollowingdefaultPFkeyassignments:
PF01: TABFORWARD
PF02:RINGNEXT
PF03:QUIT
PF04:SEARCHNEXT
PF06:SPLTJOIN
PF07:PGUP
PF08:PGDOWN
PF10:PINPUT
PF11:CLRCMD
PF12:RECALL
PF13:TABBACKWARD
PF16:REVSEARCHNEXT
PF19:PGUP66
PF20:PGDOWN66
Fortheinputmodeandtheprogrammersinputmode,thePFkeycommandassignmentsarefixed
(seethedescriptionofthesemodesin4.5.4.2).
4.5.4.2 Editingandscrollingcommands
BOTtom
Movethecurrentlinetobethelastlineofthefile.
Change /string1/string2/ [ count1 [ count2 ] ]
Replaceoccurrencesofstring1bystring2.
Theparametercount1specifieshowmanyoccurrencesineachlinearetobereplaced.Ifcount1
isomitted,thevalue1isassumed,i.e.onlythefirstoccurrenceofstring1isreplaced.Specifying
*ascount1replacesalloccurrencesonstring1.
Theparametercount2specifieshowmanylinesfrom(andincluding)thecurrentlinearetobe
processed.Ifcount2isomitted,thevalue1isassumed,i.e.onlythecurrentlineisprocessed.
Specifying*ascount2processesthecurrentandallremaininglinesofthefile.
Asseparatorcharacterforstring1andstring2,anynonalphanumericandnonblankcharacter
maybeused(with/beingthetraditionalseparatorcharacter).
DELete [ count ]
Deletecountlinesbeginningwiththecurrentline.Ifcountisomitted,1lineisdeleted.
MECAFFManual0.9.7(beta) Page29/65
GET [ fn [ ft [ fm ] ] ]
[fn[.ft[.fm]]]
Readthespecifiedfileandinsertitslinesafterthecurrentline.Ifthefileinsertedcontains
binarycharacters(codes0x00to0x3For0xFF),thesecharactersarereplacedwithadot(‘.’)in
thefilebuffer,thecurrentfileismarkedasbinaryandEEwillpreventallwriteoperationsofthe
editedfiletotheoriginaldiskfile.Ifnecessary,thisprotectioncanberemoved(seeUNBINARY).
ThedefaultfiletypeisEE$BUF.Iffmisomitted,thefilemodeAisassumed.Whennofileidis
given,thefilePUT EE$BUF Aisread.
GETD [ fn [ ft [ fm ] ] ]
[fn[.ft[.fm]]]
LiketheGETcommand,butadditionallydeletingthefileafterinsertingitscontent.
Input [ line-text ]
Ifalinetextisgiven,anewlinewithlinetextisinsertedaftercurrentlineandthisnewline
becomesthenewcurrentline.
Ifnotextisgivenafterthecommand,EEentersinputmode,allowingmultiplelinestobe
enteredaftercurrentlinebydisplayingafreespacebelowthecurrentline.Whenpressing
ENTERafterenteringlines,EEmakesthelastenteredlinetothenewcurrentandstaysininput
mode,allowingformorelinestobeentered.Theinputmodeisterminatedeitherbypressing
theENTERkeywithoutachangeofthefilecontentorbypressingthePF03key.
TheinputmodehasthefollowingfixedcommandassignmentstoPFkeys:
PF01: TABFORWARD
PF03:QUIT(leaveinputmode)
PF13:TABBACKWARD
PF15:QUIT(leaveinputmode)
Exceptforchangesinthefilezoneoftheeditor,nofurtheroperationsarepossiblewhilein
inputmode(nocommands,noPFkeysothersthandescribedabove,noprefixcommands).
Locate target1 [ target2 [ … ] ]
Movethecurrentlinetobethelinespecifiedbythesequenceoftargets.Inmostcases,only
onetargetwillbeused,butseveraltargetsmaybeusedinsteadofconsecutiveLocate
commands.Relativeandabsolutemovesareboundedtothebeginresp.theendofthefile.The
currentlineisonlymovedifthewholetargetsequencecanbeexecuted,i.e.ifgivenlinemarks
existandthegivensearchstringsarefound.
Thefollowingmovetargetsaresupported:
n,+n,‐n
relativemoveofthecurrentlinebythespecifiednumberoflines,givingapositivevalue
(withoutsignorexplicitlywitha+character)movestowardthefileend,givinganegativevalue
movestothefilebegin.
:n
absolutemovetolinen.
MECAFFManual0.9.7(beta) Page30/65
.c
movetolinemarkc.
/string/
movetothenextlineindirectiontothefileendcontainingstring.Insteadof/,anynon
alphanumericcharacterdifferentfromblankandthetargetintroducingcharacters(+‐:.)can
beusedasseparatorforthesearchstring.
/string/
movetothenextlineindirectiontothefilestartcontainingstring.Insteadof/,anynon
alphanumericcharacterdifferentfromblankandthetargetintroducingcharacters(+‐:.)can
beusedasseparatorforthesearchstring.
MARK .c
MARK CLear .c | * | ALL
Set(orreplace)thespecifiedlinemarkcresp.removethespecifiedlinemarkoralllinemark(s).
Next [ count ]
Movethecurrentlinedownbycountlines(indirectiontothefileend)ifcountispositive,orup
(tofilestart)ifcountisnegative.Ifnocountisgiven,thecurrentlineismovedby1line.
PGDOwn [ pct | lesscount ]
Movethecurrentlineonepageheightdown(indirectiontothefileend).Thepageheightisthe
numberofthevisiblefilelinesonthescreen.
Ifapctinthevaluerange33..100isgiven,scrollingwilloccurforthispercentageofthevisible
filelinecount.
Ifanegativevaluelesscountisgiven,thenumberoflinesscrolledwillbethevisiblefileline
countminusthenumberoflinesspecified(absolutevalueoflesscount).However,scrollingwill
bedoneatleastbya1/3screenheight.
PInput
Enterprogrammersinputmode.Ifthecursoriscurrentlyinthefileareaortheprefixarea,the
cursor’slineismadethecurrentlinebeforetheprogrammersinputmodeisentered.The
PInputcommandisassignedtoPF10perdefault,allowingtostartprogrammersinputmode
directlyfromthefilearea.
Inprogrammersinputmode,asingleemptylineisinsertedafterthecurrentlineandthislineis
madecurrent.AllfilelinesonthescreenareeditableandtheSPLTJOINfunctionalityisavailable
throughPF06/PF18.
AnewinputlineisautomaticallyinsertedwiththeENTERkeywhentextwasenteredonthe
inputlineorwhenthecursorisontheinputline.Wheninsertingthenewinputline,thecursor
isplacedattheindentationofthe(firstnonempty)lineprecedingtheinputline,allowingto
enterprogramtextinanaturalwaywhenworkingwithnestedblocks.
PressingENTERwhennotextwasenteredontheinputlineandthecursorwasmovedaway
fromthislinesimplyplacesthecursorbacktotheinputlineattheindentationcolumnwithout
creatinganewinputline.
MECAFFManual0.9.7(beta) Page31/65
TheprogrammersinputmodecanbeleftwiththePF03orPF15keys.Ifthecurrentinputline
wasleftunchanged,itisremovedwhenprogrammersinputmodeends.
TheprogrammersinputmodehasthefollowingfixedcommandassignmentstoPFkeys:
PF01: TABFORWARD
PF03:QUIT(leaveprogrammersinputmode)
PF06:SPLTJOIN
PF10:PINPUT(moveprogrammersinputmodetothelineafterthecursor’sline)
PF13:TABBACKWARD
PF15:QUIT(leaveprogrammersinputmode)
PF18:SPLTJOINFORCE
Exceptforchangesinthefilezoneoftheeditor,nofurtheroperationsarepossiblewhilein
programmersinputmode(nocommands,noPFkeysothersthandescribedabove,noprefix
commands).
PGUP [ pct | lesscount ]
Movethecurrentlineonepageheightup(indirectiontothefilestart).Thepageheightisthe
numberofthevisiblefilelinesonthescreen.
Ifapctinthevaluerange33..100isgiven,scrollingwilloccurforthispercentageofthevisible
filelinecount.
Ifanegativevaluelesscountisgiven,thenumberoflinesscrolledwillbethevisiblefileline
countminusthenumberoflinesspecified(absolutevalueoflesscount).However,scrollingwill
bedoneatleastbya1/3screenheight.
Previous [ count ]
Movethecurrentlineupbycountlines(indirectiontothefilestart)ifcountispositive,ordown
(tofileend)ifcountisnegative.Ifnocountisgiven,thecurrentlineismovedby1line.
PUT [ count [ fn [ ft [ fm ] ] ] ]
[ count [fn[.ft[.fm]]] ]
PPUT [ count [ fn [ ft [ fm ] ] ] ]
[ count [fn[.ft[.fm]]] ]
Writecountlinesbeginningwiththecurrentlinetothespecifiedfile.Ifnocountisgiven,one
lineiswritten.
ThedefaultfiletypeisEE$BUF.Iffmisomitted,thefilemodeA1isassumed.Whennofileidis
given,thefilePUT EE$BUF A1iswritten.
WhenusingPUTforanexistingtargetfile,itwillbeonlybeoverwrittenwhenthefiletypeand
thefilemodearedefaulted(orthedefaultvaluesEE$BUFA1areexplicitlygiven).Overwriting
anexistingfilewitharbitraryfiletypeorfilemodeisforcedbyusingthecommandPPUT.
PUTD [ count [ fn [ ft [ fm ] ] ] ]
[ count [fn[.ft[.fm]]] ]
PPUTD [ count [ fn [ ft [ fm ] ] ] ]
[ count [fn[.ft[.fm]]] ]
MECAFFManual0.9.7(beta) Page32/65
LikethePUTresp.PPUTcommands,butthelineswrittenareadditionallydeletedfromthefile
editedifwritingthetargetfilewassuccessful.
RESet
Ignoreandremoveallprefixcommandsonthescreen,alsocancelanypendingprefixblock
command.ThiscommandistypicallyassignedtoaPFkey.
REVSEArchnext
RSEArchnext
-/
IfthelastLocatecommandenteredhadexactlyonetargetandthistargetwasasearch
pattern,thenthesearchdirection(downorup)isinversedandtheprevioustextsearchis
repeatedinthenewsearchdirection.ThecommandREVSEArchnextisassignedtoPF16per
default.
Thesingletoken-/(withoutanyfurthercharactersonthecommandline)isashortcutfor
REVSEArchnext.Givinganycharacter(evenablank)afterthe-/willstartanewLocate
withthistextassearchpattern.
SEArchnext
/
IfthelastLocatecommandenteredhadexactlyonetargetandthistargetwasasearch
pattern,thentheprevioustextsearchisrepeatedinthelastsearchdirection(downorup)used.
ThecommandSEArchnextisassignedtoPF04perdefault.
Thesingletoken/(withoutanyfurthercharactersonthecommandline)isashortcutfor
SEArchnext.Givinganycharacter(evenablank)afterthe/willstartanewLocatewith
thistextassearchpattern.
SHIFT [by] Left|Right [ count | :line | .mark ] [ shiftmode ]
Shiftthecontentofthecurrentlineorablockoflinestotheleftbyremovingcharactersorto
therightbyinsertingspacesatthebeginningoftheline.Thedirectionofindentationshifting
mustbeexplicitlygivenasparameter.
Theamountoftheindentationshiftingisspecifiedbytheoptionalparameterby,defaultedby
thevaluespecifiedwiththeSHIFTCONFigcommandresp.shiftingby2charactersifno
SHIFTCONFigcommandwasgiven.
Ifmorethanonlythecurrentlineistobeshifted,ablockoflinesstartingorendingwiththe
currentlinecanbespecifiedbyeitherwitha
relativelinecount
thecountgivesthenumberofadditionallinesbefore(negativevalue)orafter(positive
value)thecurrentlinearetobeshifted;thecount0shiftsonlythecurrentline;
orabsolutelinenumber(:line)oralinemark(.mark)
thelinesbetweenandincludingthecurrentandthespecifiedlinewillbeshifted.
Howshiftingishandledifnonspacecharacterswouldbelost(movedbeyondtheleftorright
fileborder)iscontrolledbythedefaultbehaviordefinedwiththeSHIFTCONFigcommand,
whichcanbeoverriddeniftheoptionalshiftmodeisspecifiedontheSHIFTcommand.See
MECAFFManual0.9.7(beta) Page33/65
theSHIFTCONFigcommand(in4.5.4.4)forthepossibleshiftbehaviorswhenshiftingbeyond
aborder.IfneitheraSHIFTCONFigcommandwasgivennortheshiftmodeparameterfor
SHIFTisspecified,theshiftmodeLIMitwillbeused.
SPLTJoin [ Force ]
Ifthecursorisplacedinafileline,thelineis
splittedatthecursorpositionifthecursorisplacedbeforetheendoftheline,withthe
newlinestartingwiththecharacterunderthecursor;thenewlinewillhavethesame
indentationastheoriginalline;
joinedwiththenextlineifthecursorisplacedafterthelastnonwhitespacecharacter
oftheline,thefirstnonspacecharacterofthenextlinebeingplacedunderthecursor
andthegapfromtheoldlineendtothispositionbeingfilledwithblanks.
Iftheresultinglinewouldbetruncated,thejoinwillnothappen,unlesstheparameter
Forceisgiven.
TABforward
Ifinvokedwhilethecursorisinthefilearea(usuallyviatheassignedPFkey),thecursoris
movedtothenextdefinedtabfollowingthecurrentcursorposition.Ifnotabpositionisdefined
ontherightofthecurrentposition,thecursorisnotmoved.
IftheTABforwardisinvokedwhilethecursorisinthecommandline,EEattemptstomove
thecursortothefilelineandcursorpositiononthatlinewherethecursorwaslastknowntobe
beforeitwasplacedonthecommandline.Ifthis“lastknownposition”isvisibleonthecurrent
screen,thecursorisplacedthere.Ifthescreenhasbeenscrolledawayfromthislastknown
positionorthisfilelinehasbeendeleted,thenthecursorisplacedinthefileareaonthefirst
columnofthecurrentline.
ThecommandTABforwardisassignedtoPF01perdefault.
TABBackward
Ifinvokedwhilethecursorisinthefilearea(usuallyviatheassignedPFkey),thecursoris
movedtothenextdefinedtabprecedingthecurrentcursorposition.Ifnotabpositionis
definedontheleftofthecurrentposition,thecursorismovedtothefirstcolumn(leftfile
border).
ThecommandTABBackwardisassignedtoPF13perdefault.
TOp
Movethecurrentlinebeforethefirstlineofthefile.
4.5.4.3 Filecontrolcommands
CASe U | M | R
Setthecasehandlingforthefile,withthefollowingoptions:
U:Uppercase
convertallinputtothefileinuppercase,stringsearches(commandsLocate,Change)
arecaseinsensitive.
M:Mixedcase
donotconvertcasefortextenteredtothefile,butdocaseinsensitivesearches.
MECAFFManual0.9.7(beta) Page34/65
R:Mixedcase,respectcaseforsearches
donotconvertcasefortextenteredtothefile,doingexact(casesensitive)searches.
EEdit fn [ ft [ fm ] ]
fn[.ft[.fm]]
StarteditinganotherfileinEE.Ifftorfmareomitted,thefiletyperesp.filemodeofthecurrent
fileareused.
Thespecifiedfileeditedbecomesthecurrentfileedited.Ifthefilespecifiedisalreadyloadedin
EE,thisfilebecomesthecurrentfilewithoutreloadingthefilecontentfromdisk.
EXIt
Saveallmodifiedfiles(seeSAVE)andterminateEE,returningcontroldirectlytoCMS,evenif
editingwasstartedfromFSLISTorFSVIEW.
FILe [ fn [ ft [ fm ] ] ]
[ fn[.ft[.fm]] ]
FFILe [ fn [ ft [ fm ] ] ]
[ fn[.ft[.fm]] ]
Savethefileandterminateeditingit(removingfromthering)ifthefilewassuccessfullysaved.
Ifnofilenameisgiven,thefileissavedwithfilenameoriginallyloadedresp.thelastfilename
previouslygiventoaSAVE/SSAVEcommand.
Ifafilenameisgivenandafilewiththisnameexists,usingFILEwillnotsavethefile,but
FFILEwillforceoverwritingthefilewiththeeditor’scontent.
Ifthecurrentfileisthelastfileedited,theEEsessionitselfisterminated,returningcontrolto
theenvironmentfromwheretheEEsessionwasstarted,i.e.returningtoFSLISTifeditingwas
startedfromaFSLIST(orFSVIEW)screenorelsetoCMS.
Writingthefileisdoneinthefollowingsteps:
WritethenewfilewiththefiletypeEE$TMP.
Ifpresent,renamethecurrentfiletothefiletypeEE$OLD.
RenamethenewfilefromthefiletypeEE$TMPtotheintendedfiletype.
DeletetheoldfilewiththefiletypeEE$OLD.
(shouldtheeditorcrash,therearechancestofindoneofthefilesmentionedtoretrieveatleast
oneofthefilestates)
FSLIST [ pattern ]
OpenaFSLISTviewtobrowseandviewfiles,allowingtoselectafileforeditinginEE(see4.6).
LRECL lrecl
Changethelogicalrecordlengthofthefiletolrecl,butlimitedto255,valueslowerthan1will
beignored.Ifthefilecurrentlyhasalargerrecordlength,thefilecontentmaybetruncated.
Quit
QQuit [ ALL ]
Ifprefixcommandsarepresentonthecurrentscreenorarecurrentlypendingfromaprevious
screen:canceltheseprefixcommands.Inthiscase[Q]QuitworksasthecommandRESet.
MECAFFManual0.9.7(beta) Page35/65
Inthenormalcasewithnoprefixcommandsonthescreenorpending:terminateeditingthe
currentfilewithoutwritingthefilecontentbacktodisk.Ifthefilewasmodified,Quitwillnot
beexecuted.Inthiscase,terminateeditingwithoutsavingthefilecanbeforcedwithQQuit.
Ifthecurrentfileisthelastfileedited,theEEsessionitselfisterminated,returningcontrolto
theenvironmentfromwheretheEEsessionwasstarted,i.e.returningtoFSLISTifeditingwas
startedfromaFSLIST(orFSVIEW)screenorelsetoCMS.
IftheparameterALLisgiventoQQuit,allfilescurrentlyeditedareclosedwithoutsavingand
controlreturnsdirectlytoCMS,evenifeditingwasstartedfromFSLISTorFSVIEW.
RECFM V | F
Changetherecordformattovariable(V)orfixed(F)linelength.
RINGNext
RN
Switchtothenextfileintheringascurrenteditedfile.Thiscommandhasnoeffectifonlyone
filecurrentlyloadedinEE.
RINGPrev
RP
Switchtothepreviousfileintheringascurrenteditedfile.Thiscommandhasnoeffectifonly
onefilecurrentlyloadedinEE.
SAVe [ fn [ ft [ fm ] ] ] ]
[ fn[.ft[.fm]] ]
SSAVe [ fn [ ft [ fm ] ] ] ]
[ fn[.ft[.fm]] ]
Savethecurrentfile(butdonotterminateeditingthisfile).Ifnofilenameisgiven,thefileis
savedwithfilenameoriginallyloadedresp.thelastfilenamepreviouslygiventoaSAVE/SSAVE
command.
Ifafilenameisgivenandafilewiththisnameexists,usingSAVEwillnotsavethefile,but
SSAVEwillforceoverwritingthefilewiththeeditor’scontent.
(seethecommandFileonhowthefilenewfilecontentiscreated)
UNBINARY
Whenloadingthefile,nonprintablecharacters(code0xFFandcodeslowerthan0x40=blank)
arereplacedbyadotcharacterandthefileissupposedtobeabinaryfile,preventingitfrom
beingsavedtoavoiddataloss.
Thiscommandresetstheinternalbinaryflag,allowingtooverwritethefile.
4.5.4.4 Configurationcommands
ATTR screen-object color [ HIlight ]
Definethetextrenderingattributesforthescreenelementtypesofthescreensetup.Besides
thecolor,passingHIlightallowstospecifythehighlighteddisplayonmonochromedisplays.
Theseattributesareusedforallfunctionalmodes(EE,FSLIST,FSVIEW)oftheprogram.
MECAFFManual0.9.7(beta) Page36/65
Thefollowingparameterscanbegivenasscreenobject:
FILethefilecontent(notbeingthecurrentline)
CURRlinethecurrentfileline
PREFixtheprefixzone
GAPFillthegapbetweenthefilepartandtheprefixresp.thescreenborder
CMDlinethecommandlineinputarea
CMDARRowthearrowbeforethecommandlinearea
MSGlinesthemessageslines(oneline,dynamicallyupto3lines)
INFOlinestheinfolinessetwithcommandINFOLines
HEADlinethetitleline(topline)onthescreen
FOOTlinethefooterline(bottomline)inthescreen
SCALElinethescaleline
Thefollowingcolorvaluescanbegiven:
BLUe,REd,PInk,GREen,TURquoise,YELlow,WHIte,
MOno(defaultcolorforcolordisplays)
CMDLine TOP | BOTtom
Definetheplacementofthecommandlineonthescreen.
CURRLine Top | MIddle
Definetheplacementofthecurrentlineofthefileonthescreen.
FTDEFaults ft recfm lrecl casemode
Definethedefaultrecordformatandthelogicalrecordlengthtousewhencreatinganewfile
withthegivenfiletype,alsodefiningthedefaultcasesettingwhenopeningafilewiththisfile
type.Thiscommandcanbeusedrepeatedly,acommandforanalreadydefinedfiletype
overwritestheprevioussettings.
Asthisinformationisneededwhenopeningafile,theFTDEFaultscommandsmustbegiven
intheprofilefilesfortheeditor.
Thefollowingvaluescanbegiven:
recfm:V|F
lrecl:1..255
casemode:U|M|R
FTTABDEFaults ft tabpos1 [ tabpos2 [] ]
Definethedefaulttabpositionsforthespecifiedfiletype.Thetabpositionsmustbeinteger
valuesintherange1..255.Upto16tabpositionscanbegiven.Itisnotnecessarytospecifya
tabpositionforcolumn1,asthelinestartisanimplicittabpositionforTABBackward.
Asthisinformationisusedwhenopeningafile,theFTTABDEFaultscommandsmustbe
givenintheprofilefilesfortheeditor.IfnoFTTABDEFaultsispresentforthefiletypeofa
filebeingopened,thennotabswillbedefinedforthatfile.
GAPFill NONE | DOT | DASH | CROSS
MECAFFManual0.9.7(beta) Page37/65
Definethecharactertofillthegapbetweeneachinputfieldforafilelineandtherightborder
(screenboundaryorprefixzoneplacedontheright).
INFOLines OFf | TOp | BOTtom
INFOLines CLEAR
INFOLines ADD infoline-text
Controlthepermanentlydisplayedinformationlines,usuallydescribingthePFkeysettings.OFF
willremovetheinfolinesfromscreen,TOPwilldisplaythelinesintheheadareaofthescreen,
BOTTOMwilldisplaythemonthefooterareaofthescreen.
EEcandisplayupto2infolineswithmax.80characters.DefininganewinfolinewithADD
appendsanewinfoline,droppingthecurrentfirstinfolineiftherealreadyare2lines.CLEAR
resetstheinfolines(althoughnotsettoOFF,noinfolinewillbedisplayed).
MSGLines TOp | BOTtom
Settheplacementofthemessagelines.TOPwilldisplaythemessagelinesintheheadareaof
thescreen,BOTTOMwilldisplayitonthefooterareaofthescreen.
EEdisplaysatleastone(possiblyempty)messageline,dynamicallygrowingupto3lines.
NUMbers ON | OFf
Controlhowtheprefixzoneisrendered.ONwilldisplaytheprefixcommandzonewiththeline
numberofthecorrespondingline,OFFwilldisplayallprefixcommandzonesfilledwith‘equal’
characters.
PF pfno command [ parameters ... ]
PF CLEAR pfno
SetorclearthecommandissuedbyaPFkey.Thepfnomustbeanumberfrom1to24,the
maximalcommandlengthis120characters.
PREFIX OFf | ON | LEft | RIght
Controlthedisplayandpositionoftheprefixzone.ONorLEFTwillplacetheprefixcommand
zoneontheleftsideofthescreen,RIGHTwillplaceitontherightofthescreen.OFFwill
removetheprefixzonefromthescreen.
SCALE OFf | TOp | ABOve | BELow
Controlthedisplayandpositionofthecolumnscaleonthescreen.Besidesgivinganorientation
onthecolumnpositionoftheeditedtext,thescalealsoindicatesthetabpositionscurrently
definedforthefilewitha|(pipecharacter).
TOPwilldisplayitbeforethefirstdisplayedfileline,ABOVEwillplacethescaleontheline
beforethecurrentline,BELOWonthelinefollowingthecurrentline.OFFwillhidethescale.
SHIFTCONFig CHEckall | MINimal | LIMit | TRUNCate [shiftBy]
DefinethedefaultbehaviorfortheSHIFTcommandortheshiftprefixcommands(<,>,<<..<<,
>>..>>)whentheshiftedtextsreachesalineborder,i.e.ifnonspacecontentwouldbelostby
shiftingthetexttotheleftbeyondthefirstcolumnortotherightbeyondthelastcolumn(at
LRECL).
Theshiftcommandssupportthefollowingoptionswhenthissituationoccurs:
MECAFFManual0.9.7(beta) Page38/65
CHEckall
iftextlosswouldhappenforanyofthelinestobeshifted,thetextwillnotbeshifted
andtheshiftingcommandisaborted.
MINimal
theshiftbycountappliedtoalllineswillbereducedifnecessarytoavoidtextlossfor
anyoftheshiftedlines.Thisensuresthattherelativeindentationamongthelinestobe
shiftedwillbepreserved.
ThisisthedefaultifnoSHIFTCONFigcommandisgiven.
LIMit
eachlinewillbeshiftedatmostuntiltheborderisreached,limitingshiftingforeachline
separately.
TRUNCate
thelinesareshiftedbytheshiftbycountspecified,withtextshiftedbeyondthe
correspondingborderbeingtruncated.
Theoptionalsecondparameterspecifiesthedefaultshiftcharactercountfortheshift
subcommandandprefixcommands.Thisvaluemustbeintherange1..9.
IfnotpredefinedwithaSHIFTCONFigcommand,thedefaultshiftmodeMINimalandthe
defaultshiftcount2willbeused.
Theconfiguredshiftdefaultscanbeoverriddenforeachshift(prefix)commandby
specifyingtheshiftcountandshiftmodeoptions.
TABSet [ tabpos1 [ tabpos2 [] ] ]
Definethetabpositionsforthecurrentfile.Thetabpositionmustbeintegervaluesintherange
1.255.Upto16tabpositionscanbegiven.Ifnotabpositionsaregiven,allcurrentlydefinedtab
positionswillberemoved.Itisnotnecessarytospecifyatabpositionforcolumn1,astheline
startisanimplicittabpositionforTABBackward.
4.5.4.5 Miscellaneouscommands
CMS [ cmscommand ... ]
EnterCMSSubsetorexecuteaCMScommand.
Ifinvokedwithoutacommand,EEtemporarilyleavesthefullscreenmodeandtheCMSSubset
levelisenteredontheMECAFFconsole.ThisallowsenteringCMSsubsetcompatiblecommands
untiltheCMSSubsetcommandRETURNisentered,whichwillleavetheCMSsubsetandrestore
fullscreenEEeditingmode.
Ifacommandisgiven,EEattemptstoexecuteit.Asaninvokedprogrammayoverwritethe
memoryusedbyEE,thefirsttokenofcmscommandischeckedandcommandnamesnotona
listofexplicitlyallowedcommandswillnotbeexecuted.
AllowedCMSorCPcommandsare:ACCess,CLOSE,DETACH,ERASE,LINK,Listfile,
PRint,PUnch,Query,READcard,RELease,Rename,SET,STATEw,TAPE,Type.
However,ifanEXECwiththenameofanallowedcommandispresent,thisEXECwillbe
executed,possiblyexecutingprogramsthatoverwriteEE’sdatastructuresundpreventingthe
propercontinuationofEE,leadingtothelossofallfilechangesnotsaved!
MECAFFManual0.9.7(beta) Page39/65
CLRCMD
Clearthecommandline.ThiscommandisintendedforaPFKeysetting(assignedtoPF11as
default).
Help
ShowthetoplevelhelpforEE.
RECALL
Placethepreviouscommandinthecommandhistory.EEhasahistoryofthelast32commands
issuedonthecommandline.ThiscommandisintendedforaPFKeysetting(assignedtoPF12as
default).
4.5.5 CustomizingwithSYSPROFEEandPROFILEEE
TheEEprogramreads2configurationfilesonstartupbeforethefiletobeeditedisread.
Iffoundinoneoftheaccesseddisks,theSYSPROF EEisprocessedfirst,thenPROFILE EE.For
eachofthesefiles,thefirstfilefoundinthesearchorderoftheminidisksisused.
However,thefileSYSPROF EEisintendedtobeonasystemdisk,providingthesystemwide
defaults(astheFTDEFAULTSandFTTABDEFAULTSforthefiletypes).ThefilePROFILE EEis
intendedtoprovidetheuserpreferences.
Onlyconfigurationcommands(see4.5.4.4)canbeusedinthesefiles,asnofileisopenedwhenthey
areprocessed(commandsrequiringafileareignored).Thecommandsintheprofilesareexecutedas
iftheyweregiveninthecommandarea,withthefollowingextensions:
Astar(*)asfirstnonwhitespacecharacterintroducesacommentline,thewholelineis
ignored.
Ifalineendswithabackslashaslastnonwhitespacecharacter,thenextlinewillbe
concatenatedtothelineatthepositionofthebackslash(howeverleadingwhitespaceofthe
nextlineisremoved).Severallinesintheprofilecanbeconcatenateduptoatotallengthof
512characters.
4.5.6 Rescuemode
WhentheterminalisdisconnectedwhileeditingfileswithEE,reconnectingtotheVMwitha
standardterminalconnection(notusingMECAFF)willpreventEEfromreestablishingafullscreen
sessiontocontinueediting.
Inthiscase,EEwillenteracommandlineloopcalled“rescuemode”afterleavingCP(withcommand
BEGIN)andconfirmingtheabsenceofMECAFFbypressingENTER,forexample:
MECAFFManual0.9.7(beta) Page40/65
LOG CMSUSER
ENTER PASSWORD:
RECONNECTED AT 19:28:18 GMT FRIDAY 08/19/11
BEGIN
<{>}T Please press ENTER to cancel fullscreen operation
** Unable to re-establish a fullscreen session after disconnect
** Error message:
No fullscreen support present (MECAFF::__qtrm() -> rc = 1)
EE Rescue command loop entered
Enter EE Rescue command
qquit all
All files closed, leaving EE Rescue command loop
Ready; T=0.49/0.73 19:33:41
VM READ
TherescuemodesupportsthefollowingEEcommands:EXIt,FFILe,FILe,QQuit,Quit,
RINGNext,RINGPrev.
Additionally,therescuemodecommandRINGList(orRL)listsallfilescurrentlyinthering.
4.6 FSLISTFullscreenfilelist
AfullscreenfilelistcanbedisplayedfromCMSwith
FSLIST file-pattern
or
EE file-pattern ( FSLIST
wherefilepatternisanyfilespecificationallowedfortheCMScommandLISTFILE(whichisinfact
calledtogetthefilelist).ThefilepatterncanbegivenwiththestandardCMSconvention
(componentsseparatedwithwhitespace)orthedotnotation(see0).TheEEeditorprovidesaFSLIST
subcommandwiththesamefunctionality.
BrowsingthroughthefilelistandleavingFSLISTiscontrolledwiththePFkeys(summarizedonthe
screenbottomline):
PF02:EE
Ifthecursorisplacedonalineinthefilelist:openthisfilewithEEforediting.
PF03:Quit
TerminateFSLIST.
PF04:searchnext
Repeatthelastsearchinthesearchdirectionlastused.
PF05:Top;PF06:Fullpageup;PF07:⅔pageup
Scrollthroughthelistindirectionofthelistbegin.
PF08:⅔pagedown;PF09:Fullpagedown;PF10:Bottom
Scrollthroughthelistindirectionofthelistend.
PF12:FSVIEW
Ifthecursorisplacedonalineinthefilelist:openthisfilewithFSVIEWforbrowsing.
PF15:Quit
TerminateFSLIST.
MECAFFManual0.9.7(beta) Page41/65
PF16:reverseandsearchnext
Reversethesearchdirectionandrepeatthelastsearchinthenewsearchdirection.
ThefollowingcommandsareacceptedonthecommandpromptofFSLIST:
Listfile file-pattern
Changethesearchpatternforthefilelist.Ifasortcommandwasgivenbefore,thefilelistwill
sortedasspecifiedpreviously.
Sort column-spec [ [ column-spec ] ... ]
Sort OFf
SortthefilelistbythespecifiedcolumnsofthelistorswitchoffsortingifOFFisgiven.A
columnspecconsistsofoneoftheaftermentionedkeywords,optionallyprecededbythesort
ordercharacter,with-fordescendingorderand+forascendingorder(andascendingorder
beingthedefault),forexample:sort -ts +type
Thefollowingsingleandcombinedcolumnsofthefilelistcanbeusedtosortthelist:
NAmefilename
TYpefiletype
MOdefilemode
RECFmrecordformat
LRecllogicalrecordlength
Formatrecordformatandrecordlength
RECSrecordcount
BLocksblockcount
DAtefilewritedate
TImefilewritetime
TSfilewritetimestamp(dateandtime)
LAbeldisklabel
/text/
Searchforwardfortextinthecurrenthelppage
-/text/
Searchbackwardfortextinthecurrenthelppage
/
Repeatthelastsearchinthesearchdirectionlastused(alsoPF04)
-/
Reversethesearchdirectionandrepeatthelastsearchinthenewsearchdirection(alsoPF16)
Quit
LeaveFSLIST(alsoPF03)
Help
ShowthehelpforFSLIST.
MECAFFManual0.9.7(beta) Page42/65
Browsingoreditingthecontentofafileinthelistcanbestartedbymovingthecursortotheline
withthefilenameand
pressingPF02toeditthefilewithEE,
pressingPF12toviewthefilecontentwithFSVIEW.
ThefollowingdiagramshowsthetransitionsbetweenthemodesavailablefromFSLIST,alsoshowing
withthecommands(CMD)orPFkeys(PFxx)tochangefrommodetomode:
CMS
PF3
[Q]QUIT
[F]FILE
PF2
FSLIST
FSLISTFSVIEW
EE
FSLISTFSVIEW
PF12
PF3
PF2
PF2
PF12
PF3
FSLIST
PF3
QQUITALL
EXIT
FSLIST
PF2
PF3
4.7 FSVIEWFullscreenfilebrowser
ACMScanbebrowsedfromCMSwithFSVIEWwith
FSVIEW fn fm [ ft ]
fn.ft[.fm]
or
EE fn fm [ ft ] ( FSVIEW
fn.ft[.fm] ( FSVIEW
IfafileloadedintoFSVIEWcontainsbinarycharacters(codes0x00to0x3For0xFF),thesecharacters
arereplacedwithadot(‘.’)inthefilebuffer.
BrowsingthroughthefilecontentandleavingFSVIEWiscontrolledwiththePFkeys(summarizedon
thescreenbottomline):
PF02:EE
OpenthefiledisplayedinFSVIEWwithEEforediting(FSVIEWisfactreplacedwithEE,so
leavingEEwillnotreturntoFSVIEW).
PF03:Quit
TerminateFSVIEW.
PF04:searchnext
Repeatthelastsearchinthesearchdirectionlastused.
PF05:Top;PF06:Fullpageup;PF07:⅔pageup
Scrollthroughthefileindirectionofthefilebegin.
MECAFFManual0.9.7(beta) Page43/65
PF08:⅔pagedown;PF09:Fullpagedown;PF10:Bottom
Scrollthroughthefileindirectionofthefileend.
PF11:Scrollleft
Shiftthevisiblehorizontalportionofthefiletotheleft,i.e.movethefirstdisplayedcolumn
ofthefileby20positionstotheleft,uptothefirstcolumnofthefile.
PF12:Scrollright
Shiftthevisiblehorizontalportionofthefiletotheright,i.e.movethefirstdisplayedcolumn
ofthefileby20positionstotheright,uptothelastcolumnofthefilebeingdisplayedatthe
borderofthescreen.
PF15:Quit
TerminateFSVIEW.
PF16:reverseandsearchnext
Reversethesearchdirectionandrepeatthelastsearchinthenewsearchdirection.
Additionally,textcanbesearchedinthefileusingthesubcommands/text/(searchforward)and
-/text/(searchbackward).AsforFSLIST,thelastsearchcanberepeatedinthelastdirectionwith
thesubcommand/(withoutpattern,alsoPF04)orwithreversedsearchdirectionwithsubcommand
-/(withoutpattern,alsoPF16).
ThesubcommandHelpshowsthehelptopicforFSVIEW.
ThefollowingdiagramshowsthetransitionsbetweenthemodesavailablefromFSVIEW,also
showingwiththecommands(CMD)orPFkeys(PFxx)tochangefrommodetomode:
CMS
PF3
[Q]QUIT[ALL]
[F]FILE
FSVIEW
E
E
FSVIE
W
FSLIST
PF12
PF3
FSLIST
PF2
FSVIE
W
PF2
PF3
PF2
PF3
4.8 FSHELPFullscreenhelp
ThefullscreendisplayofastandardHELPtopicisinvokedfromCMSwith
FSHELP topic
Thislooksforafiletopic HELPxxxondiskU(withxxxoneofCMD,DBG,EE,EDT,EXCorREX)
anddisplaysit.Iftheadditionalhelpfileexists(topic HELPxxx2 U),itisappendedtothe
displayedcontent.
FSHELPallowstonavigatetootherhelptopicseitherwiththesubcommandHelp topicorby
placingthecursorinawordofthedisplayedhelptextandpressingthePF01key.Thetopicsopened
MECAFFManual0.9.7(beta) Page44/65
arestackedinalastinfirstoutmanner:closingthecurrenttopicwithPF03displaysthepreviousone
andsoonuntilclosingthefirst(initial)topicterminatesFSHELP,returningtotheCMSprompt.
Wheninvokedwithoutatopic,FSHELPlooksforafileMENU FSHELPonallaccesseddisksand
displaysthisfileastoplevelmenu.Ifthisfileisnotfound,thehelpmenuisbuildbasedonthehelp
filesondiskU(withfiletypeHELPxxx,seeabove),groupingthetopicsbythecommandtypesCMS,
CP,EE,EDIT,DEBUG,EXEC.ThishelpfileisautomaticallysavedinthefileMENU FSHELP A2.If
necessary(forexampletoincludenewhelptopicsaddedtodiskU),thismenuhelpfilecanbe
regeneratedondiskAbyinvokingFSHELPwithonlytheoptionREBUILD:
FSHELP ( REBUILD
Browsingthroughthehelpinformation,navigatingtoothertopicsandleavingFSHELPiscontrolled
withthePFkeys(summarizedthescreenbottomline):
PF01:Goto
Navigatetothetopicidentifiedbythewordwherethecursorisinthehelptext.Ifnosuch
topicexists,anerrormessageisdisplayedandthecursorstaysatthecurrentplaceinthe
helptext.
PF03:Back
Closethecurrenttopicanddisplayitspredecessorinthehelptopicstack.Iftheinitialtopicis
currentlydisplayed,FSHELPisterminated.
PF04:searchnext
Repeatthelastsearchinthesearchdirectionlastused.
PF05:Top;PF06:Fullpageup;PF07:⅔pageup
Browsethroughthecurrenttopicindirectionofthehelptextbegin.
PF08:⅔pagedown;PF09:Fullpagedown;PF10:Bottom
Browsethroughthecurrenttopicindirectionofthehelptextend.
PF15:Quit
TerminateFSHELP.
PF16:reverseandsearchnext
Reversethesearchdirectionandrepeatthelastsearchinthenewsearchdirection.
ThefollowingcommandsaresupportedonthesubcommandprogrampromptofFSHELP:
Help topic
Navigatetothespecifiedhelptopic,pushingthecurrenttopicontothestack.
/text/
Searchforwardfortextinthecurrenthelppage
-/text/
Searchbackwardfortextinthecurrenthelppage
/
Repeatthelastsearchinthesearchdirectionlastused
-/
Reversethesearchdirectionandrepeatthelastsearchinthenewsearchdirection
MECAFFManual0.9.7(beta) Page45/65
Back
Closethecurrenttopicanddisplayitspredecessorinthehelptopicstack.Iftheinitialtopicis
currentlydisplayed,FSHELPisterminated.
Quit
TerminateFSHELP
MECAFFManual0.9.7(beta) Page46/65
5 MECAFFAPI
TheMECAFFAPIconsistsasetofCroutinesdefinedinthefileFSIO HandimplementedbytheC
moduleFSIO Candacompanionassemblefile(WR3270 ASSEMBLE).
Thefollowingroutinesarebasicallyprovidedtofullscreenapplications:
1. Queryterminalinformation
2. Fullscreenwrite
3. Fullscreenread
FurtherroutinesallowmanagingtheMECAFFconsoleandtheownershipofthescreenafterentering
fullscreenmode.
AnapplicationusingtheMECAFFAPIshouldfirstquerytheterminalcharacteristicstoverifythat
fullscreenoperationsarepossibleandtosetupinternaldata.
However,thisisnotastrictrequirement,asthefullscreenoperationswillchecktheMECAFF
connectionifthestepwasskipped.Butinthiscase,theapplicationshouldsticktominimal3270
defaults(monochrome80x24screen)andnotusetheEWA3270CCWcommand,asthepresence
andsizeofthealternatescreenisunknown.
IftheVMisnotconnectedtoMECAFF,theinternalcommunicationoftheMECAFFAPItoquerythe
terminalcharacteristicswillsimplybewrittenoutontheterminal.Thiscommandsequenceto
MECAFFcontainsaplaininstructiontextthatshouldbefollowedbysimplypressingRETURN:
<{>}T Please press ENTER to cancel fullscreen operation
DoingsoallowstheMECAFFAPItoreturntheappropriatereturncodetotheapplication,which
shouldhandlethissituationgracefully.
5.1 Queryterminalinformation
ThecharacteristicsoftheterminalconnectedtotheVMviaMECAFFcanbequeriedwiththe
followingfunction:
int __qtrm(
char *termName,
int termNameLength,
int *numAltRows,
int *numAltCols,
bool *canAltScreenSize,
bool *canExtHighLight,
bool *canColors,
int *sessionId,
int *sessionMode);
ThereturncodespecifiesiftheVMisconnectedtotheterminalviaaMECAFFprocessandifthe
otherMECAFFAPIroutinesmaybeused:
Thereturnedvalue0meansthatthequerywassuccessfulandthatfullscreenoperationscan
beperformedthroughtheMECAFFAPI.
MECAFFManual0.9.7(beta) Page47/65
Anyvaluedifferentfrom0meansthatnovalidresponsecameinforthequery(noMECAFF
processorsomeotherinternalprotocolerror).
TheMECAFFAPIshouldnotbeusedforfullscreenoperations.
TheinputparametertermNameLengthhastocontainthetotallengthofthebufferpassedas
termName.Allotherparametersareoutputparametersandfilledby__qtrmifthereturncodeis0
(ifthecallissuccessful).Thevalueswrittentotheoutputparametershavethefollowingmeaning:
termName
theterminaltypename,thebufferwillbenullterminatedandcontainupto
termNameLength-1characters.
numAltRows
numberoflinesofthealternatescreensize,ifcanAltScreenSizeistrue.
numAltCols
numberofcolumnsofthealternatescreensize,ifcanAltScreenSizeistrue.
canAltScreenSize
Iftrue,theterminalsupportsanalternativescreensize,meaningthattheEWAcommandcan
beusedinthe3270outputstreamtoswitchtothealternativescreen.
canExtHighLight
Iftrue,theterminalsupportsextendedhighlighting(likereverse,underline,…)throughSFE
(StartFieldExtended)orSA(SetAttribute)orders.
canColors
Iftrue,acolorterminalisconnected.
sessionId
thisistheMECAFFinternalidentifierfortheconnection,thisvaluecan(andshould)be
ignoredbyclientapplications
sessionMode
theconnectionstyle,withthevalues3270forGRAFstyleand3215forCONSstyle.
5.2 Fullscreenwrite
A3270outboundstreamissenttotheterminalwiththe__fswrfunction:
int __fswr(
char *rawdata,
int rawdatalength);
The3270outboundstreamispassedinrawData,withthelengthofthestreampassedin
rawDataLength.ThefirstbyteofrawDatamustbeoneofthefollowing3270CCWcommands:
W (0xF1,Write),
EW (0xF5,EraseWrite)
EWA (0x7E,EraseWriteAlternate)
EUA (0x6F,EraseAllUnprotected)
Thereturncodespecifiestheoutcomeoftheoperationandtheoptionsforfurtherprocessinginthe
clientprogram:
Returncode=0
the3270outboundstreamwassuccessfullysenttotheconnected3270terminal.The
MECAFFManual0.9.7(beta) Page48/65
keyboardoftheterminalislockedandtheapplicationnowownstheterminaluntilthe3270
inboundstreamisrequested.
Returncode=1
thestreamcouldnotbetransmittedtotheterminal:theterminaliscurrentlyownedbythe
MECAFFconsole,butthe3270commandpassedinthe3270outputstreamwasWorEUA,
expectingtheterminalstilltobeinfullscreenmode(butthescreencontentofthelast
fullscreenoperationwaslostwhentheMECAFFconsoletookcontrol).
Inthiscase,anEWorEWAcommandmustbeusedtoregaintheownershipoverthe
terminalandtorewritethewholescreencontent.
Returncode=2
Fullscreensupportisunavailable(notconnectedtoaMECAFFprocessorsomeotherinternal
protocolerror).
Returncode=3
possiblyrecoverablecommunicationproblem:requerytheterminalinformationandretry
withaEWresp.EWAfullscreenwrite.
Returncode=4
unsupported3270outboundstreamcommand(3270CCWcommandsWSF,RB,RM,RMA
areunsupportedbytheMECAFFprocess)
5.3 Fullscreenread
Afterasuccessfulscreenwriteoperation,theapplicationownstheterminaluntilareadoperation
completesortheownershipisexplicitlyreleasedbytheapplication.
MECAFFprovidesseveraloptionstofullscreenapplicationsforretrievinginputfromthe3270
terminal:
Synchronousread:theprogramrequeststhereadandwaitsindefinitelyuntiltheterminal
transmitstheusersinput.Thisisthestandardreadoperationwhichwillprobablyusedby
mostfullscreenapplications.
Theuserinputfromtheterminalistransmittedtotheapplicationas3270inboundstream.
TheMECAFFconsoleregainstheterminalownershipafterthistransmissioniscomplete.
Asynchronousread:theprogramrequestingthefullscreenreadisdecoupledfromtheusers
effectiveresponse,eitherby
o simplyqueryingtheavailabilityofuserinput,butnotwaitingfortheusertofinish
(andsend)theinput,allowingtheCMSprogramtocontinueworkingwhilethe
MECAFFprocesshandlesthefullscreenread(andtoretrievetheinputatalatertime
bydoinganotherfullscreenread,possiblyagainasasynchronousread)
o orbyspecifyingatimeoutfortheread,waitingfortheinputandregainingcontrol
‐tocontinuecomputingiftheuserdidnotsendtheinputbeforethetimeout
‐resp.toreceivetheusersinputifwassentbeforethetimeout.
Ifuserinputisavailableanditistransmittedtothefullscreenprogram,theMECAFFconsole
regainstheterminalownershipimmediatelyafterthetransmission.
Ifinputisnotavailable(timedoutread)orisnottransmitted(queryonlyread),theterminal
ownershipwillstaywiththeapplicationforagraceperiod,allowingtheprogramtokeepthe
terminalinfullscreenmodewhiledoingbackgroundcomputations.Afterthegraceperiod,
theMECAFFconsolemayregaintheownershipifnecessary,allowingtodisplayserialoutput
MECAFFManual0.9.7(beta) Page49/65
fromtheVMthatarrivedwhiletheterminalwasinfullscreenmodeorarrivesafterthegrace
periodiftheprogramdidnotreacquireownershipbystartinganewfullscreencycle.
Thedefaultgraceperiodis3secondsandcanbechangedwiththeMECAFFAPIforsubsequent
asynchronousreads.Additionally,thefullscreenprogramcanexplicitlyreleasetheownershiponthe
terminalandgiveitbacktotheMECAFFconsole.
5.3.1 Standard(synchronous)Read
Astandardsynchronousfullscreenreadisinitiatedwithacalltothefunction__fsrd.
MECAFFunlockstheterminalskeyboardandwaitsfortheusertopressoneofthekeystriggeringthe
transmission(ENTER,PFKeys,PAKeys,…).Theraw3270datastreamsentbytheterminalispassed
backtotheapplicationby__fsrd.
int __fsrd(
char *outbuffer,
int outbufferlength,
int *transferCount);
Ifthereadoperationissuccessful,the3270inboundstreamfromtheterminaliscopiedto
outbufferwithuptooutbufferlengthbytes.Thenumberofbytestransmittedispassed
backintransferCount.
Thereturncodevalueshavethefollowingmeaning:
Returncode=0
thefullscreenreadoperationwassuccessful.
Returncode=1
theterminalisnotownedbytheapplication(therewasnoprecedingsuccessfulfullscreen
writeoperationortheterminalwasforcedoutoffullscreenmode,i.e.theMECAFFconsole
regainedcontrolduetosomeotheroutputoperation).
Inthiscase,firstregainscreenownershipbydoingafullscreenwrite(usinganEWorEWA
CCWcommand).
Returncode=2
Fullscreensupportisunavailable(notconnectedtoaMECAFFprocessorsomeotherinternal
protocolerror).
Returncode=3
Possiblyrecoverablecommunicationproblem:requerytheterminalinformationandretry
withaEWresp.EWAfullscreenwrite.
Otherreturncodes
protocolerror,abortprogram
5.3.2 Extended(generalized)Read
Thefunction__fsrdp()providesamoregeneralfullscreenreadoperationthan__fsrd(),
allowingqueryingorpollingfortheavailabilityofuserinputorwaitingforuserinputwithorwithout
timeout.
Comparedtothestandardreadfunction,__fsrdp()hasoneadditionalparameterspecifyingthe
fullscreenreadmoderesp.timeoutinterval.Whencalling__fsrdp(),MECAFFunlocksthe
terminalskeyboardandprocessestherequestasspecifiedbytheparameterfsTimeout.
MECAFFManual0.9.7(beta) Page50/65
int __fsrdp(
char *outbuffer,
int outbufferlength,
int *transferCount,
int fsTimeout);
Ifthespecifiedreadoperationrequeststhetransmissionoftheuserinputandtheinputisavailable
atcompletionofthecall,the3270inboundstreamfromtheterminaliscopiedtooutbufferwith
uptooutbufferlengthbytes.Thenumberofbytestransmittedispassedbackin
transferCount.
TheparameterfsTimeoutcontrolsthebehaviorofthefullscreenreadoperation.Thefollowing
valuescanbepassedinfsTimeoutforthespecifiedbehavior,resultinginthespecifiedreturn
codestoidentifypossibleoutcomesoftherequest(withthespecifiedconstantsdefinedinFSIO H):
FSRDP_FSIN_NOTIMEOUT
Standardsynchronousfullscreenread,__fsrdp()behaveslike__fsrd()(see5.3.1)
FSRDP_FSIN_QUERYONLY(oranynegativevalue)
Queryifinputiscurrentlyavailable,returningthestatusinthereturncodeof__fsrdp():
FSRDP_RC_NO_INPUT:noinputcurrentlyavailable
FSRDP_RC_INPUT_AVAILABLE:a3270inputstreamisavailableandcanberetrieved
withanadditionalcallto__fsrd()or__fsrdp().
FSRDP_FSIN_QUERYDATA(or0)
Pollforinput,queryingifinputiscurrentlyavailableandifso,transferittooutbuffer.The
followingreturncodesidentifythequeryresult:
FSRDP_RC_NO_INPUT:noinputcurrentlyavailable
0:a3270inputstreamisavailableandispresentinoutbuffer.
anyvalue>0
Synchronousfullscreenreadwithtimeout.
TheparameterfsTimeoutspecifiesthemaximumtimeintervalin1/10secondstowaitfor
anuserinputtoarrivefromtheterminal.Ifinputisavailablebeforethetimeout,the3270
inboundstreamiscopiedtooutbuffer.Thefollowingreturncodesidentifytheoutcome
ofthecall:
FSRDP_RC_TIMEDOUT:fullscreeninputrequesttimedout,noinputisavailable
0:a3270inputstreamarrivedbeforethetimeoutandispresentinoutbuffer.
Furthermore,thefollowingreturncodesidentifytechnicalproblemconditionsindependentlyofthe
requestedbehaviorfor__fsrdp():
Returncode=1
theterminalisnotownedbytheapplication(thewasnoprecedingsuccessfulfullscreen
writeoperationortheterminalwasforcedoutoffullscreenmode,i.e.theMECAFFconsole
regainedcontrolduetosomeotheroutputoperation).
Inthiscase,firstregainscreenownershipbydoingafullscreenwrite(usinganEWorEWA
CCWcommand).
Returncode=2
Fullscreensupportisunavailable(notconnectedtoaMECAFFprocessorsomeotherinternal
protocolerror).
MECAFFManual0.9.7(beta) Page51/65
Returncode=3
Possiblyrecoverablecommunicationproblem:requerytheterminalinformationandretry
withaEWresp.EWAfullscreenwrite.
Otherreturncodes
protocolerror,abortprogram
5.3.3 Graceperiodsetting
Thegraceperiodforsubsequentcallsto__rsrdp()canbesetwiththeroutine__fsgp().
void __fsgp(unsigned int gracePeriod);
Thegraceperiodisspecifiedin1/10seconds.ThevaluespassedwillbeboundedbyMECAFFtothe
graceperiodrangesupported,currently1/10to10seconds(i.e.values1to100forgracePeriod).
5.3.4 Releasefullscreenterminalownership/cancelfullscreenmode
Aprogramcanexplicitlyterminatethefullscreenoperationbyreleasingtheownershiponthe
terminal(withouthavingtowaitfortheexpirationofatimeoutorthegraceperiod).
Callingtheroutine__fscncl()allowsMECAFFtoreturnimmediatelytoconsoleinteractionwith
theuser.IncomingconsoleoutputfromVM(alreadyarrivedwhileinfullscreenmodeorcomingin
afterthecallto__fscncl(),forexamplethereadymessagefromCMS)willclearthescreenand
lettheMECAFFconsoletakeovercontrol.
void __fscncl();
5.4 QueryingtheversionofMECAFF
AprogramcanretrievetheversioninformationoftheconnectedMECAFFprocessandtheAPIwith
thefollowingroutine:
bool __fsqvrs(
int *mecaffMajor, int *mecaffMinor, int *mecaffSub,
int *apiMajor, int *apiMinor, int *apiSub);
ThevaluesmecaffMajor,mecaffMinorandmecaffSubindicatetheversionoftheexternal
MECAFF(Java)process,thevaluesapiMajor,apiMinorandapiSubindicatetheversionofthe
CMSsideAPIimplementation(i.e.FSIO).
ThereturnvalueindicatesiftheterminalisconnectedthroughaMECAFFprocess(true)andthe
versiondatafortheMECAFFprocessaremeaningfulornot(false).
5.5 MiscellaneousOperations
TheMECAFFAPIdefinessomeadditionalinternaloperationsintendedforthetoolsFSQRYand
FSCTL,whicharementionedhereonlyforcompleteness:
__qtrm2(…) :queryconsoleinformationandconsolevisualsettings
__qtrmpf(…):queryconsolePFsetting
__strmat(…):setconsolevisualattributes
__strmpf(…):setconsolePFkeycommand
5.6 APIfilesandlinking
TheMECAFFAPIconsistsofthefollowingCMSfiles:
MECAFFManual0.9.7(beta) Page52/65
BOOL H
Includefilewiththedefinitionofthetypebool
FSIO H
IncludefilefortheMECAFFAPIcalls.
FSIO TEXT
ImplementationoftheMECAFFAPIfunctions.
WR3270 TEXT
AssembleradaptertocallDISPWfromC.
CMSMIN TEXT
MinimalsubsetoftheGCCLIBruntimerequiredbyFSIO,containingtheimplementationofthe
functionsCMSconsoleWrite(),CMSconsoleRead() andCMScommand().
TheFSIO TEXTiscompiledbyGCCwiththeCMSoption.Thereare2optionswhenlinkinga
MECAFFbasedapplication:
CompiletheCmoduleswiththeGCCoptionLIB GCCLIB(ortheCMSshortcutoption)and
linkingtheapplicationagainsttheGCCLIBruntimeTXTLIB.
CompiletheCmodulesforthestandardlibrary(passingnoLIBoptionoroneoftheoptions
LIB PDPCLIBresp.OS)andaddingthemoduleCMSMINfromtheMECAFFdistributionto
theLOADorINCLUDEcommandswhenlinkingagainstthePDPCLIB.
TheMECAFFtoolsarebuiltusingthefirstalternative(boththedynamicandstaticlinkedversions).
5.7 DemonstrationprogramfortheMECAFFAPI
TheprogramFSRDTESTprovidedwithitsCsourcedemonstratestheuseofthefullscreenwrite
with__fswr()andfullscreenreadswith__fsrdp(),aswellasreleasingtheterminalownership
with__fscncl().
ThedifferentmodesforwritingandreadinginfullscreenmodeareselectedwithPFkeys,asshortly
explainedonthemainscreenoftheprogram:
RTrips: 8
Mode : synchronous
CcwMode : EraseWrite
Writing : Write screen even when no input
PF01 : toggle CCW ( W / EW )
PF02 : toggle writing if no input read
PF05 : read time-out 2 secs
PF06 : read time-out 0.5 secs
PF07 : FSIN_QUERYONLY, immediate read
PF08 : FSIN_QUERYONLY, delayed read
PF09 : FSIN_QUERYONLY, long, imm. read
PF10 : FSIN_QUERYDATA
PF12 : FSIN_NOTIMEOUT (synchronous)
PF03 : terminate program with message with MECAFF waiting
PF15 : terminate program with message, waiting on CMS side
CLEAR: terminate program without final message screen
Eachfullscreenroundtrip(synchronousorasynchronousread)willincreasetheRTripscounter.
MECAFFManual0.9.7(beta) Page53/65
MostPFkeysswitchbetweenspecificusagemodesoftheMECAFFAPIcalls,thecurrentsettingsare
displayedinthelinesMode,CcwModeandWriting:
PF01togglesbetweenusingtheCCWcommandsWriteorEraseWritewhenoverwritingthe
screencontent.
PF02togglesbetweenoverwritingthescreenoneachroundtriporonlyifinputwas
effectivelyavailable(relevantwhenanasynchronous__fsrdp()modeisused,theeffect
willbevisibleontheRTripcounterwhichwillnotchangealthoughfullscreenreadsoccur)
PF05andPF06useatimeoutread,allowingtheCMSprogramtoreceivecontrolonuser
inputorafteradefinedtimedelay.
PF07,PF08andPF09usethequeryonly(polling)modeof__fsrdp()anddifferonwhen
theinputstreamisretrievedifthequerytolditisavailable(immediately,aftershortorlong
computationtime).Indifferencetothetimeoutvariantsabove,theprogramcontinuously
consumesCPUwhileinoneofthesemodes.
PF10usesthequeryforuserinputmodeandresemblestoPF07exceptthatnoadditional
readoperation(roundtrip)isnecessarytoretrievetheinput.
PF12switchesbacktotheinitialsynchronousread,withtheprogramwaitinguntiltheuser
sendstheinput.
Leavingtheprogramhaswith3options:
PF03writesafinalmessageinfullscreenmodeanddoesa(2seconds)timeoutread,
allowingtheusertoclosetheprogrampremarurelybypressinganytransmissionkey.
PF15writethesamefinalmessageinfullscreenmode,butdoesnofullscreenread;instead
theprogramwaits4secondsbeforetakingofthedownthescreen.Theusercannotendthe
programbeforethistimeiselapsed.
CLEARterminatestheprogramimmediately.
MECAFFManual0.9.7(beta) Page54/65
6 Knownrestrictions/problems
6.1 General
WhenusingMECAFFfullscreenprograms(includingFSQRYandFSCTL)whilerecordinga
consoleprotocolwithCPSPOOLCONSOLE,theprotocolwillcontaintheencoded
communicationbetweenthefullscreenprogramsandtheexternalMECAFFprocess.This
maybeinteresting,butitprobablywon’tbewhatwasintended,astheconsoleprotocolwill
befilledupwithunreadableclutter.
6.2 MECAFFconsole
VM/370(resp.CP)usesdifferentinteractionandpresentationmetaphorsfortheVMconsole
dependingontheterminaltypeconnectedtotheVM.Whilesomeofthetypicalbehaviorcanbe
normalizedbyMECAFF(likepasswordpromptswithCONSstyle),atleastthefollowingdifferences
betweenthe2connectionstylesremain:
Login
o GRAFstyle:aswith3270terminalsdirectlyconnectedtoVM/370,theENTERkey
mustfirstbepressedtogettheinitial“CPREAD”prompt.
o CONSstyle:thelogincommandmaybeenteredwithoutfirstgettinga“VMread”
prompt.
Promptingforinput
o GRAFstyle:theMECAFFpromptstates“Running”,“VMread”and“CPread”have
thesamemeaningasfor3270terminalsdirectlyconnected,the“Enterpwd”stateis
synthesizedfroma“CPREAD”VMstatewithaninvisibletextinputfieldforthe
commandprompt.
AsforplainVM/370,a“Running”statecanmeanthataprogramisworking(not
expectinginput)orthattheVMisidleandwouldacceptaCMSorCPcommand.
o CONSstyle:the“Running”,“VMread”and“Enterpwd”statesaresynthesizedbased
onthepromptstringissuedbyHercules(isthesystemexpectinginput?)andthelast
textlinewrittenbytheVM(isitexpectingapassword?).
Sothe“Running”statemeansthataprogramisworkingandnoinputiscurrently
expected(althoughtypeaheadandsendingthenextinputispossible).
However,thereisno“CPread”promptwithCONSstyle.
StandardCMSpseudofullscreenprograms(EDIT,FLIST,…)
o GRAFstyle:programswhichusetheVM/370R6limitedsupportfor3270terminal
willtrytodofullscreenwrites,sinceMECAFFconnectsasa3270terminal.
Thesewriteswillsucceedfromtheprogramspointofview,butMECAFFwillattempt
toserializethoseoutputs,whichwilllookunusualifthe3270terminalis80columns
wide(asnolineaddressinghappensandconsecutivewriteswillnot
overlap/overwriteonthe80x24displaycells)andwillbeunreadableiftheterminal
hasmorethan80columns(automaticwrappingwillnotoccurwheretheprogram
expectedit)
o CONSstyle:asMECAFFconnectsasa(non3270)serialterminal,thoseprogramswill
probablynottrytousefullscreenwritesandfallbacktoplainlineorientedmode
(likeEDITdoes)
MECAFFManual0.9.7(beta) Page55/65
Wideterminals(morethan80columns)
o GRAFstyle:lineswiderthan80charactersperlinearenotwrappedbytheterminal,
butCPsplitslinesin80characterchunkswhicharepositionedseparatelyonthe
3270screen.
SodoingaTYPEonafilewithupto130charactersperlineonamodel5terminal
(132columns)willnotwritethelinesnicely,butwrappingwillseemtooccurat
column80.Anythingbeyondthe130thcharistruncated(dropped).
MECAFFcanonlyoutputthe80characterchunksastheyaresentbytheVM.
o CONSstyle:onserialterminals,CPdoesnotinsertlinewrapsatcolumn80,so
outputonawideterminalhasmoresimilaritywiththefile.Howeverlineswillstillbe
truncatedafterthe130thchar.
Stoppingaprogramfrom“More…”
o GRAFstyleconnections:WhenstoppingaprogramwiththePA3Key(sendinganHX
immediatecommand,see3)whileitsoutputisheldin“More…”status,thenext
commandissuedtoCMSwillABEND,requiringtoreIPLCMS.
ThisisnotMECAFFspecific,asthesamebehavioroccurswhenconnectingthe3270
terminaldirectlytoVM/370.However,thismaybeaproblemspecificto3270
sessions,asitdidnotshowupwhenconnectedinCONSstyle.
6.3 EEImplementationlimitations
EEcurrentlyhasnochecksforrunningoutofmemory,soeditingverylargefilesmayleadtoABENDs
andthelossoffilemodifications.Assuming14Mofavailablememory(fora15MVM)andanedited
filewithLRECL255(themax.valuesupportedbyEE),thisallowsroughlyfor50.000lines(including
internaloverhead).
EEisimplementedinCusingthenativeClibrary(GCCLIB).Probablyduetomisunderstandingsof(or
wronglyusing)thenativeCAPIresp.tolimitationsoftheunderlyingCMS,thefollowingproblems
occurinthecurrentimplementationforsavingfileswithvariablerecordlength(RECFMV):
Writinganemptyline(linelength=0)withCMSwriteFileresultsinreturncode8andno
lineiswritten,leadingtoafilewhereallemptylinesdisappeared(ifrc8isignored).
TryingtowriteafilewithagivenLRECLbutwithitswidestlinenotreachingthisLRECL,the
valuepassedtoCMSfileOpenasbufferlengthisnotusedasLRECLforthefilewritten,
endingwiththeLRECLbeingthelengthofthewidestlinewrittentothefile(e.g.LRECListo
be80butthewidestlineisonly60charslong,theLRECLofthefilewillbe60insteadofthe
intended80).
AsimilarproblemtoemptylineswithRECFMVexistsforemptyfiles(forbothRECFMs),as“not
writingalineintoanewfilebetweenopenandclose”resultsin“nofileonminidisk”.
ThecurrentimplementationinEEcopeswiththeseproblemsinthefollowingway:
EmptylinesintheeditedfilewithRECFMVarewrittenwithasingleblanktothefile.This
shouldnotbeaproblemforplaintextfiles.
Savinganemptyfilewritesasingleemptyline.
WhenopeningafilewithRECFMV,thefilewidthusedforeditingisthemaximumofthe
LRECLofthefileandtheLRECLvalueoftheFTDEFAULTScommandforthefiletype.Ifno
matchingFTDEFAULTSisgiven,theterminalwidth(minus7charactersforprefixzone
includingcontrolpositions)istakenaspotentiallinewidth.
MECAFFManual0.9.7(beta) Page56/65
7 Possibleextensionsandimprovements
TheMECAFFpackageisworkinprogress.Thefollowingarejustideasonwhatcouldbedone,withno
particularpriority…
7.1 EE
Scripting/macrocapabilities(controlstructuresandprogrammabilitycapabilitiesfor
commandfiles),possiblyusingBREXX(ifitcanbefiguredoutonhowtointerfaceitfor
passingvariablevalues,invokingREXXscriptsandinvokingEEcommandsfromscripts)
7.2 Others
Somekindoffiletransfer
MECAFFManual0.9.7(beta) Page57/65
8 Changehistory
8.1 0.9.00.9.1
EE
o Newfunctionality
Multifileeditingcapability,includingprefixblockoperationsbetweenfiles
(sourceandtargetofcopy/moveoperationsindifferentfiles)
IntegrationofFSLISTwithEE,allowingtouseFLISTtoopenafileforediting
Handlingofdisconnectandreconnectiontoanewterminal(reestablishfull
screensession,withfallbacktoarescuesessionifnotconnectedviaMECAFF)
o Newcommands
EEditfn[ft[fm]]
EXIt
RINGNext,RN
RINGPrev,RP
FSLIST[pattern]
PUT,PPUT,PUTD,PPUTD[fn[ft[fm]]]
GET,GETD[fn[ft[fm]]]
DELete[count]
o Extendedcommands
QQuit[ALL]
(newoptionalparameterALLtoclosealleditedfileswithoutsaving)
Input[linetext]
(optionaltextafterthecommandwillinsertanewlinewiththetextinsteadof
enteringinputmode)
o Newprefixcommands
" (duplicateline)
""..""(duplicateblockoflines)
o Bugfixes
DDprefixcommand:definingtheboundariesofaDDblockindifferentround
trips(differentscreens)nolongerleadstorepetitiveerrormessagesforcingEE
outoffullscreenmode
FSLIST
o Newfunctionality
IntegrationofEEwithFSLIST,allowingtoeditafilefromFSLIST(withPF2)
thecolorsettingsforFSLIST(andFSVIEW)areinitializedfromthecorresponding
ATTRcommandsintheprofilesforEE
o Newcommands
Sort
o Bugfixes
whenchangingthelistwithcommandListfile,thepatternshowedinthetitleline
isadjustedaccordinglyinsteadofdisplayingtheinitialfilepatternoftheFLIST
session
theheaderlineforthefilelistisnowshownwiththeHEADLineattribute(blueas
default)insteadoftheFILeattribute(greenasdefault),asitnotpartofthelist
FSVIEW
o FileviewerfunctionalityisnowavailabledirectlyfromCMS
o SwitchtoeditingthefilebrowsedwithEE(withPF2)
MECAFFManual0.9.7(beta) Page58/65
8.2 0.9.10.9.3
MECAFFProcess/MECAFFAPI
o Newfunctionality
GRAFstyle:
o MECAFFnowemulatesaminimal3270model4(80x43geometry)insteadof
model2(with80x24geometry)
‐supportforall3270modeltypes(2and4)configurableinDMKRIO
‐all3270linesofaVM/370R6underHerculesmachinecannowbeused
o supportforLUnames(groupnamesinHercules)
‐connectionsfromMECAFFtoHerculescanoptionallybeboundtoagroupof
3270lines
‐adefaultLUnamecanbegivenonthecommandlinefortheMECAFFprocess
‐thisdefaultcanbeoverruledbyaLUnameoftheconnectingterminal
‐ifnoLUnameisspecified,theMECAFFconnectionisboundtoanarbitrary
deviceassignedbyHercules(asinMECAFFversionsbefore0.9.3)
newcommandlineparameter–vmLUNamefortheexternalMECAFFprogram
API:
o additionalvariantsforfullscreenreads,supporting
‐pollingread/queryavailabilityofuserinput,allowingasynchronousprocessing
‐timeoutread,returningcontroltotheprogramafterthetimeintervalifnouser
inputoccured
o newAPIcalls:
__fsrdp():polling/timeoutfulllscreenread
__fsgp():setgraceperiodforterminalownershipafter__fsrdp()
__fscncl():cancelfullscreenoperation(releaseterminalownership)
o newsampleprogramFSRDTEST(Csourceandexecutable)
o Bugfixes
APICall__fsrd():
fix:rc4(protocolerror)isnowreturnedwhenevertheinputbufferistoosmallforthe
3270inputstreamreceived
symptom:passingoutbufferlength<=0locksupcommunicationwiththeMECAFF
process
GRAFmodeconnectionstoVM
fix:raceanddeadlockconditionsremovedinbackgroundMORE[HOLDING]
RUNNINGhandshake,occurringmostlywhenoutputtinglargeamountsoflineson
TN3270emulatorsallowingfastAIDkeystrokes(whichdonotensureaminimaltime
intervalwhensendingconsecutiveuserinputs,unlikewc3270/x3270)
symptom:pressingENTERinafastsequencecouldlockupthehandshakemechanism
forthesession,preventingfurtheroutputfromVM/370onthatterminal
GRAFmodeconnectionstoVM
fix:introductionofminimaltimeintervalsbetweeninputsenttoVM,bothforinternal
handshakinginput(ENTERAidforMORE>HOLDINGorCLEARAidfor
MORE|HOLDING>RUNNING)andforuserinput
symptom:fastinputtoVM(e.g.CLEARthenENTERinlessthan1ms)canleadtoa
quantumphysicalstateoftheVMafterFORCEingit,astheuserseemstobeboth
loggedoffandon:
‐QUERYuserandFORCEuserclaimthatthisuserisnotloggedon
‐QUERYNAMESliststheuseraloggedon
‐tryingtologonclaimstheuserisstillloggedon
MECAFFManual0.9.7(beta) Page59/65
MECAFFConsole
o Newfunctionality
attributesettings(color,highlight)forvisualelementsoftheconsolecannowbe
queried(CMScommandFSQRY)andmodified(newCMScommandFSCTL)
settingofPFkeyscannowbequeried(CMScommandFSQRY)andmodified(new
CMScommandFSCTL)
FSQRY
o Newfunctionality
Nowallowstolisttheterminalcharacteristics(aspreviousversions,subcommand
TERM),thedisplayattributesoftheconsole(subcommandATTRS),thePFkeysettings
(subcommandsPFKEYS)oralltheseinformations(subcommandALL)
AlsoallowstosimplyqueryiftheterminalisconnectedviaMECAFFandreturnthe
stateintheexitcode(returnstatus0or1)
FSCTL
o Newcommand
SetthedisplayattributesforvisualelementsoftheMECAFFconsole
SetthecommandissuedthroughtheMECAFFconsolewhenpressingaPFkeyis
pressed,eitherascommandsenttotheVMorprocessedinternallyintheconsole(like
pagingthroughtheoutputhistoryetc.)
EE
o Bugfixes
Prefixcommandsinglelineduplicate("):falseerrormessage(“invalidprefix
command”)afterexecutingcommandremoved
General
o TheMECAFFtoolsforCMSarenowdeliveredin2versions:
linkedagainstthememoryresidentGCCLIBasitisstandardinSixPack1.2
(called“dynamically”linked)
linkedagainsttheruntimefilesofGCCLIBloadedintoresidentmemory
(called“statically”linked)
seesection2.4forcriteriaonwhentoinstallwhichversions.
MECAFFManual0.9.7(beta) Page60/65
8.3 0.9.30.9.4
MECAFFProcess
o Bugfixes
DependencyoftheJREsetuptype
symptom:theMECAFFconsoledoesnotworkatall(hangsaftershowingtheHercules
connectionscreen,ignoringanyinputfromkeyboardoroutputfromVM/370)when
theJavaruntime(JRE)wasinstalledwiththenetinstallationsetupinsteadofthefull
installationsetup.Thenetsetupisasmallfilewithabout900KB,whichdownloadsthe
remaining11MByteoftheJREsetup,thefullsetuphasabout16MByteinasinglefile
(allsizesforWin32);asthesizedifferencesuggests,thenetsetupseemstobeasubset
ofthefullinstall,atleastmissingtheEBCDICcharsetsupportrequiredbyMECAFF.
fix:MECAFFnolongerreliesontheJavabuiltintextconversion,butnowusesitsown
internaltranslationtablesforEBCDICASCIIconversion(bracketEBCDICcharset).
MECAFFConsole
o Newfunctionality
ThePF01keynowissuestheCMScommandFSHELPasdefault,openingthe(new)help
menupage(seebelow).
FSHELP
o Supportfornavigationtoanewhelptopicbymovingthecursortoawordinthecurrent
helptextandpressingthePF01key.Ifavailable,thehelptopiccorrespondingtotheword
underthecursorisopened.
Thehelptopicsarestackedinalastinfirstoutfashion:thePF03keynowclosesthe
currenthelptopicandreturnstotheprevioustopic.Closingthefirst(initial)topic
terminatestheFSHELPprogram.Theprogramcanbeleftfromanytopiconthestackwith
thePF15key(generallytheshiftPF03keycombination).
o InvokingFSHELPwithoutparametersnowdisplaysahelpmenugivinganoverviewoverall
helptopicsavailableondiskU.Thishelptopicpageisgeneratedifnotavailableonan
accessibledisk(orifFSHELPisinvokedwiththeoptionREBUILD),groupingthehelptopics
ondiskUbycommandtype(CMS,CPetc.).ThismenupageissavedtothefileMENU
FSHELPA2andisthendisplayedashelppage.Thishelpfilewillsubsequentlybeusedifthe
menuistobedisplayed.
o Newsubcommands:
Helptopic
openthehelpfortopic,ifavailable.
/text/
searchforwardfortext
/text/
searchbackwardfortext
FSLIST
o Newsubcommands:
/text/
searchforwardfortext
/text/
searchbackwardfortext
FSVIEW
o Newsubcommands:
/text/
searchforwardfortext
/text/
searchbackwardfortext
MECAFFManual0.9.7(beta) Page61/65
8.4 0.9.40.9.5
MECAFFProcess/MECAFFAPI
o accesstoversionnumbers(Major.Minor.Sub)oftheconnectedMECAFFprocessandofthe
MECAFFAPIthroughthenewAPIcall__fsqvrs()
o LinkingagainstPDPCLIB:aminimalversionoftheGCCLIBisnowprovided,allowingtouse
theMECAFFAPIwiththePDPCLIB
FSQRY
o newcommandlineparameterVERsionstooutputtheversiondataoftheconnected
MECAFFprocessandtheMECAFFAPI
EE
o Newfunctionality
NewSubcommands:TABforward,TABBackward,TABSet,FTTABDEFaults
Supportforsoftwaretabstops:
‐TABSet(re)definestabstopsforthecurrentfile
‐FTTABDEFaultsdefinesdefaulttabstopsforafiletype
‐tabpositionscurrentlydefinedaremarkedonthescaleline
Movingthecursortoatabpositionissupportedinthefileareafornormaledit
mode,forinputmodeandforprogrammersinputmode:
‐TABforward(PF01)movescursortothenexttabposition
‐TABBackward(PF13)movescursortotheprevioustabpositionorthefirst
column
Ifinvokedfromthecommandline,TABforward(PF01)movesthecursortothe
lastknowncursorposition(filelineandcolumn)inthefileareaortothecurrent
lineifthelastknownfilelinepositionisnotvisibleorwasdeleted.
Newsubcommands:SHIFTandSHIFTCONFig
SHIFTCONFigCHEckall|MINimal|LIMit|TRUNCate[shiftBy]
definethedefaultshiftbehaviorwhentheshiftedtextreachesalineborderand
thedefaultshiftcount
SHIFT[by]Left|Right[count|:line|.mark][shiftMode]
shiftlinesaroundcurrentlineleftorright,truncatingorlimitingtoborders
Newmode:programmersinputmode
NewcommandPInput,assignedperdefaulttoPF10
addsasinglenewlinewiththeindentationoftheprecedinglineonentering
PInputresp.oneachEnterKeyifthecurrentlinewasmodifiedornootherline
waschanged
allfilelinesonscreencanbeeditedinadditiontothecurrentinputline
programmersinputmodehasownfixedPFsettings:
‐PF01/PF13:TABforward/backward
‐PF03/PF15:leavePInput
‐PF06:SPLTJOIN
‐PF10:movePInputlineafterthisline(ifcursorisinthefilearea)
Newsubcommands:SEArchnextandR[EV]SEArchnext
SEArchnext(boundperdefaulttoPF04,withshortcut:/):
‐ifthelastLOCATEcommandhadexactlyonetargetspecifiedassearchpattern
‐repeatprevioustextsearchinthelastsearchdirection(downorup)
MECAFFManual0.9.7(beta) Page62/65
REVSEArchnext/RSEArchnext(boundperdefaulttoPF16,withshortcut:‐/):
‐ifthelastLOCATEcommandhadexactlyonetargetspecifiedassearchpattern
‐reversethesearchdirectionandrepeatprevioussearchinthenewdirection
Newprefixcommands
singlelineshift:<,>
blockoflinesshift:<<..<<,>>..>>
shiftprefixcommandscanhaveoptions:[1..9][?|:|!|#]
1..9:shiftbycount,default1
?|:|!|#:shiftmode,with?=CHEckall,:=MINimal,#=LIMit!=TRUNCate
o Modifiedfunctionality
SubcommandCMS
wheninvokedwithoutaCMSorCPcommandasparameter,EEleavestemporarily
thefullscreenmodeandtheCMSSubsetlevelisenteredontheMECAFFconsole.
ThisallowstoenterCP/CMSsubsetcompatiblecommandsuntilthecommand
RETURNisentered,whichwillleavetheCMSsubsetandrestorefullscreenEE
editing.
SubcommandSPLTJOIN
Split:thenewline(restofthesplittedline)nowhasthesameindentationasthe
originalline
Join:leadingspacesareremovedfromthejoined(second)linebeforeappending
topreviouslineatthecursorposition
SubcommandsQuitandQQuit
ifprefixcommandsarepresentonthescreenorarependingfromaprevious
screen,thesecommandsnowactlikeRESET:prefixcommandsareremoved
(insteadofexecutingthem)andthecurrentfile(resp.EE)arenotclosed.
thisgivesthePF03key(towhichQuitisusuallyassigned)ageneric"escape"
functionalitydependingonthecurrentmode:
‐leaveInputresp.PInputmode
‐reset/cancelprefixoperations
‐closethecurrentfile
‐closeEE
FSLIST/FSVIEW/FSHELP
o Newfunctionality:Repeatprevioussearch
Subcommand/orPF04:repeatthelastsearchinthesamedirection
Subcommand‐/orPF16:reversesearchdirectionandrepeatsearchinnewdirection
(bothsubcommandsmustbegivenwithouttrailingblanks,asthiswouldstartanew
searchforthewhitespacegiven)
FSVIEW
o Newfunctionality:thelinenumberofthefirstdisplayedfilelineonthescreenandthe
totalnumberoflinesofthefilearedisplayedinthetopheaderline
MECAFFManual0.9.7(beta) Page63/65
8.5 0.9.50.9.6
General
o Newfunctionality:
OnlinehelpfilesforEEandFS*commandsareprovidedonanadditionaltapefile
HelpfilesfortheMECAFFCMScommandsarestandardCMShelpfiles(filetype
HELPCMD)supportedbyCMSHELPandFSHELP
HelpfilesfortheEEsubcommandsandEE(toplevelinternalhelp)arenonstandard
helpfiletypesHELPEEandHELP_EEsupportedbyFSHELPonly
EE
o Bugfixes
ABENDafterSplitJoininprogrammersinputmode
symptom:afterappendingthecurrentinputlinetothepreviouslinewithaSplitJoin
(PF06/PF18),theinputlineoftheprogrammersinputmodedisappearsandEEcrashes
(ABEND)whenleavingtheprogrammersinputmodewithPF03.
fix:anewinputlineisgeneratedifthecurrentoneisjoinedawaywithSplitJoin.
misplacedinputlineafterSplitJoininprogrammersinputmode
symptom:aftersplittingthecurrentinputlinewithaSplitJoin(PF06/PF18),the
inputlineoftheprogrammersinputmodeisplacedbetweenthefirstandsecondline
ofthesplit,whichisunexpected.
fix:thenewinputlineisnowinsertedbehindthesecondlineofthesplit.
o Newfunctionality:
NewSubcommandHelp:ShowthetoplevelhelptopicforEE
FSLIST
o Bugfixes
PFKeys
symptom:thePFkeysPF06toPF09scrolledthedoubledistance,asthehandling
routineforscrollingwascalledtwice.
fix:redundantcallingthementionedroutineintroducedwithcodechangesfor
repeatingthelastsearchwasremoved.
o Newfunctionality:
NewSubcommandHelp:ShowthehelptopicforFSLIST
FSVIEW
o Newfunctionality:
Horizontalscrolling:
iftheLRECLofthefileislargerthanthelinewidthavailableonthescreen,onlythe
firstcolumnsfittinginthespaceavailableweredisplayed.
Thefilecontentcannowbescrolledhorizontallyinsidetheusablescreenwidthwith
thefollowingPFkeys:
‐PF11:movethefirstdisplayedcolumnofthefileby20positionstotheleft
‐PF12:movethefirstdisplayedcolumnofthefileby20positionstotheright
Shiftingthehorizontalscreenspaceoverthefilecontentisboundedtothefilewidth
(LRECL).
Thefileformatandthecurrentlyvisiblecolumnrangeisshownintheheadline.
NewSubcommandHelp:ShowthehelptopicforFSLIST
MECAFFManual0.9.7(beta) Page64/65
8.6 0.9.60.9.7
General
o Sessioninitialization
thefirstinstallationtapenowcontainsthefileCKMECAFF EXECintendedtobecalled
fromthePROFILEEXECtocheckifthe3270terminalisconnectedviaMECAFF.Ifthisisthe
case,anautomaticinitializationisperformed(seebelow)andauserspecificscript
(MCFFPROFEXEC)isexecutedifpresent,allowingtocustomizetheMECAFFsessiononlyif
MECAFFisactive(soFSQRYwillnotblockifthe3270terminalemulatorisdirectly
connected).
o Synonyms
anewpartoftheMECAFFinstallationisalsoaSYNONYMfileallowingtoregisterthealiases
FSLISTandFSVIEWfortheEEcommand.Thesesynonymsareintendedasreplacementsfor
thecorrespondingEXECs.
ThesynonymtableisautomaticallyregisteredbyCKMECAFFiftheMECAFFprocessis
present.
MECAFFprocess
o Bugfixes
protocolerrorreportedbyfullscreensynchronousreadafternonsynchronous_fsrdp()
symptom:somecombinationsofasynchronousfullscreenreaddirectlyfollowingan
asynchrounousreadleadtoaprotocolerror(returncode2)afternouseractivityinthe
graceperiodoftheasynchrounousread
fix:thegraceperiodcounterisnowresetinallcaseswhenasynchronousreadoccurs,
preventingthestatemismatchduetothewronggraceperiodtimingout.
TheWCCbytes(WriteControlCharacter)fortheW,EW‐andEWAcommandsin
outboundstreamsarenowtranslatedwiththe32706bitencodingschemetoprovide
theparitybits(e.g.a0xC3WCCcodeisnowsentinsteadof0x03).Thisshouldincrease
thecompatibilitywithterminalemulatorsverifyingtheparityinformation.
o Newcommandlineparameter‐sendDelay:n
DefinesthewaitperiodinmillisecondsusedbytheMECAFFconsolebeforeitsendsa
screenmodificationtotheterminal,withadefaultof0ms(asitwasbefore0.9.7)
Dependingonthespeedofthehostinghardware,settingittoatleast2mswillallow
tousetheQWSemulatorprogramwhichcanbefoundontheMVSturnkeyCD
distribution(thisQWSversionhasproblemswiththefastrecurringscreenredrawsand
crashedwithMECAFFbefore0.9.7andstillcrashesif‐senddelayistoosmallforthe
hostinghardware)
o Newcommandlineparameter‐minColorCount:n
Definestheminimalnumberofcolorsthatanemulatormustsupporttobeaccepted
asacolorterminal.Thenumberofsupportedcolorsisreportedbytheemulatorin
responseoftheWSFQueryissuedduringthetn3270negociationphase(ifthepara
meter‐noDYNAMICisnotspecified).Thedefaultvaluefortheminimalcolorcountis4.
o Supportfor3270emulatorswithoutextendeddatastreamsupport
iftheterminaltypetransmittedbytheemulatorduringthetn3270negociationphasedoes
notindicatethattheterminalsupportsextendeddatastreams(i.e.theterminaltypename
doesnotendwithE’),MECAFFwillnotattempttoquerytheterminalcapacitieswithan
extendeddatastreamquery,stickingtothedefaultcapabilitiesasidentifiedbytheterminal
type(e.g.24x80,nocolors,noextendedhighlightingifitisaIBM32782)
MECAFFManual0.9.7(beta) Page65/65
EE/FSVIEW/FSLIST
o Bugfixes
FailureswhenopeningfileswithLRECL>255
symptom:tryingtoeditorbrowsesuchfilesfromthecommandlineorfromtheFSLIST
moderesultedindifferenterrors,rangingfromsimplyclosingtheprogramwithouta
messageorwithmessagesaboutoverwrittenmemoryblocks(eitherbyDMSFRETor
bytheEEinternalmemorymanager)uptoABENDs
fix:theinternalstatehandlingforthefiletobeopenedhasbeencorrected
o Modifications
fileidentificationscannowbespecifiedeitherwiththetraditionalCMSconvention
fnftfmorwiththedotnotation(usedbymanyotherOSes)fn.ft.fm(i.e.the3fileid
componentscanbeseparatedwithwhitespacesordots,evenmixed)
whenspecifyinganewfileid(orpatternforFSLIST)itispossibletoreference
componentsfromthecurrentcontextwiththeequalsign(=),forexample:
‐ whileeditingthefileFOO C A1,specifying= hwillopenFOO H A1
‐ havingthepatternX* MODULE SinFSLISTandgivingl =.=.awilllist
 thefilesX* MODULE A
iffileidswiththedotnotationaretobeusedontheCMScommandline,theEXECsfor
FSLISTandFSVIEWwillnolongerwork,asthecommandlineistokenizedbytheEXEC
interpreterto8characterchunks,whichwilltruncatemostusefulfileidsindot
notation.
UsingthesynonymsforEEinsteadoftheEXECsresolvesthisproblem(atleastunder
VM/370R6SixPack1.0ornewer).Seesection2.4.2forinstallationoptions.
EE
o Newfunctionality
Newprefixcommand@
markingalinewiththisprefixcommandtellsEEtoignoreanymodificationsmadeto
thisline(thisisveryusefulifanEEcommandwasenteredbyinadvertenceinthefile
areainsteadofthecommandpromptline)
o Modifications
commandsPGUPandPGDOWN
thesecommandsnowacceptanumericalparametertodefinethepagingheighteither
aspercentageofapageheightoraspageheightminusanumberoflines;
thekeysPF19andPF20arenowboundtoscrollupresp.downby2/3ofascreen
prefixcommands
afterexecutingaprefixcommand,EEnowtriestopositionthecursorinthefilearea,
withthelineselectedforplacementdependingontheprefixoperationandthecursor
beingonthefirstnonblankcharacterofthelineresp.preservingtheindentationfor
theinputprefixcommand

Navigation menu