MECAFF Manual 0.9.7x 0.9.7
User Manual: Pdf
Open the PDF directly: View 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.Hans‐WalterLatz
WARNINGS:
Thissoftwareisdeliveredas‐iswithnopromiseorcommitmenttobeusableforanyparticular
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.3ConnectionsfromMECAFFtotheVM/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.2MECAFFCMStoolspost‐installationoptions................................................................13
2.5InstallingtheMECAFFCMShelpfiles....................................................................................16
3TheMECAFFconsole.....................................................................................................................17
4TheMECAFFtoolsforCMS............................................................................................................19
4.1FS‐QRY–QueryInformations................................................................................................19
4.2FS‐CTL....................................................................................................................................21
4.3CMSsessioncustomizationwithCKMECAFF/MCFFPROF...................................................22
4.4HandlingoffileidentificationsinEE,FSLISTandFSVIEW.....................................................24
4.5EE–Fullscreeneditor............................................................................................................24
4.5.1Introduction...................................................................................................................24
4.5.2Editingmultiplefilesandmodetransitions...................................................................25
4.5.3Prefixcommands...........................................................................................................26
4.5.4Commands.....................................................................................................................27
4.5.5CustomizingwithSYSPROFEEandPROFILEEE...........................................................39
4.5.6Rescuemode.................................................................................................................39
4.6FSLIST–Fullscreenfilelist.....................................................................................................40
4.7FSVIEW–Fullscreenfilebrowser..........................................................................................42
4.8FSHELP–Fullscreenhelp.......................................................................................................43
5MECAFF‐API...................................................................................................................................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.4Releasefullscreenterminalownership/cancelfullscreenmode................................51
5.4QueryingtheversionofMECAFF..........................................................................................51
5.5MiscellaneousOperations.....................................................................................................51
5.6APIfilesandlinking................................................................................................................51
5.7DemonstrationprogramfortheMECAFF‐API.......................................................................52
6Knownrestrictions/problems......................................................................................................54
6.1General..................................................................................................................................54

MECAFFManual0.9.7(beta) Page3/65
6.2MECAFFconsole....................................................................................................................54
6.3EE–Implementationlimitations...........................................................................................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?
MECAFFisanon‐invasiveextensiontoVM/370R6providingfullscreencapabilitiesandaserial‐style
(insteadofpage‐oriented)consoleinterfacewith3270terminalemulators.
Moreprecisely,MECAFFsupportsVM/370andVM/380SixPackversion1.2runninginsideaHercules
S/370resp.S/380emulator(theterm“VM/370”willbeusedhereforbothVM/370andVM/380).
Theterm“non‐invasive”meansthatnomodificationsarerequiredintheVM/370systemtouse
MECAFF.Thenewfullscreencapabilityresp.themodifiedconsoleinterfaceareprovidedby
anexternalprogramworkingbetweenthe3270terminalsandtheVM/370host.
The3270terminalsconnecttoMECAFF,whichopensaconnectiontotheVM/370machine,
providingeachsessionwiththenewconsole(withascrollableoutputlinehistoryanda
commandinputhistory)andtheabilitytosharetheconnected3270screenwith(fullscreen)
applicationsonthehost.
asmallAPIallowingCMSprogramstoaccessthefullscreenfacilityofMECAFF.
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
withcommandsembeddedbytheMECAFF‐APIintotheterminaldatastream.
BasedontheMECAFF‐API,someCMSprogramsareprovidedwithMECAFF:
FS‐QRY :displaycharacteristicsofthe3270terminalconnectedtoMECAFFandthe
settingsoftheconsole
FS‐CTL:setthepropertiesoftheconsole
FSHELP:afullscreenhelp(displayingthestandardCMShelp)
EE:acombinedfullscreenfileeditor(EE),filelistviewer(FSLIST)andfilebrowser
(FSVIEW),alsoallowingtoinvokethesebasicfunctionsfromtheCMScommand
line.
Non‐invasivealsomeansthatevenifallMECAFFelementsareinstalled,theVM/370systemcanstill
beusedasiftheyweren’t,simplybyconnectingthe3270terminalemulatordirectlytoHercules
insteadofusingMECAFF.
Theterm“multiline”inMECAFFmeansthatseveralterminalscanconnectinparalleltotheMECAFF
processtostartfullscreencapablesessionsontheVM/370machine.

MECAFFManual0.9.7(beta) Page5/65
TheexternalMECAFFprocessisimplementedasastand‐aloneJava™program.TheCMScomponents
(MECAFF‐APIandCMSprograms)aremainlyimplementedinCwiththenativeCruntimelibrary
GCCLIBandasmallassemblyroutine.
1.2 Features
1.2.1 MECAFFconsole
ThemostnotabledifferencebetweenthestandardVM/370console(for3270terminals)andthe
MECAFFconsoleisthat–althoughworkingwitha3270terminal–theMECAFFconsolesimulatesa
lineorientedterminalusingascrollingmetaphor.Upto65536outputlinesareremembered,
allowingtopagethroughtheoutputhistoryofthecurrentsession.
MECAFFhasasimilarscreenlayouttotheVM/370consolefor3270terminalswithaninputzoneat
thebottomofthescreen,theoutputzonefillingthescreenspaceabovetheinputzoneandaVM
statusindicator(whereMECAFFusesmixed‐casestatenamesfortheequivalentVMstates:
“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*X‐likeapproachwheretheoutputisheldwiththe
“More…”promptafteranoutputzoneheighthasbeenwrittensincethelastuserinput.So
commandswritingoutonlyafewlines(lessthananoutputzoneheight)orprogramsdoing
question‐responsecycleswithafewoutputlinesbetweenpromptswillnotenterthe“More…”
state.Releasingthe“More…”statetogetthenextpendinglineswrittentothescreenissimply
donewiththeENTERkey.
AndofcoursetheMECAFFconsoleisbuilttosharethe3270screenwithaCMSfullscreenprogram
basedontheMECAFF‐API.

MECAFFManual0.9.7(beta) Page6/65
1.2.2 Supported3270terminals
MECAFFsupportsthefollowingTN3270terminalstypesconnectingasclientswiththementioned
screengeometries:
IBM‐3278‐2‐E,IBM‐3279‐2‐E,IBM‐3278‐2,IBM‐3279‐2
80colsx24lines
IBM‐3278‐3‐E,IBM‐3279‐3‐E,IBM‐3278‐3,IBM‐3279‐3
80colsx32lines
IBM‐3278‐4‐E,IBM‐3279‐4‐E,IBM‐3278‐4,IBM‐3279‐4
80colsx43lines
IBM‐3278‐5‐E,IBM‐3279‐5‐E,IBM‐3278‐5,IBM‐3279‐5
132colsx27rows
IBM‐DYNAMIC
arbitraryscreengeometrywithinthe14‐bitbufferaddressingrangewithatleast24rows
and80columns(theoreticallyallowingscreensizesbetween80colsx204rowsand682cols
x24rows)
Ifnotdisabled,theterminalcapabilities(alternativebuffersize,supportforcolorandextended
highlighting)aredeterminedfromtheterminalusinga3270structuredfieldquery,evenforstandard
types(allowingforexampletorecognize“Customgeometry”settingsforthex3270terminal
emulation).Iftheterminaltypedoesnotindicatethattheterminalsupportsextendeddatastreams
(i.e.:theterminaltypedoesnotendwith‘‐E’),MECAFFwillnotattempttoquerytheterminal
capacitieswithanadditionalquery,stickingtothedefaultcapabilitiesasidentifiedbytheterminal
type(e.g.24x80,nocolors,noextendedhighlightingifitisaIBM‐3278‐2).
Ifqueryingtheterminalcapabilitiesisdisabledusedthe“‐nodynamic”switch(see2.3),onlythe
predefinedterminaltypes(allmentionedaboveexceptIBM‐DYNAMIC)withtheirstandard
characteristicsareknown.
1.2.3 ConnectionsfromMECAFFtotheVM/370machine
Foreach3270terminalconnectingtotheMECAFFprocess,adedicatedTCP/IPconnectionisopened
totheHerculesprocesshostingVM/370,presentingitselfeitherasa3270terminal(morepreciselya
minimalIBM‐3278‐4emulation)orasaplaintelnetclient(seenbyVM/370as3215terminal).
DependingontheterminaltypeusedbyMECAFF,CPuses2differentconsoleflavorstomanage
consoleI/O,whicharebothmappedtotheMECAFFconsolepresentationandinteraction.Thedevice
typefortheconsoleisidentifiedbyaCPQUERYVIRTUALcommandeitherasGRAFfora3270
terminalorCONSfora3215terminal.Inspiredfromthesedevicenames,theterm“GRAF‐style”is
usedforMECAFFconnectingas3270andtheterm“CONS‐style”isusedfora3215typeconnection.
WhichtypeofconnectiontoVM/370istobeusedbyMECAFFisdeterminedbytheTCP/IPportto
whichthe3270terminalopenstheconnectiontoMECAFF:
Connectingtoport3277willuseaGRAF‐styleconnectiontoVM/370.
Connectingtoport3215willuseaCONS‐styleconnectiontoVM/370.
(thegivenportnumberscanbeoverriddenusingcommandlineparametersforMECAFF,see2.3)

MECAFFManual0.9.7(beta) Page7/65
ForGRAF‐styleconnections,MECAFFsupportsall3270linesprovidedbyVM/370,asemulatinga
model4terminalallowsMECAFFsessionstobeconnectedtodevicesdefinedinDMKRIOasmodel2
orasmodel4.
FurthermoreaLU‐namemayoptionallybegivenforGRAF‐styleconnectionstobindtheoutgoing
3270linetoagroupoflinesdefinedintheHerculesconfiguration.TheLU‐nameforaMECAFF
sessioncanbespecifiedat2levels:
ThedefaultLU‐namecanbepredefinedasparameterfortheMECAFFprocess.
The3270terminalemulatorconnectingtoMECAFFcanalsodefineaLU‐nameinits
connectionspecification.
Ifbotharespecified,theLU‐nameoftheterminalconnectingtoMECAFFhaspriority.
Bothconnectionstylesbehavethesameforfullscreenapplications,asitistheprogrambasedonthe
MECAFF‐APIwhichinteractstransparentlywiththe3270terminalconnectedtoMECAFF.
Ontheconsoleinteractionlevel(commandresponses),MECAFFcannotcompletelyhidethe
differencesonhowCPhandlespage‐oriented(3270=GRAF)andserial(3215=CONS)terminaltypes
(see6.2).
1.3 Testedenvironments
MECAFFhasbeentestedinthefollowingenvironments:
WindowsVista32‐Bit
Hercules3.0732‐Bit
Java1.6.0‐1332‐Bit
VM/370SixPack1.2(also:SixPack1.0/1.1withstaticallylinkedMECAFFtoolsforCMS)
wc3270‐3.3.0
Windows7Professional64‐Bit
Hercules3.07:380‐1.064‐Bit
Java1.6.0‐26‐b0364‐Bit
VM/380SixPack1.2
wc3270‐3.3.0
UbuntuLinux9.10
Hercules3.0764‐Bit
Java1.6.0‐2664‐Bit
VM/370SixPack1.2
x3270‐3.3.4p6

MECAFFManual0.9.7(beta) Page8/65
2 Installation
2.1 Prerequisites
TheexternalMECAFFprocessisimplementedasJavaprogramandrequiresaJavaruntime
Environment(JRE)Version1.6.
IfGRAF‐styleconnectionsaretobeboundto3270linegroupsviaLU‐names(forexampleto
directconnectionstolinesconfiguredas3270model4inDMKRIO),thecorrespondinggroup
nameshavetobeaddedtothedevicedefinitionsintheHerculesconfiguration(.conf‐file).
ThestandardSixPack1.2configurationfilealreadydefinesthegroupsMOD2andMOD4.
ForCONS‐style,serialterminallineswithouttheNOPROMPToptionareneededinthe
Herculesconfiguration(.conf‐file)andtheVM/370hardwareconfiguration(DMKRIO)to
allowMECAFFtoconnect.ThestandardSixPack1.2configurationforHerculesdoesnot
provideanyfreelinesofthistype(line0009isavailable,butreservedfortheintegrated
console).BasedonthestandardDMKRIOconfiguration,thedevices0004to0008andline
000AcanbeusedforCONS‐stylebyaddingthefollowinglinestotheHerculesconfiguration:
0004.5 3215
000A 3215
MECAFFscanstheterminaldatastreamcominginfromCP(VMstate,passwordprompts,…)
andHercules(promptstringfor3215lines)forcharacteristictextstomanagetheownstate
(promptstate,sessionend,…).
ThisscanningrecognizesthespecifictextsissuedbytheVM/370‐R6SixPackVersion1.2on
HerculesVersion3.07resp.VM/380SixPackVersion1.2onHercules3.07:380‐1.0.
Ifthesetextsfromthementionedsoftwareversionsaremodifiedorifothersoftware
versionsareused(forexamplenotVM/370SixPackversion1.2),MECAFFmustpossiblybe
adaptedforacorrectstateandsessionhandling.
MECAFFreliesonthestandarddefinitionofthelineendcharacter(character#,see
command CP TERMINAL LINEND)whensendingtheHTorHXcommandstoleavethe
“More…”stateprematurely.
2.2 Filesinthepackage
UnpackingtheMECAFF‐archivecopythefollowingfilestothecurrentdirectory:
mecaff.jar
therunnablejarfilefortheMECAFFprocess
mecaff.aws
theAWStapefileinCMSTAPEformatcontainingtheMECAFFCMStoolsandAPI
mecaff_s.aws
theAWStapefileinCMSTAPEformatcontainingonlytheMECAFFCMStoolsasstatically
linkedMODULEs
mecaff_h.aws
theAWStapefileinCMSTAPEformatcontainingthehelpfilesforMECAFFtools
sixpack+mecaff.conf
asampleHerculesconfigurationforSixPack1.2;thisconfigurationistheoriginalfilefrom
theSixPack1.2finalrelease,modifiedtoprovideadditional3215devicesforCONS‐style
connections(andcorrectingdirectorynamestolowercasefor*X‐OSes).

MECAFFManual0.9.7(beta) Page9/65
sixpack+mecaff.cmd
startupscriptforWin32/Win64intendedforastandard(fresh)SixPack1.2installation,
usingsixpack+mecaff.confasconfiguration.Thisscriptstartsthefollowing
componentsinparallel:
o theMECAFFprocess
o theHercules‐basedVM/370machine
o one87x32color3270terminalconnectedtoVM/370viaMECAFFusingGRAF‐style
run3270-delayed.cmd
scriptusedbysixpack+mecaff.cmdtostarttheWC3270emulator(whichispartof
SixPack1.2)
sixpack+mecaff.sh
startupshellscriptfor*X‐OSesequivalenttosixpack+mecaff.cmd,butusingx3270
asterminalemulation(itisassumedthatx3270isinstalledandavailableonthePATH)
MECAFF-Manual-version.pdf
thisfile.
AlthoughMECAFFisnon‐invasive,itisprobablynotagoodideatodothefirstexperimentswith
MECAFFintheown“productive”environment.Thisiswhythesixpack+mecaff‐scriptsallowto
makethefirststepswithMECAFFonafreshSixPack1.2installation:
Forthis,theMECAFF‐archivehastobeunpackedinthebasedirectoryoftheSixPack
installationtobeextended,i.e.thedirectorywherethefilessixpack.cmd,
sixpack.confandsixpack.sharelocated.
TheonlyrequirementisthatbothHerculesandaJavaRuntime1.6areonthePATHforall
users(aswellasx3270on*X).
WhentheHerculesmachinestartedbyasixpack+mecaff‐scriptends,thestartupscript
automaticallyterminatestheMECAFFprocessandthe3270emulation(infactallrunning
3270emulators).
ThedeliveredscriptscanbeusedastemplatestoextendtheownVM/370environment.
Theonly“trick”touseMECAFFistoruntheexternalMECAFF‐processinparalleltotheVM/370
Herculesmachineandthatthe3270terminalemulatorsconnecttothisprocessinsteadofdirectlyto
theHercules.
2.3 RunningtheexternalMECAFFprocess
TheMECAFFprocessisimplementedasJavaprogramandneedsaJavaRuntimeVersion1.6.
ItisbundledasrunnableJARfile,soitcanbestartedwiththefollowingcommandline:
java -jar mecaff.jar [ options ]
TheMECAFFprogramacceptsthefollowingcase‐insensitiveoptions(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
OptionallyspecifiestheLU‐NametousewhenopeningaGRAF‐styleconnectiontothe
VM/370(orVM/380)machine.Thelunameisthegroupnameassignedto3270devicesin
theHerculesconfiguration.Asthegroupnameiscase‐sensitive,itmustbespecifiedinthe
MECAFF‐optionasspelledintheHerculesconfigurationfile.
ThisoptiondefinesthedefaultLU‐nametouseiftheconnectingterminaldoesnotspecifya
LU‐namebyitself.IfnoLU‐nameisspecified(neitherbytheterminalnortheoption
‐vmLUName),MECAFFwillconnectwithoutspecifyingaLU‐nameandHerculeswillassigna
free3270deviceontheVM/370machine.
Nodefault,i.e.don’tuseadefaultLU‐NamewhenopeningaGRAF‐styleconnection.
-portGRAF:port
TCP/IPlistenporttoopenforGRAF‐styleconnections.
Default:3277
-portCONS:port
TCP/IPlistenporttoopenforCONS‐styleconnections.
Default:3215
-do:style
Specifieswhichport(s)toopen(whichconnectionstyle(s)tosupport,possiblevaluesfor
styleare:
CONSopenonlytheCONS‐styleport
GRAFopenonlytheGRAF‐styleport
BOTHopenbothports
Default:BOTH
-noDYNAMIC
DisablequeryingtheterminalcharacteristicsthroughaWSF‐query,soonlythepredefined
terminaltypes(allmentionedin1.2.2exceptIBM‐DYNAMIC)withtheirstandard
characteristicsareknown.
Default:queryingisenabled.
-sendDelay:count
DefinethetimeintervalthatMECAFFwillwaitbetweenwriteoperationstotheterminal
whenupdatingtheconsolestatedisplayedonthe3270screen.Thevaluecountmustbein
therange0..9.
Default:0
-minColorCount:count
Definethenumberofcolorsaconnected3270terminalemulationmustatleastsupportto
beacceptedasacolorterminal.Thenumberofsupportedcolorsisreportedbytheterminal
emulatorinresponsetotheWSF‐query(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,whenusingCONS‐style,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)uptothefirsttapemarkandtheMECAFF‐APIfileswithademoprogram(see
5.6)uptothetapeend.
TheMECAFFtoolscontainedinthisAWStapefileareMODULEslinkedagainstthenative
CMSGCCruntimelibraryGCCLIB.AstheseprogramsrelyontheGCCnativeruntimeloaded
intoCMSresidentmemory,theseversionsoftheprogramsarecalled“dynamicallylinked”.
Thetapefilemecaff_s.awscontainstheMECAFFtoolsdirectlylinkedagainsttheobjects
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.LoadingtheMECAFF‐APIfilesafterthefirsttapemarkisonlynecessaryifownfullscreen
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
Re‐accessdiskYinR/Omode:
release y
access 19E y/s
(theabovecommandsalsoapplyforloadingthestaticallylinkedfilesfromthetapemecaff_s.aws
afterinstallingthedynamicallylinkedMECAFFfiles)
UsersloggingonafterthefileshavebeeninstalledondiskYwillbeabletousetheMECAFFtools.
However,toprovidethefullfunctionalityatthecommandlinelevel,apost‐installationprocedureis
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 orloadingoftheGCCLIBintoresidentmemoryisnotenabledinthesystem‐wide
SYSPROF EXEC

MECAFFManual0.9.7(beta) Page13/65
o oranyDOS‐relatedprogramsisusedunderCMS
then:
thestaticallylinkedversionoftheMECAFFtoolsmustbeinstalled,asthe
dynamicallylinkedtoolswillnotworkatallorwillprovokeABENDsinconjunction
withtheDOS‐programs.
IfMECAFFversion0.9.0wasinstalled,theoldversionofFSLISTshouldberemovedto
preventusingitbyinadvertence,astheoldseparateprogramisnowobsoleteandreplaced
byasynonymforEE,providingmorefunctionality.Removingtheoldversioncansimplybe
donewith:
erase fslist module *
UnderSixPack1.2,diskAofuserMAINThasaSYSPROF EXECthathidesthesystemwide
oneandpreventsloadingthenativeGCCruntimeintoresidentmemoryforthisuser.
BeforethedynamicallylinkedMECAFFtoolscanbeusedbyMAINT,thelocalSYSPROFEXEC
hastobedisabledbyrenamingitaway(andre‐IPL‐ingCMSorloggingoffandonagain),for
example:
rename sysprof exec a sysprof_ exec a
2.4.2 MECAFFCMStoolspostinstallationoptions
StartingwithMECAFFversion0.9.7,thefullscreentoolssupportspecifyingthefileidentificationsand
listpatternswiththedot‐notation,wherethecomponentsofthefileidentificationareconcatenated
withadot,asanalternativetothetraditionalseparationwithwhite‐space(see4.4).
Ifusingthedot‐notationforfile‐idsfromthecommandlineisnotinterestingenoughfortheusersof
theVM/370installationandwillnotbeusedatall,nofurtherpost‐installationstepsarerequired.
Therestofthissectioncanbeskippedinthiscase.
Thepost‐installationisalsonotnecessaryiftheextendedparameterlistisnotsupported(VM/370
R6priortoSixPack1.0).
Asasinglefileidentificationindot‐notationmaybemorethan8charactersinlength,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
‐orimplicitlyusingtheMECAFF‐profilemechanismbyinvokingCKMECAFF(see4.3).
Thisisusuallydoneintheuser’sPROFILEEXEC,butregisteringtheSYNONYMfilecanalsobe
doneinthesystem‐wideprofileSYSPROFEXECsupportedsinceSixPack1.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,updatesofMECAFFwillnotrequiretore‐dotheadaptationsteps.
DependingontheusageoftheVM/370system,thefollowingsetupsarerecommended:
ifthesystemisusedbyonlyoneuser,onlythePROFILEEXECofthisusershouldbemodified.
ifseveralusersworkwiththesystem,thesynonymsshouldberegisteredintheSYSPROF
EXECanduserswishingtodoMECAFFcustomizationscanusetheMECAFFprofile
mechanismintheirPROFILE EXEC.
Allmentionedpost‐installationalternativesformakingthedot‐notationforfile‐idsavailablefor
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
beusableout‐of‐the‐box,evenifnopost‐installationisperformed.ThisiswhytheMECAFFtools
includeEXECsforthecommandsFSLISTandFSVIEW,sothesetoolsareavailabletoallusersright
fromthestartaftercopyingthetoolsfromthetape(s)totheY‐disk.
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
(thesecondcommandusestheMECAFF‐profilemechanism,see4.3,andshouldbethelastCMS
commandexecutedinthePROFILE)
2.4.2.3 Postinstallationalternative:modifySYSPROFEXEC
Thesystem‐wideprofileSYSPROF EXEC,whichisalwaysexecutedbeforetheuser’sPROFILE
EXEC,isonlyavailablesinceVM/370R6SixPack1.2.Thefollowingpost‐installationalternative
cannotbeimplementedforVM/370priortothisversion.
WARNINGS:
UsingMECAFFprofilefunctionality(CKMECAFF)intheSYSPROF EXECisdiscouraged,as
usinganyconsolestackmanipulationinthePROFILE EXECmayremovethecommand
enteredtransparentlybytheMECAFFprocess,effectivelydisablingtheprofilingmechanism
(see4.3).
Therefore,theSYSPROF EXECshouldregistertheMECAFFsynonymstoprovidetheFSLIST
andFSVIEWcommands.
However,invokingCKMECAFFfromtheSYSPROFispossibleandfunctional,aslongasall
usersrenounceusingconsolestackmanipulationsintheirPROFILE EXEC.
ModifyingtheSYSPROF EXECisasystem‐modification,astheCMSSEGandCMSshared
segmentsmustberegenerated.
Beforedoingthismodification,itisadvisabletobackupthesystem(forexamplebybacking
uptheHerculesshadow‐filesforthediskpacksoftheVM/370installation).
ThefollowingcommandsequencesarebasedonthefileSYSPROGMEMOofuserMAINT
underSixPack1.2.TheexactcommandstouseforothersystemswithaSYSPROF‐like
functionalitymaydiffer.
Adaptingthesystem‐wideSYSPROF 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:
HelpfilesfortheMECAFFCMScommandsFS‐QRY,FS‐CTL,EE,FSLIST,FSVIEW,FSHELP;
thesearestandardCMShelpfiletypeHELPCMDsupportedby(CMS‐)HELPandFSHELP
HelpfilesforEEsubcommandsandatop‐levelhelptopicforEE’sinternalhelp;
thesearenon‐standardhelpfiletypesHELPEEandHELP_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)
Re‐accessdiskUinR/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
cyclicallyrecalledforeditingandre‐issuing:
PF12stepsbackininputhistory,theretrievedcommandreplacesthecurrentcommandline
content.
PF11stepsforwardintheinputhistory.
PF3clearstheinputareaandresetstheinternalhistorypointer,sothenextPF12willagain
retrievethelastcommandentered.
DataenteredonthecommandlineissenttoVMbypressingtheENTERkey.PressingthePA1keywill
enterCP(inGRAF‐style,aPA1‐AidissenttoVM;inCONS‐style,a #CP commandissent).
Ontheoutputarea,theMECAFFconsoletriestosimulatealineorientedterminalonthebasically
page‐oriented3270device.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.
ThecommandsboundtothePFkeyscanbequeriedwiththeMECAFFcommandFS‐QRYand
changedwiththecommandFS‐CTL.BesidestheMECAFFinternalfunctionalitymentionedabove
(initiallyboundtothePFkeys),almostarbitraryCMSorCPcommandtextscanboundtothePFkeys,
sendingthesecommandstoVMwhenthePFkeyispressedontheterminal.
Asdefault,PF01invokestheMECAFFtoolFSHELP,displayingamenuofthehelptopicsavailableon
diskU.
Similarlythecolorsettingsresp.highlighting(formonochrome3270displays)forthedifferent
displayedscreenelementsoftheMECAFFconsole(normaloutputfromVM,inputarea,echoed
input,…)canbequeriedwiththecommandFS‐QRYandmodifiedwiththecommandFS‐CTL.
WhenaprogrambasedontheMECAFF‐APIstartsfullscreenoperations,thisprogramandthe
MECAFFconsolehavetosharetheterminaltohandletheirrespectiveI/Ooperations:
Ifanyserialoutputiswrittenbytheprogram(orthesurroundingEXEC)atstartup,initiating
thefullscreenmodewillfirstenterthe“More…”status.
Theprogramhasexclusiveandtransparentaccesstothe3270terminalduringtherecurring
fullscreen“writescreen“and“receiveuserinput”cycles.
Theprogram“owns”theterminalduringeachsinglecycle,includingthehandlingofall
transmissiontriggeringkeys,soMECAFFsPF‐andPA‐settingsaremeaninglesswhilethe
programownstheterminal.
MECAFFhastheopportunitytoregaincontrolovertheterminalonlybetweenthefullscreen
cycles(i.e.aftertheinputdataresp.stateinfullscreenmodehasbeensenttotheprogram).
AslongasnoserialoutputfromVMoccurs,theenvironmentwillstayinfullscreenmode.
Whiletheprogramownstheterminal,anyoutputissuedasynchronouslybyCP(like“TAPE
181ATTACHED”ormessagesfromotherusers)isbufferedbyMECAFFuntilthefullscreen
cycleiscompletedandMECAFFmayre‐gainownershipontheterminal: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
BasedontheMECAFF‐API,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
theMECAFF‐APIwillsimplybewrittenoutontheterminalinsteadoftheexpectedfullscreensetup
oftheprogram.AsthefirstAPI‐callexecutedwillalwaysbequeryingtheterminaltype,this
commandsequencetoMECAFFwillbedisplayedaswellasaninstructiontextthatshouldbe
followedbysimplypressingENTER:
fs-qry
<{>}T Please press ENTER to cancel fullscreen operation
Inthiscase,theMECAFF‐APIwillrecognizethattheexternalMECAFFprocessisnotpresentandthe
programwillterminatewithanerrormessageandanappropriateexitcode:
** no valid response (terminal probably not connected to a MECAFF)
Ready(00001); T=0.01/0.01 21:23:59
Whentheterminalconnectionislost(theterminalisclosedortheMECAFFprocessisterminated),
theVMsessionisdisconnected.IfaMECAFF‐basedapplicationisinfullscreenmodewhenthis
happens,theprogramwilltrytore‐establishthefullscreensessionwhentheuserreconnectstothe
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 FSQRY–QueryInformations
TheCMScommandFS-QRYliststhecharacteristicsofthe3270terminalemulatorconnectedto
MECAFF,thecurrentdisplayattributesforvisualelementsoftheconsoleandthecurrentPFsettings
oftheMECAFFconsole.

MECAFFManual0.9.7(beta) Page20/65
Thecommandhasthefollowingparameterstospecifywhichinformationtodisplay(optionalpartsof
parametersaregiveninlowercase):
VERsions
listtheversioninformationoftheMECAFF‐processand‐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 >> █
ThemeaningofthelinesissuedbyFS‐QRYshouldbeobviousandsimplyverbalizethe
correspondingfieldsoftheMECAFF‐API.Theline“Max.Screensize”willtellthesizeofthe
alternatescreeniftheterminal“Alt‐Screen”is“yes”or80x24iftheterminalisamodel‐2not
supportinganalternatescreen.
ATtrs
listthedisplayattributesforvisualelementsoftheconsole,theseelementsare:
OutNormal:outputlinesfromVM/370
OutEchoInput:commandsenteredontheMECAFFcommandpromptdisplayedinthe
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
listthesettingsofthePF‐keysoftheMECAFFconsole
internalMECAFF‐commandsassignabletoPF‐keysstartwithanexclamationmark:
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:theterminalisconnectedthroughMECAFFandMECAFFtoolscanbeused
RC!=0:theterminalisconnecteddirectlytoHercules,theMECAFFtoolswon’twork
nooutputiswrittentothescreen.
4.2 FSCTL
TheCMScommandFS‐CTLallowstosetthedisplayattributesforthevisualselementsoftheMECAFF
consoleaswellasthefunctionalityboundtothePFkeyswhentheterminalisownedbytheMECAFF
console.
Thecommandhasthefollowingsyntax(optionalpartsofcommandtokensaregiveninlowercase):
FS-CTL ATTR elem color [ HIGHLight ] [elem color [ HIGHLight ] …]
PF pfno [ cmd-text ]
UsingthesubcommandATTRsetsthecolorandoptionallythehighlightingfortheelementsofthe
MECAFFconsole,whereelemcanbe:
NORMal:outputlinesfromVM/370
ECHOinput:commandsenteredontheMECAFFcommandpromptdisplayedinthe
outputarea
FSBG:outputlinesfromVM/370receivedwhiletheterminalisownedbytheCMS
programinfullscreenmode(temporaryattributeusedtohighlighttheselineswhilein
More…state)

MECAFFManual0.9.7(beta) Page22/65
CONSolestate:stateindicatorinfrontoftheinputpromptoftheMECAFFconsole.
CMDInput:theinputpromptoftheMECAFFconsole.
Thecolorcanbeoneof: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
conditionallyperformMECAFF‐relatedinitializationsonlyiftheterminalisconnected
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
fromthesystem‐wideSYSPROF 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 EXECcandofurtherMECAFF‐relatedoperations,forexamplecustomizethePF
keysoftheMECAFFconsoleandinformtheuserabouttheavailabilityoftheMECAFFfunctionality,
forexample
&CONTROL OFF
FS-CTL PF 2 FSLIST * C
FS-QRY VERSION
&EXIT 0
AsexecutingtheprofileactionistriggeredbyacommandenteredtoCMSinthebackgroundbythe
MECAFF‐process,itwillbeexecutedafterthestandardPROFILEiscompletelyprocessed,sothe
PROFILEwillapparentlyhave2Ready‐messages:
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
2Ready‐messages:

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)filemodeseparatedwithwhitespace(oneormoreblanks):
fnft[fm]
withthedot‐conventionusedbymanyotherOSes,separatingthe3componentswithadot,
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
Asasinglefileidentificationindot‐notationmaybemorethan8charactersinlength,itcanbeused
forinvokingoneofthecommandsEE,FSLISTorFSVIEWonlyiftheextendedparameterlistis
available.
See2.4.2forthepost‐installationoptionstoensurethatthedot‐notationcanbeusedonthe
commandlinebyallMECAFFfullscreenprograms.
4.5 EE–Fullscreeneditor
4.5.1 Introduction
EEisaMECAFF‐basedfullscreeneditorallowingtoeditfileswithaLRECLupto255.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.
AsMECAFFandEEbothsupportnon‐standardterminalscreensizes,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)willbemaderead‐onlyuntilthecommandisfinalizedby
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.thelineinsertedwiththeI‐prefix
command,butthelineafterthedeletionforD/DD‐operation).Ifthislineisdisplayedonthescreen,
thecursorwillbeplacedatthecurrentindentation(ofthelastpreviousnon‐blankline)fortheI‐
commandresp.onthefirstnon‐blankcharacteroftheline.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
Fortheinput‐modeandtheprogrammers‐input‐mode,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,anynon‐alphanumericandnon‐blankcharacter
maybeused(with/beingthetraditionalseparatorcharacter).
DELete [ count ]
Deletecountlinesbeginningwiththecurrentline.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,thefilemodeAisassumed.Whennofile‐idis
given,thefilePUT EE$BUF Aisread.
GETD [ fn [ ft [ fm ] ] ]
[fn[.ft[.fm]]]
LiketheGETcommand,butadditionallydeletingthefileafterinsertingitscontent.
Input [ line-text ]
Ifaline‐textisgiven,anewlinewithline‐textisinsertedaftercurrentlineandthisnewline
becomesthenewcurrentline.
Ifnotextisgivenafterthecommand,EEentersinput‐mode,allowingmultiplelinestobe
enteredaftercurrentlinebydisplayingafreespacebelowthecurrentline.Whenpressing
ENTERafterenteringlines,EEmakesthelastenteredlinetothenewcurrentandstaysininput‐
mode,allowingformorelinestobeentered.Theinput‐modeisterminatedeitherbypressing
theENTERkeywithoutachangeofthefilecontentorbypressingthePF03key.
Theinput‐modehasthefollowingfixedcommandassignmentstoPFkeys:
PF01: TABFORWARD
PF03:QUIT(leaveinput‐mode)
PF13:TABBACKWARD
PF15:QUIT(leaveinput‐mode)
Exceptforchangesinthefilezoneoftheeditor,nofurtheroperationsarepossiblewhilein
input‐mode(nocommands,noPFkeysothersthandescribedabove,noprefixcommands).
Locate target1 [ target2 [ … ] ]
Movethecurrentlinetobethelinespecifiedbythesequenceoftargets.Inmostcases,only
onetargetwillbeused,butseveraltargetsmaybeusedinsteadofconsecutiveLocate
commands.Relativeandabsolutemovesareboundedtothebeginresp.theendofthefile.The
currentlineisonlymovedifthewholetargetsequencecanbeexecuted,i.e.ifgivenline‐marks
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‐
alphanumericcharacterdifferentfromblankandthetarget‐introducingcharacters(+‐:.)can
beusedasseparatorforthesearchstring.
‐/string/
movetothenextlineindirectiontothefilestartcontainingstring.Insteadof/,anynon‐
alphanumericcharacterdifferentfromblankandthetarget‐introducingcharacters(+‐:.)can
beusedasseparatorforthesearchstring.
MARK .c
MARK CLear .c | * | ALL
Set(orreplace)thespecifiedline‐markcresp.removethespecifiedline‐markorallline‐mark(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
Enterprogrammers‐input‐mode.Ifthecursoriscurrentlyinthefileareaortheprefixarea,the
cursor’slineismadethecurrentlinebeforetheprogrammers‐input‐modeisentered.The
PInputcommandisassignedtoPF10perdefault,allowingtostartprogrammers‐input‐mode
directlyfromthefilearea.
Inprogrammers‐input‐mode,asingleemptylineisinsertedafterthecurrentlineandthislineis
madecurrent.AllfilelinesonthescreenareeditableandtheSPLTJOINfunctionalityisavailable
throughPF06/PF18.
AnewinputlineisautomaticallyinsertedwiththeENTERkeywhentextwasenteredonthe
inputlineorwhenthecursorisontheinputline.Wheninsertingthenewinputline,thecursor
isplacedattheindentationofthe(firstnon‐empty)lineprecedingtheinputline,allowingto
enterprogramtextinanaturalwaywhenworkingwithnestedblocks.
PressingENTERwhennotextwasenteredontheinputlineandthecursorwasmovedaway
fromthislinesimplyplacesthecursorbacktotheinputlineattheindentationcolumnwithout
creatinganewinputline.

MECAFFManual0.9.7(beta) Page31/65
Theprogrammers‐input‐modecanbeleftwiththePF03orPF15keys.Ifthecurrentinputline
wasleftunchanged,itisremovedwhenprogrammers‐input‐modeends.
Theprogrammers‐input‐modehasthefollowingfixedcommandassignmentstoPFkeys:
PF01: TABFORWARD
PF03:QUIT(leaveprogrammers‐input‐mode)
PF06:SPLTJOIN
PF10:PINPUT(moveprogrammers‐input‐modetothelineafterthecursor’sline)
PF13:TABBACKWARD
PF15:QUIT(leaveprogrammers‐input‐mode)
PF18:SPLTJOINFORCE
Exceptforchangesinthefilezoneoftheeditor,nofurtheroperationsarepossiblewhilein
programmers‐input‐mode(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,thefilemodeA1isassumed.Whennofile‐idis
given,thefilePUT EE$BUF A1iswritten.
WhenusingPUTforanexistingtargetfile,itwillbeonlybeoverwrittenwhenthefiletypeand
thefilemodearedefaulted(orthedefaultvaluesEE$BUFA1areexplicitlygiven).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.
Howshiftingishandledifnon‐spacecharacterswouldbelost(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;
joinedwiththenextlineifthecursorisplacedafterthelastnon‐whitespacecharacter
oftheline,thefirstnon‐spacecharacterofthenextlinebeingplacedunderthecursor
andthegapfromtheoldlineendtothispositionbeingfilledwithblanks.
Iftheresultinglinewouldbetruncated,thejoinwillnothappen,unlesstheparameter
Forceisgiven.
TABforward
Ifinvokedwhilethecursorisinthefilearea(usuallyviatheassignedPF‐key),thecursoris
movedtothenextdefinedtabfollowingthecurrentcursorposition.Ifnotabpositionisdefined
ontherightofthecurrentposition,thecursorisnotmoved.
IftheTABforwardisinvokedwhilethecursorisinthecommandline,EEattemptstomove
thecursortothefilelineandcursorpositiononthatlinewherethecursorwaslastknowntobe
beforeitwasplacedonthecommandline.Ifthis“lastknownposition”isvisibleonthecurrent
screen,thecursorisplacedthere.Ifthescreenhasbeenscrolledawayfromthislastknown
positionorthisfilelinehasbeendeleted,thenthecursorisplacedinthefileareaonthefirst
columnofthecurrentline.
ThecommandTABforwardisassignedtoPF01perdefault.
TABBackward
Ifinvokedwhilethecursorisinthefilearea(usuallyviatheassignedPF‐key),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,thisfilebecomesthecurrentfilewithoutre‐loadingthefilecontentfromdisk.
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,non‐printablecharacters(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
Thefollowingparameterscanbegivenasscreen‐object:
FILethefilecontent(notbeingthecurrentline)
CURRlinethecurrentfileline
PREFixtheprefixzone
GAPFillthegapbetweenthefilepartandtheprefixresp.thescreenborder
CMDlinethecommandlineinputarea
CMDARRowthearrowbeforethecommandlinearea
MSGlinesthemessageslines(oneline,dynamicallyupto3lines)
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.ifnon‐spacecontentwouldbelostby
shiftingthetexttotheleftbeyondthefirstcolumnortotherightbeyondthelastcolumn(at
LRECL).
Theshiftcommandssupportthefollowingoptionswhenthissituationoccurs:

MECAFFManual0.9.7(beta) Page38/65
CHEckall
iftextlosswouldhappenforanyofthelinestobeshifted,thetextwillnotbeshifted
andtheshiftingcommandisaborted.
MINimal
theshift‐bycountappliedtoalllineswillbereducedifnecessarytoavoidtextlossfor
anyoftheshiftedlines.Thisensuresthattherelativeindentationamongthelinestobe
shiftedwillbepreserved.
ThisisthedefaultifnoSHIFTCONFigcommandisgiven.
LIMit
eachlinewillbeshiftedatmostuntiltheborderisreached,limitingshiftingforeachline
separately.
TRUNCate
thelinesareshiftedbytheshift‐bycountspecified,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.ThiscommandisintendedforaPF‐Keysetting(assignedtoPF11as
default).
Help
Showthetop‐levelhelpforEE.
RECALL
Placethepreviouscommandinthecommandhistory.EEhasahistoryofthelast32commands
issuedonthecommandline.ThiscommandisintendedforaPF‐Keysetting(assignedtoPF12as
default).
4.5.5 CustomizingwithSYSPROFEEandPROFILEEE
TheEEprogramreads2configurationfilesonstartupbeforethefiletobeeditedisread.
Iffoundinoneoftheaccesseddisks,theSYSPROF EEisprocessedfirst,thenPROFILE EE.For
eachofthesefiles,thefirstfilefoundinthesearchorderoftheminidisksisused.
However,thefileSYSPROF EEisintendedtobeonasystemdisk,providingthesystem‐wide
defaults(astheFTDEFAULTSandFTTABDEFAULTSforthefiletypes).ThefilePROFILE EEis
intendedtoprovidetheuserpreferences.
Onlyconfigurationcommands(see4.5.4.4)canbeusedinthesefiles,asnofileisopenedwhenthey
areprocessed(commandsrequiringafileareignored).Thecommandsintheprofilesareexecutedas
iftheyweregiveninthecommandarea,withthefollowingextensions:
Astar(*)asfirstnon‐whitespacecharacterintroducesacommentline,thewholelineis
ignored.
Ifalineendswithabackslashaslastnon‐whitespacecharacter,thenextlinewillbe
concatenatedtothelineatthepositionofthebackslash(howeverleadingwhitespaceofthe
nextlineisremoved).Severallinesintheprofilecanbeconcatenateduptoatotallengthof
512characters.
4.5.6 Rescuemode
WhentheterminalisdisconnectedwhileeditingfileswithEE,reconnectingtotheVMwitha
standardterminalconnection(notusingMECAFF)willpreventEEfromre‐establishingafullscreen
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 FSLIST–Fullscreenfilelist
AfullscreenfilelistcanbedisplayedfromCMSwith
FSLIST file-pattern
or
EE file-pattern ( FSLIST
wherefile‐patternisanyfilespecificationallowedfortheCMScommandLISTFILE(whichisinfact
calledtogetthefilelist).ThefilepatterncanbegivenwiththestandardCMSconvention
(componentsseparatedwithwhitespace)orthedot‐notation(see0).TheEEeditorprovidesaFSLIST
subcommandwiththesamefunctionality.
BrowsingthroughthefilelistandleavingFSLISTiscontrolledwiththePF‐keys(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
column‐specconsistsofoneoftheafter‐mentionedkeywords,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
QQUITALL
EXIT
FSLIST
PF2
PF3
4.7 FSVIEW–Fullscreenfilebrowser
ACMScanbebrowsedfromCMSwithFSVIEWwith
FSVIEW fn fm [ ft ]
fn.ft[.fm]
or
EE fn fm [ ft ] ( FSVIEW
fn.ft[.fm] ( FSVIEW
IfafileloadedintoFSVIEWcontainsbinarycharacters(codes0x00to0x3For0xFF),thesecharacters
arereplacedwithadot(‘.’)inthefilebuffer.
BrowsingthroughthefilecontentandleavingFSVIEWiscontrolledwiththePF‐keys(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
FSVIEW
PF2
FSVIE
W
PF2
PF3
PF2
PF3
4.8 FSHELP–Fullscreenhelp
ThefullscreendisplayofastandardHELPtopicisinvokedfromCMSwith
FSHELP topic
Thislooksforafiletopic HELPxxxondiskU(withxxxoneofCMD,DBG,EE,EDT,EXCorREX)
anddisplaysit.Iftheadditionalhelpfileexists(topic HELPxxx2 U),itisappendedtothe
displayedcontent.
FSHELPallowstonavigatetootherhelptopicseitherwiththesubcommandHelp topicorby
placingthecursorinawordofthedisplayedhelptextandpressingthePF01key.Thetopicsopened

MECAFFManual0.9.7(beta) Page44/65
arestackedinalast‐in‐first‐outmanner: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
withthePF‐keys(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
TheMECAFF‐APIconsistsasetofCroutinesdefinedinthefileFSIO HandimplementedbytheC
moduleFSIO Candacompanionassemblefile(WR3270 ASSEMBLE).
Thefollowingroutinesarebasicallyprovidedtofullscreenapplications:
1. Queryterminalinformation
2. Fullscreenwrite
3. Fullscreenread
FurtherroutinesallowmanagingtheMECAFFconsoleandtheownershipofthescreenafterentering
fullscreenmode.
AnapplicationusingtheMECAFF‐APIshouldfirstquerytheterminalcharacteristicstoverifythat
fullscreenoperationsarepossibleandtosetupinternaldata.
However,thisisnotastrictrequirement,asthefullscreenoperationswillchecktheMECAFF
connectionifthestepwasskipped.Butinthiscase,theapplicationshouldsticktominimal3270
defaults(monochrome80x24screen)andnotusetheEWA3270CCWcommand,asthepresence
andsizeofthealternatescreenisunknown.
IftheVMisnotconnectedtoMECAFF,theinternalcommunicationoftheMECAFF‐APItoquerythe
terminalcharacteristicswillsimplybewrittenoutontheterminal.Thiscommandsequenceto
MECAFFcontainsaplaininstructiontextthatshouldbefollowedbysimplypressingRETURN:
<{>}T Please press ENTER to cancel fullscreen operation
DoingsoallowstheMECAFF‐APItoreturntheappropriatereturncodetotheapplication,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
otherMECAFF‐APIroutinesmaybeused:
Thereturnedvalue0meansthatthequerywassuccessfulandthatfullscreenoperationscan
beperformedthroughtheMECAFF‐API.

MECAFFManual0.9.7(beta) Page47/65
Anyvaluedifferentfrom0meansthatnovalidresponsecameinforthequery(noMECAFF
processorsomeotherinternalprotocolerror).
TheMECAFF‐APIshouldnotbeusedforfullscreenoperations.
TheinputparametertermNameLengthhastocontainthetotallengthofthebufferpassedas
termName.Allotherparametersareoutputparametersandfilledby__qtrmifthereturncodeis0
(ifthecallissuccessful).Thevalueswrittentotheoutputparametershavethefollowingmeaning:
termName
theterminaltypename,thebufferwillbenull‐terminatedandcontainupto
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,withthevalues3270forGRAF‐styleand3215forCONS‐style.
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:re‐querytheterminalinformationandretry
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(query‐onlyread),theterminal
ownershipwillstaywiththeapplicationforagraceperiod,allowingtheprogramtokeepthe
terminalinfullscreenmodewhiledoingbackgroundcomputations.Afterthegraceperiod,
theMECAFFconsolemayregaintheownershipifnecessary,allowingtodisplayserialoutput

MECAFFManual0.9.7(beta) Page49/65
fromtheVMthatarrivedwhiletheterminalwasinfullscreenmodeorarrivesafterthegrace
periodiftheprogramdidnotre‐acquireownershipbystartinganewfullscreencycle.
Thedefaultgraceperiodis3secondsandcanbechangedwiththeMECAFF‐APIforsubsequent
asynchronousreads.Additionally,thefullscreenprogramcanexplicitlyreleasetheownershiponthe
terminalandgiveitbacktotheMECAFFconsole.
5.3.1 Standard(synchronous)Read
Astandardsynchronousfullscreenreadisinitiatedwithacalltothefunction__fsrd.
MECAFFunlockstheterminalskeyboardandwaitsfortheusertopressoneofthekeystriggeringthe
transmission(ENTER,PF‐Keys,PA‐Keys,…).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,firstre‐gainscreenownershipbydoingafullscreenwrite(usinganEWorEWA
CCWcommand).
Returncode=2
Fullscreensupportisunavailable(notconnectedtoaMECAFFprocessorsomeotherinternal
protocolerror).
Returncode=3
Possiblyrecoverablecommunicationproblem:re‐querytheterminalinformationandretry
withaEWresp.EWAfullscreenwrite.
Otherreturncodes
protocol‐error,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,firstre‐gainscreenownershipbydoingafullscreenwrite(usinganEWorEWA
CCWcommand).
Returncode=2
Fullscreensupportisunavailable(notconnectedtoaMECAFFprocessorsomeotherinternal
protocolerror).

MECAFFManual0.9.7(beta) Page51/65
Returncode=3
Possiblyrecoverablecommunicationproblem:re‐querytheterminalinformationandretry
withaEWresp.EWAfullscreenwrite.
Otherreturncodes
protocol‐error,abortprogram
5.3.3 Graceperiodsetting
Thegraceperiodforsubsequentcallsto__rsrdp()canbesetwiththeroutine__fsgp().
void __fsgp(unsigned int gracePeriod);
Thegraceperiodisspecifiedin1/10seconds.ThevaluespassedwillbeboundedbyMECAFFtothe
graceperiodrangesupported,currently1/10to10seconds(i.e.values1to100forgracePeriod).
5.3.4 Releasefullscreenterminalownership/cancelfullscreenmode
Aprogramcanexplicitlyterminatethefullscreenoperationbyreleasingtheownershiponthe
terminal(withouthavingtowaitfortheexpirationofatimeoutorthegraceperiod).
Callingtheroutine__fscncl()allowsMECAFFtoreturnimmediatelytoconsoleinteractionwith
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);
ThevaluesmecaffMajor,mecaffMinorandmecaffSubindicatetheversionoftheexternal
MECAFF(Java‐)process,thevaluesapiMajor,apiMinorandapiSubindicatetheversionofthe
CMS‐sideAPIimplementation(i.e.FSIO).
ThereturnvalueindicatesiftheterminalisconnectedthroughaMECAFFprocess(true)andthe
versiondatafortheMECAFFprocessaremeaningfulornot(false).
5.5 MiscellaneousOperations
TheMECAFFAPIdefinessomeadditionalinternaloperationsintendedforthetoolsFS‐QRYand
FS‐CTL,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() andCMScommand().
TheFSIO TEXTiscompiledbyGCCwiththeCMSoption.Thereare2optionswhenlinkinga
MECAFFbasedapplication:
CompiletheCmoduleswiththeGCC‐optionLIB GCCLIB(ortheCMSshortcut‐option)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
MostPFkeysswitchbetweenspecificusagemodesoftheMECAFF‐APIcalls,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(round‐trip)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(includingFS‐QRYandFS‐CTL)whilerecordinga
consoleprotocolwithCPSPOOLCONSOLE,theprotocolwillcontaintheencoded
communicationbetweenthefullscreenprogramsandtheexternalMECAFFprocess.This
maybeinteresting,butitprobablywon’tbewhatwasintended,astheconsoleprotocolwill
befilledupwithunreadableclutter.
6.2 MECAFFconsole
VM/370(resp.CP)usesdifferentinteractionandpresentationmetaphorsfortheVMconsole
dependingontheterminaltypeconnectedtotheVM.Whilesomeofthetypicalbehaviorcanbe
normalizedbyMECAFF(likepasswordpromptswithCONS‐style),atleastthefollowingdifferences
betweenthe2connectionstylesremain:
Login
o GRAF‐style:aswith3270terminalsdirectlyconnectedtoVM/370,theENTERkey
mustfirstbepressedtogettheinitial“CPREAD”prompt.
o CONS‐style:thelogincommandmaybeenteredwithoutfirstgettinga“VMread”
prompt.
Promptingforinput
o GRAF‐style:theMECAFFpromptstates“Running”,“VMread”and“CPread”have
thesamemeaningasfor3270terminalsdirectlyconnected,the“Enterpwd”stateis
synthesizedfroma“CPREAD”VM‐statewithaninvisible‐textinputfieldforthe
commandprompt.
AsforplainVM/370,a“Running”statecanmeanthataprogramisworking(not
expectinginput)orthattheVMisidleandwouldacceptaCMSorCPcommand.
o CONS‐style:the“Running”,“VMread”and“Enterpwd”statesaresynthesizedbased
onthepromptstringissuedbyHercules(isthesystemexpectinginput?)andthelast
textlinewrittenbytheVM(isitexpectingapassword?).
Sothe“Running”statemeansthataprogramisworkingandnoinputiscurrently
expected(althoughtypeaheadandsendingthenextinputispossible).
However,thereisno“CPread”promptwithCONS‐style.
StandardCMSpseudo‐fullscreenprograms(EDIT,FLIST,…)
o GRAF‐style:programswhichusetheVM/370R6limitedsupportfor3270terminal
willtrytodofullscreenwrites,sinceMECAFFconnectsasa3270terminal.
Thesewriteswillsucceedfromtheprogramspointofview,butMECAFFwillattempt
toserializethoseoutputs,whichwilllookunusualifthe3270terminalis80columns
wide(asnolineaddressinghappensandconsecutivewriteswillnot
overlap/overwriteonthe80x24displaycells)andwillbeunreadableiftheterminal
hasmorethan80columns(automaticwrappingwillnotoccurwheretheprogram
expectedit)
o CONS‐style:asMECAFFconnectsasa(non‐3270)serialterminal,thoseprogramswill
probablynottrytousefullscreenwritesandfallbacktoplainlineorientedmode
(likeEDITdoes)

MECAFFManual0.9.7(beta) Page55/65
Wideterminals(morethan80columns)
o GRAF‐style:lineswiderthan80charactersperlinearenotwrappedbytheterminal,
butCPsplitslinesin80characterchunkswhicharepositionedseparatelyonthe
3270screen.
SodoingaTYPEonafilewithupto130charactersperlineonamodel‐5terminal
(132columns)willnotwritethelinesnicely,butwrappingwillseemtooccurat
column80.Anythingbeyondthe130‐thcharistruncated(dropped).
MECAFFcanonlyoutputthe80characterchunksastheyaresentbytheVM.
o CONS‐style:onserialterminals,CPdoesnotinsertlinewrapsatcolumn80,so
outputonawideterminalhasmoresimilaritywiththefile.Howeverlineswillstillbe
truncatedafterthe130‐thchar.
Stoppingaprogramfrom“More…”
o GRAF‐styleconnections:WhenstoppingaprogramwiththePA3‐Key(sendinganHX
immediatecommand,see3)whileitsoutputisheldin“More…”status,thenext
commandissuedtoCMSwillABEND,requiringtore‐IPLCMS.
ThisisnotMECAFFspecific,asthesamebehavioroccurswhenconnectingthe3270
terminaldirectlytoVM/370.However,thismaybeaproblemspecificto3270
sessions,asitdidnotshowupwhenconnectedinCONS‐style.
6.3 EE–Implementationlimitations
EEcurrentlyhasnochecksforrunningoutofmemory,soeditingverylargefilesmayleadtoABENDs
andthelossoffilemodifications.Assuming14Mofavailablememory(fora15MVM)andanedited
filewithLRECL255(themax.valuesupportedbyEE),thisallowsroughlyfor50.000lines(including
internaloverhead).
EEisimplementedinCusingthenativeClibrary(GCCLIB).Probablyduetomisunderstandingsof(or
wronglyusing)thenativeCAPIresp.tolimitationsoftheunderlyingCMS,thefollowingproblems
occurinthecurrentimplementationforsavingfileswithvariablerecordlength(RECFMV):
Writinganemptyline(linelength=0)withCMSwriteFileresultsinreturncode8andno
lineiswritten,leadingtoafilewhereallemptylinesdisappeared(ifrc8isignored).
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
Multi‐fileeditingcapability,includingprefixblockoperationsbetweenfiles
(sourceandtargetofcopy/moveoperationsindifferentfiles)
IntegrationofFSLISTwithEE,allowingtouseFLISTtoopenafileforediting
Handlingofdisconnectandreconnectiontoanewterminal(re‐establishfull‐
screensession,withfallbacktoarescuesessionifnotconnectedviaMECAFF)
o Newcommands
EEditfn[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[line‐text]
(optionaltextafterthecommandwillinsertanewlinewiththetextinsteadof
enteringinputmode)
o Newprefixcommands
" (duplicateline)
""..""(duplicateblockoflines)
o Bugfixes
DDprefixcommand:definingtheboundariesofaDD‐blockindifferentround‐
trips(differentscreens)nolongerleadstorepetitiveerrormessagesforcingEE
outoffull‐screenmode
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
MECAFF‐Process/MECAFF‐API
o Newfunctionality
GRAF‐style:
o MECAFFnowemulatesaminimal3270model4(80x43geometry)insteadof
model2(with80x24geometry)
‐supportforall3270modeltypes(2and4)configurableinDMKRIO
‐all3270linesofaVM/370R6underHerculesmachinecannowbeused
o supportforLU‐names(groupnamesinHercules)
‐connectionsfromMECAFFtoHerculescanoptionallybeboundtoagroupof
3270lines
‐adefaultLU‐namecanbegivenonthecommandlinefortheMECAFFprocess
‐thisdefaultcanbeoverruledbyaLU‐nameoftheconnectingterminal
‐ifnoLU‐nameisspecified,theMECAFFconnectionisboundtoanarbitrary
deviceassignedbyHercules(asinMECAFFversionsbefore0.9.3)
newcommandlineparameter–vmLUNamefortheexternalMECAFFprogram
API:
o additionalvariantsforfullscreenreads,supporting
‐pollingread/queryavailabilityofuserinput,allowingasynchronousprocessing
‐timeoutread,returningcontroltotheprogramafterthetimeintervalifnouser
inputoccured
o newAPIcalls:
__fsrdp():polling/time‐outfulllscreenread
__fsgp():setgraceperiodforterminalownershipafter__fsrdp()
__fscncl():cancelfullscreenoperation(releaseterminalownership)
o newsampleprogramFSRDTEST(Csourceandexecutable)
o Bugfixes
API‐Call__fsrd():
fix:rc4(protocolerror)isnowreturnedwhenevertheinputbufferistoosmallforthe
3270inputstreamreceived
symptom:passingoutbufferlength<=0locksupcommunicationwiththeMECAFF
process
GRAF‐modeconnectionstoVM
fix:raceanddeadlockconditionsremovedinbackgroundMORE[HOLDING]
RUNNINGhandshake,occurringmostlywhenoutputtinglargeamountsoflineson
TN3270‐emulatorsallowingfastAIDkeystrokes(whichdonotensureaminimaltime
intervalwhensendingconsecutiveuserinputs,unlikewc3270/x3270)
symptom:pressingENTERinafastsequencecouldlockupthehandshakemechanism
forthesession,preventingfurtheroutputfromVM/370onthatterminal
GRAF‐modeconnectionstoVM
fix:introductionofminimaltimeintervalsbetweeninputsenttoVM,bothforinternal
handshakinginput(ENTER‐AidforMORE‐>HOLDINGorCLEAR‐Aidfor
MORE|HOLDING‐>RUNNING)andforuserinput
symptom:fastinputtoVM(e.g.CLEARthenENTERinlessthan1ms)canleadtoa
quantum‐physicalstateoftheVMafterFORCE‐ingit,astheuserseemstobeboth
loggedoffandon:
‐QUERYuserandFORCEuserclaimthatthisuserisnotloggedon
‐QUERYNAMESliststheuseraloggedon
‐tryingtologonclaimstheuserisstillloggedon

MECAFFManual0.9.7(beta) Page59/65
MECAFF‐Console
o Newfunctionality
attributesettings(color,highlight)forvisualelementsoftheconsolecannowbe
queried(CMScommandFS‐QRY)andmodified(newCMScommandFS‐CTL)
settingofPF‐keyscannowbequeried(CMScommandFS‐QRY)andmodified(new
CMScommandFS‐CTL)
FS‐QRY
o Newfunctionality
Nowallowstolisttheterminalcharacteristics(aspreviousversions,subcommand
TERM),thedisplayattributesoftheconsole(subcommandATTRS),thePF‐keysettings
(subcommandsPFKEYS)oralltheseinformations(subcommandALL)
AlsoallowstosimplyqueryiftheterminalisconnectedviaMECAFFandreturnthe
stateintheexitcode(returnstatus0or1)
FS‐CTL
o Newcommand
SetthedisplayattributesforvisualelementsoftheMECAFFconsole
SetthecommandissuedthroughtheMECAFFconsolewhenpressingaPFkeyis
pressed,eitherascommandsenttotheVMorprocessedinternallyintheconsole(like
pagingthroughtheoutputhistoryetc.)
EE
o Bugfixes
Prefixcommandsingle‐lineduplicate("):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
MECAFF‐Process
o Bugfixes
DependencyoftheJREsetuptype
symptom:theMECAFF‐consoledoesnotworkatall(hangsaftershowingtheHercules
connectionscreen,ignoringanyinputfromkeyboardoroutputfromVM/370)when
theJavaruntime(JRE)wasinstalledwiththenetinstallationsetupinsteadofthefull
installationsetup.Thenetsetupisasmallfilewithabout900KB,whichdownloadsthe
remaining11MByteoftheJREsetup,thefullsetuphasabout16MByteinasinglefile
(allsizesforWin32);asthesizedifferencesuggests,thenetsetupseemstobeasubset
ofthefullinstall,atleastmissingtheEBCDICcharsetsupportrequiredbyMECAFF.
fix:MECAFFnolongerreliesontheJavabuilt‐intextconversion,butnowusesitsown
internaltranslationtablesforEBCDICASCIIconversion(bracketEBCDICcharset).
MECAFF‐Console
o Newfunctionality
ThePF01keynowissuestheCMScommandFSHELPasdefault,openingthe(new)help
menupage(seebelow).
FSHELP
o Supportfornavigationtoanewhelptopicbymovingthecursortoawordinthecurrent
helptextandpressingthePF01key.Ifavailable,thehelptopiccorrespondingtotheword
underthecursorisopened.
Thehelptopicsarestackedinalast‐in‐first‐outfashion:thePF03keynowclosesthe
currenthelptopicandreturnstotheprevioustopic.Closingthefirst(initial)topic
terminatestheFSHELPprogram.Theprogramcanbeleftfromanytopiconthestackwith
thePF15key(generallytheshift‐PF03keycombination).
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
MECAFF‐Process/MECAFF‐API
o accesstoversionnumbers(Major.Minor.Sub)oftheconnectedMECAFFprocessandofthe
MECAFF‐APIthroughthenewAPIcall__fsqvrs()
o LinkingagainstPDPCLIB:aminimalversionoftheGCCLIBisnowprovided,allowingtouse
theMECAFF‐APIwiththePDPCLIB
FS‐QRY
o newcommandlineparameterVERsionstooutputtheversiondataoftheconnected
MECAFFprocessandtheMECAFF‐API
EE
o Newfunctionality
NewSubcommands:TABforward,TABBackward,TABSet,FTTABDEFaults
Supportforsoftwaretabstops:
‐TABSet(re)definestabstopsforthecurrentfile
‐FTTABDEFaultsdefinesdefaulttabstopsforafiletype
‐tabpositionscurrentlydefinedaremarkedonthescaleline
Movingthecursortoatabpositionissupportedinthefileareafornormaledit
mode,forinput‐modeandforprogrammers‐input‐mode:
‐TABforward(PF01)movescursortothenexttabposition
‐TABBackward(PF13)movescursortotheprevioustabpositionorthefirst
column
Ifinvokedfromthecommandline,TABforward(PF01)movesthecursortothe
lastknowncursorposition(filelineandcolumn)inthefileareaortothecurrent
lineifthelastknownfilelinepositionisnotvisibleorwasdeleted.
Newsubcommands:SHIFTandSHIFTCONFig
SHIFTCONFigCHEckall|MINimal|LIMit|TRUNCate[shiftBy]
definethedefaultshiftbehaviorwhentheshiftedtextreachesalineborderand
thedefaultshiftcount
SHIFT[by]Left|Right[count|:line|.mark][shiftMode]
shiftlinesaroundcurrentlineleftorright,truncatingorlimitingtoborders
Newmode:programmers‐input‐mode
NewcommandPInput,assignedperdefaulttoPF10
addsasinglenewlinewiththeindentationoftheprecedinglineonentering
PInputresp.oneachEnter‐Keyifthecurrentlinewasmodifiedornootherline
waschanged
allfilelinesonscreencanbeeditedinadditiontothecurrentinputline
programmers‐input‐modehasownfixedPFsettings:
‐PF01/PF13:TABforward/backward
‐PF03/PF15:leavePInput
‐PF06:SPLTJOIN
‐PF10:movePInput‐lineafterthisline(ifcursorisinthefilearea)
Newsubcommands:SEArchnextandR[EV]SEArchnext
SEArchnext(boundperdefaulttoPF04,withshortcut:/):
‐ifthelastLOCATEcommandhadexactlyonetargetspecifiedassearchpattern
‐repeatprevioustextsearchinthelastsearchdirection(downorup)

MECAFFManual0.9.7(beta) Page62/65
REVSEArchnext/RSEArchnext(boundperdefaulttoPF16,withshortcut:‐/):
‐ifthelastLOCATEcommandhadexactlyonetargetspecifiedassearchpattern
‐reversethesearchdirectionandrepeatprevioussearchinthenewdirection
Newprefixcommands
singlelineshift:<,>
blockoflinesshift:<<..<<,>>..>>
shiftprefixcommandscanhaveoptions:[1..9][?|:|!|#]
1..9:shift‐bycount,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)arenon‐standard
helpfiletypesHELPEEandHELP_EEsupportedbyFSHELPonly
EE
o Bugfixes
ABENDafterSplitJoininprogrammers‐input‐mode
symptom:afterappendingthecurrentinputlinetothepreviouslinewithaSplitJoin
(PF06/PF18),theinputlineoftheprogrammers‐input‐modedisappearsandEEcrashes
(ABEND)whenleavingtheprogrammers‐input‐modewithPF03.
fix:anewinputlineisgeneratedifthecurrentoneisjoinedawaywithSplitJoin.
misplacedinputlineafterSplitJoininprogrammers‐input‐mode
symptom:aftersplittingthecurrentinputlinewithaSplitJoin(PF06/PF18),the
inputlineoftheprogrammers‐input‐modeisplacedbetweenthefirstandsecondline
ofthesplit,whichisunexpected.
fix:thenewinputlineisnowinsertedbehindthesecondlineofthesplit.
o Newfunctionality:
NewSubcommandHelp:Showthetop‐levelhelptopicforEE
FSLIST
o Bugfixes
PF‐Keys
symptom:thePF‐keysPF06toPF09scrolledthedoubledistance,asthehandling
routineforscrollingwascalledtwice.
fix:redundantcallingthementionedroutineintroducedwithcodechangesfor
repeatingthelastsearchwasremoved.
o Newfunctionality:
NewSubcommandHelp:ShowthehelptopicforFSLIST
FSVIEW
o Newfunctionality:
Horizontalscrolling:
iftheLRECLofthefileislargerthanthelinewidthavailableonthescreen,onlythe
firstcolumnsfittinginthespaceavailableweredisplayed.
Thefilecontentcannowbescrolledhorizontallyinsidetheusablescreenwidthwith
thefollowingPFkeys:
‐PF11:movethefirstdisplayedcolumnofthefileby20positionstotheleft
‐PF12:movethefirstdisplayedcolumnofthefileby20positionstotheright
Shiftingthehorizontalscreenspaceoverthefilecontentisboundedtothefilewidth
(LRECL).
Thefileformatandthecurrentlyvisiblecolumnrangeisshownintheheadline.
NewSubcommandHelp: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(soFS‐QRYwillnotblockifthe3270terminalemulatorisdirectly
connected).
o Synonyms
anewpartoftheMECAFFinstallationisalsoaSYNONYMfileallowingtoregisterthealiases
FSLISTandFSVIEWfortheEEcommand.Thesesynonymsareintendedasreplacementsfor
thecorrespondingEXECs.
ThesynonymtableisautomaticallyregisteredbyCKMECAFFiftheMECAFFprocessis
present.
MECAFFprocess
o Bugfixes
protocolerrorreportedbyfullscreensynchronousreadafternon‐synchronous_fsrdp()
symptom:somecombinationsofasynchronousfullscreenreaddirectlyfollowingan
asynchrounousreadleadtoaprotocolerror(returncode2)afternouseractivityinthe
graceperiodoftheasynchrounousread
fix:thegraceperiodcounterisnowresetinallcaseswhenasynchronousreadoccurs,
preventingthestatemismatchduetothewronggraceperiodtimingout.
TheWCC‐bytes(WriteControlCharacter)fortheW‐,EW‐andEWA‐commandsin
outboundstreamsarenowtranslatedwiththe32706‐bitencodingschemetoprovide
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
responseoftheWSF‐Queryissuedduringthetn3270negociationphase(ifthepara‐
meter‐noDYNAMICisnotspecified).Thedefaultvaluefortheminimalcolorcountis4.
o Supportfor3270emulatorswithoutextendeddatastreamsupport
iftheterminaltypetransmittedbytheemulatorduringthetn3270negociationphasedoes
notindicatethattheterminalsupportsextendeddatastreams(i.e.theterminaltypename
doesnotendwith‘‐E’),MECAFFwillnotattempttoquerytheterminalcapacitieswithan
extendeddatastreamquery,stickingtothedefaultcapabilitiesasidentifiedbytheterminal
type(e.g.24x80,nocolors,noextendedhighlightingifitisaIBM‐3278‐2)

MECAFFManual0.9.7(beta) Page65/65
EE/FSVIEW/FSLIST
o Bugfixes
FailureswhenopeningfileswithLRECL>255
symptom:tryingtoeditorbrowsesuchfilesfromthecommandlineorfromtheFSLIST
moderesultedindifferenterrors,rangingfromsimplyclosingtheprogramwithouta
messageorwithmessagesaboutoverwrittenmemoryblocks(eitherbyDMSFRETor
bytheEE‐internalmemorymanager)uptoABENDs
fix:theinternalstatehandlingforthefiletobeopenedhasbeencorrected
o Modifications
fileidentificationscannowbespecifiedeitherwiththetraditionalCMSconvention
fnftfmorwiththedot‐notation(usedbymanyotherOSes)fn.ft.fm(i.e.the3file‐id
componentscanbeseparatedwithwhitespacesordots,evenmixed)
whenspecifyinganewfile‐id(orpatternforFSLIST)itispossibletoreference
componentsfromthecurrentcontextwiththeequalsign(=),forexample:
‐ whileeditingthefileFOO C A1,specifying= hwillopenFOO H A1
‐ havingthepatternX* MODULE SinFSLISTandgivingl =.=.awilllist
thefilesX* MODULE A
iffile‐idswiththedot‐notationaretobeusedontheCMScommandline,theEXECsfor
FSLISTandFSVIEWwillnolongerwork,asthecommandlineistokenizedbytheEXEC
interpreterto8characterchunks,whichwilltruncatemostusefulfile‐idsindot‐
notation.
UsingthesynonymsforEEinsteadoftheEXECsresolvesthisproblem(atleastunder
VM/370R6SixPack1.0ornewer).Seesection2.4.2forinstallationoptions.
EE
o Newfunctionality
Newprefixcommand@
markingalinewiththisprefixcommandtellsEEtoignoreanymodificationsmadeto
thisline(thisisveryusefulifanEEcommandwasenteredbyinadvertenceinthefile
areainsteadofthecommandpromptline)
o Modifications
commandsPGUPandPGDOWN
thesecommandsnowacceptanumericalparametertodefinethepagingheighteither
aspercentageofapageheightoraspageheightminusanumberoflines;
thekeysPF19andPF20arenowboundtoscrollupresp.downby2/3ofascreen
prefixcommands
afterexecutingaprefixcommand,EEnowtriestopositionthecursorinthefilearea,
withthelineselectedforplacementdependingontheprefixoperationandthecursor
beingonthefirstnon‐blankcharacterofthelineresp.preservingtheindentationfor
theinputprefixcommand