12.07.2015 Views

RTE (Realtime Transaction Environment for TradExpress ©Generix)

RTE (Realtime Transaction Environment for TradExpress ©Generix)

RTE (Realtime Transaction Environment for TradExpress ©Generix)

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>RTE</strong> (<strong>Realtime</strong> <strong>Transaction</strong> <strong>Environment</strong> <strong>for</strong> <strong>TradExpress</strong> <strong>©Generix</strong>)- unofficial cheat table -Process controlbackground(tCommand,taArgs, tStdin,tStdout, tStderr)exec(tCommand, tArg1, ..., tArgN)exit(nexitCode)spawn(tOriginal,tRemoved,tReplacements)system(tCommandLine)Text handlingbuild(pirnt lists)compare(tObject,tWildcard)index(tOriginal, tSearch)length(tText)number(tNumText)peel(tOriginal, tExtras)replace(tOriginal,tRemoved,tReplacements)split(tSource, taArray,tSeparator/regularexpression)strip(tOriginal, tExtras)substr(tOriginal,nPosition, nLength))toupper(tOriginal)tolower(tOriginal)File handlingclose(tFile)copy(tSource,tDestination)link(tOriginal, tLink)redirect(stream, tFile)rename(tOldname,tNewname)Outputdebug(print lists)edierrorlist(MESSAGE/SEGMENT)edierrordump(MESSAGE/SEGMENT)flush([taMatrix], nMin,nMax, tLinesep)log(print lists)print(print lits)put([taMatrix,] nLine,nPos, print item)Inputload([nMode,] tSrcFile,taArray [,tMultisep[,tSeparator]])pick(nLine, nPosition,nLength)read(tFile)time([TIME] [,tFormat])TimeDatabase accessfind(tDatabase, filter)new( tDatabase)Multi purposeremove(tFile/[ARRAY])valid(MESSAGE/SEGMENT)Segment look-aheadbfPeekSegment(text array, [group/occurrence.spec.],name, number)Basic typese data elementg group symbolm message variablemMESSAGE, mVERSIONmRELEASE, mAGENCYc static counters environment variableo command line optionp parameterf filet text variablen numeric variableb boolean variableta an array containing text itemsna an array containing numeric itemsba an array containing boolean itemstf function returning textnf function returning a numberbf function returning a boolean value_PARAMFILE__FILE__INDEX_Special parametersKey wordsARGC, ARGVEOL, EOTNLINPUT, OUTPUT, LOGGINGAND, OR, NOTFALSE, TRUEEMPTYRETURNMESSAGE, SEGMENT, GROUP,LINEBULDING, RECEIVINGBreak, continue, next statementsBREAK, CONTINUE, NEXT, NEXTMESSAGEFile attributes (fFile.ATTRIBUT)EXISTNAME, PATH, FULLNAMEOWNER, GROUPSIZE, LINESATIME, MTIME, CTIMEREAD, WRITE, EXECTYPE, CONTENTBoolean expression5 > nVar12.43 < nVar15 = nVar«test» tVarbVar = TRUEnot taVarTab[1] = tVarv3.0, 26/11/2013 http://jerome.kerninon.fr/


Control statementif boolean expression then!else!endifLoop statementswhile boolean expression do!endwhilewhile tIndex in taArray do!endwhilewhile tValue in taArray[tindex] do!endwhilewhile fFile in tFilename do!endwhilewhile database entry in filtered database do!endwhileSwitch statementswitch tSelectorcase tOption1:!default :!endswitchbegin!endbegindefault!endefaultend!endendStatements listsline(EOL:"LAST") line("HEAD")! !endlineendlinesegment UNH!endsegmentfunction tfFoo()!return tRetourendfunctionCommand linelogaddlogchangelogcreatelogremovelogviewlstool function -s sysname [-f sysname.cfg] [-L fieldlist][-l headerlines] [-q] [-v] [-N]Function :build, reconfig, relabel, convertcheck, salvage, fix, pack, fixhints, orderfree, rmunrefdump, modified, created, fileds, statusliste, insert, delete, changeExamplessegment UNHif not valid(MESSAGE) thennError++edierrordump(MESSAGE)nextmessageendifif bfPeekSegment(taPeek, "1", 2, "NAD", 1) thenif taPeek["C082.3039"] = "123456789" thenlog("NAD g1 présent", NL)nextendifendifif bfPeekSegment(taPeek, "15", 1, "19", 1, "MOA", 1) thenlog("MOA g15,g19 présent", NL)elselog("pas de MOA g15,g19", NL)endifredirect(LOGGING, SYSLOG.l)endsegmentsegment DOC g3,g4switch eC002.1001case "730":tVar1 := build(e1004:R035.35)default :SYSLOG.USE<strong>RTE</strong>XT32 := "Warning"edierrordump(SEGMENT)log("Warning : ",eC002.1001 ,NL)endswitchendsegmentdefaulttLine := pick(1, 1, EOL)remove(taResult)nOccur := split(tLine, taResult, ";")if nOccur > 0 thenlog(time("%Y%m%d%H%M%S"))log(" field 1", taResult[1], NL)endifenddefault$lstool check –s syslog$logview –s syslog –D trace.log –i $logview -s syslog -f PARTNER=TEST CREATED CONNECTIONv3.0, 26/11/2013 http://jerome.kerninon.fr/

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!