Skip to main content
Skip table of contents

%Variables% in *SERVER Module

The following variables (%NAME%) can be used in process automation and when creating workflows in the *SERVER module. They stand within a command parameter as placeholders and are replaced by the corresponding values at runtime.

NameDescriptionApplication examplesExamples - triggered values
%IFSPATH%The path name of the IFS file selected for processing.RPLSTRIFS FRMPATH('%IFSPATH%')  FRMIFSFILE('%IFSFILE%') REPLACE((HEX25 *CRLF))

RPLSTRIFS FRMPATH('/home/ieffect/edi/in') FRMIFSFILE('invoic.edi') REPLACE((HEX25 *CRLF))

%IFSFILE%The file name of the IFS file selected for processing.RPLSTRIFS FRMPATH('%IFSPATH%')  FRMIFSFILE('%IFSFILE%') REPLACE((HEX25 *CRLF))RPLSTRIFS FRMPATH('/home/ieffect/edi/in') FRMIFSFILE('invoic.edi') REPLACE((HEX25 *CRLF))
%IFSFILEBASE%The base file name (file name without path and extension) of the IFS file selected for processing.RUNMAP TOPATH('%OUTPUTPATH%/%IFSFILEBASE%_%TIMESTAMP%.edi')

RUNMAP TOPATH('/HOME/IEFFECT/EDI/OUT/orders_2021-02-01-17.05.32.897245.edi')

%DB2FILE%The file name of the DB2 file selected for processing.CPYF FROMFILE(%DB2LIB%/%DB2FILE%) FROMMBR(%DB2MBR%)  CPYF FROMFILE(EDIIN/ORDERS) FROMMBR(ORDERS)  
%DB2LIB%The library name of the DB2 file selected for processing.CPYF FROMFILE(%DB2LIB%/%DB2FILE%) FROMMBR(%DB2MBR%)  CPYF FROMFILE(EDIOUT/INVOIC) FROMMBR(INVOIC)  
%DB2MBR%The partial file name of the DB2 file selected for processing.CPYF FROMFILE(%DB2LIB%/%DB2FILE%) FROMMBR(%DB2MBR%)  CPYF FROMFILE(EDIOUT/DESADV) FROMMBR(DESADV)  
%SPLFILE%The name of the spool file selected for processing.CHGSPLFA FILE(%SPLFILE%)  JOB(%JOBN%/%SPLUSER%/%SPLJOB%)  SPLNBR(%SPLFILNR%)CHGSPLFA FILE(INVNEW1)  JOB(133576/IEFFECT/MANUALTASK)  SPLNBR(1)
%SPLJOB%The name of the job that created the spool file.DLTSPLF FILE(%SPLFILE%)  JOB(%JOBN%/%SPLUSER%/%SPLJOB%)  SPLNBR(%SPLFILNR%)DLTSPLF FILE(INVNEW1)  JOB(133576/IEFFECT/MANUALTASK)  SPLNBR(1)
%SPLUSER%The user name of the job that created the spool file.HLDSPLF FILE(%SPLFILE%)  JOB(%JOBN%/%SPLUSER%/%SPLJOB%)  SPLNBR(%SPLFILNR%)HLDSPLF FILE(INVNEW1)  JOB(133576/IEFFECT/MANUALTASK)  SPLNBR(1)
%JOBN%The number of the job that created the spool file.RLSSPLF FILE(%SPLFILE%)  JOB(%JOBN%/%SPLUSER%/%SPLJOB%)  SPLNBR(%SPLFILNR%)RLSSPLF FILE(INVNEW1)  JOB(133576/IEFFECT/MANUALTASK)  SPLNBR(1)
%USRDTA%The user data attribute (USRDTA) of the spool file.CVTSPLPDF OUTPFILE('%HOME%/%USRDTA%.pdf')CVTSPLTXT OUTPFILE('/HOME/IEFFECT/INVNEW1.txt')
%USRDFNDTA%The USRDFNDTA attribute of the spool file.SNDEMAIL RECIPIENT('%USRDFNDTA%')SNDEMAIL RECIPIENT('info@menten.com')
%TMP%The name of the temporary system directory.CVTSPLPDF OUTPFILE('%TMP%/%SPLFILENAME%')CVTSPLPDF OUTPFILE('/TMP/INVNEW1.pdf)
%HOME%The "home path" ("/HOME/USERNAME") of the user running this job.CVTSPLXLS OUTPFILE('%HOME%/%SPLFILENAME%')CVTSPLXLS OUTPFILE('/HOME/IEFFECT/INVNEW1.xls)
%CURDIR%

The current directory of the user with whom the server job was started.

RUNMAP TOPATH('%CURDIR%/%MSGTYPE%_%ABSENDER%_%EMPFAENGER%_%TIMESTAMP%.edi')RUNMAP TOPATH('/HOME/IEFFECT/INVOIC_40077310000XX_40210170000XX_2021-02-01-17.05.32.897245.edi')
%USER%

Name of the current user.

SNDEMAIL RECIPIENT('%USER%')SNDEMAIL RECIPIENT('i-effect@menten.com')
%DATE%Current date in the format DD.MM.YYYYRUNMAP TOPATH('%OUTPUTPATH%/ORDERS_%_%DATE%.edi')RUNMAP TOPATH('/HOME/IEFFECT/EDI/OUT/ORDERS_04.02.2021.edi')
%YEAR%The current year in the format YYYY.RUNMAP TOPATH('%OUTPUTPATH%/ORDERS_%YEAR%.%MONTH%.%DAY%.edi')RUNMAP TOPATH('/HOME/IEFFECT/EDI/OUT/ORDERS_2021.02.04.edi')
%YEAR2%The current year in the format YY.RUNMAP TOPATH('%OUTPUTPATH%/ORDERS_%YEAR2%.%MONTH%.%DAY%.edi')RUNMAP TOPATH('/HOME/IEFFECT/EDI/OUT/ORDERS_21.02.04.edi')
%MONTH%The current month in the format MM.RUNMAP TOPATH('%OUTPUTPATH%/ORDERS_%YEAR%.%MONTH%.%DAY%.edi')RUNMAP TOPATH('/HOME/IEFFECT/EDI/OUT/ORDERS_2021.02.04.edi')
%MONTHNAME%The advertised current month.SNDEMAIL SUBJECT('Salesreport for %DAY% %MONTHNAME% %YEAR%')SNDEMAIL SUBJECT('Salesreport for 04 february 2021')
%DAY%The current day in the format DD.RUNMAP TOPATH('%OUTPUTPATH%/ORDERS_%YEAR%.%MONTH%.%DAY%.edi')RUNMAP TOPATH('/HOME/IEFFECT/EDI/OUT/ORDERS_2021.02.04.edi')
%WEEKDAY%The name of the current day of the week.SNDEMAIL SUBJECT('ORDERS vom %WEEKDAY%, %DATE%, %TIME%')SNDEMAIL SUBJECT('ORDERS vom Freitag, 04.02.2021. 14:32')
%TIME%The current time in the format HH:MM:SS.SNDEMAIL SUBJECT('ORDERS vom %WEEKDAY%, %DATE%, %TIME%')SNDEMAIL SUBJECT('ORDERS vom Freitag, 04.02.2021. 14:32')
%TIMESTAMP%The current time stamp in the format YYYY-MM-DD-HH.MM.SS.MSMSMSRUNMAP TOPATH('%CURDIR%/%MSGTYPE%_%ABSENDER%_%EMPFAENGER%_%TIMESTAMP%.edi')RUNMAP TOPATH('/HOME/IEFFECT/INVOIC_40077310000XX_40210170000XX_2021-02-01-17.05.32.897245.edi')
%SESSIONNUMBER%The current i-effect session numberSNDEMAIL SUBJECT('Processing error occurred, Serverjob: %SERVERTSAKID%, Logbook session number: %SESSIONNUMBER%')SNDEMAIL SUBJECT('Verarbeitungsfehler aufgetreten, Serverjob: 2543, Logbuch Sitzungsnummer: 364523')
%SERVERTASKID%Current running server task number.SNDEMAIL SUBJECT('Processing error occurred, Serverjob: %SERVERTSAKID%, Logbook session number: %SESSIONNUMBER%')SNDEMAIL SUBJECT('Verarbeitungsfehler aufgetreten, Serverjob: 2543, Logbuch Sitzungsnummer: 364523')
%SERVERJOB%Current running server task number.SNDEMAIL SUBJECT('Processing error occurred, Serverjob: %SERVERJOB%, Logbook session number: %SESSIONNUMBER%')SNDEMAIL SUBJECT('Verarbeitungsfehler aufgetreten, Serverjob: 2543, Logbuch Sitzungsnummer: 364523')
%LASTSERVERTIMESTAMP%

Timestamp of the last call of this server job in the

format YYYY-MM-DD-HH.MM.SS.MSMSMS

CVTDBFXL FROMFILE(*SQL)
TOSTMF('/HOME/IEFFECT/Vorgangsprotokoll_%TIMESTAMP%')
SQL('SELECT * FROM ieffectdb/vorgang WHERE REGTIMSTMP < ''%LASTSERVERTIMESTAMP%''')
CVTDBFXL FROMFILE(*SQL)
TOSTMF('/HOME/IEFFECT/Vorgangsprotokoll_%TIMESTAMP%')
SQL('SELECT * FROM ieffectdb/vorgang WHERE REGTIMSTMP < ''2021-02-01-17.05.32.897245''')
%GETENVVAR:EnvVarName%The value of the environment variable "EnvVarName".

CVTSPLPDF OUTPFILE('/%SRVDIR%/%GETENVVAR:ORDER_NR%.pdf')

CVTSPLPDF OUTPFILE('/HOME/IEFFECT/SERVER/OUT/1234567.pdf')
%ARCHIVEFILE%The full path name of the archive file stored in the process management.

PRCFWD FRMIFSFILE('%ARCHIVEFILE%')

PRCFWD FRMIFSFILE('/HOME/IEFFECT/EDI/ARCHIVE/orders.edi')
%SQL_LOOKUP:sqlQuery%Result of the execution of the SQL query "sqlQuery".

SNDEMAIL RECIPIENT('demo@menten.com')
SUBJECT('Preislistennummer: %SQL_LOOKUP:select VALUE from IEFFECTDB/VORGANGV
where SITZUNG = %SESSIONNUMBER% and KEY = "DOCUMENT_NR" and DIRECTION = "*OUT" limit 1% erfolgreich versendet')

SNDEMAIL RECIPIENT('demo@menten.com')
SUBJECT('Preislistennummer: 1234567 erfolgreich versendet')

%UNH_MESSAGETYPE%

The message type from the UNH segment of an EDIFACT file (UNH data element S009-0065).CPYEFFEDI FRMIFSFILE('/%IFSPATH%/%IFSFILE%') TODIR('/home/ieffect/edi/in/IFTMIN/D96A') PARMS(('%UNH_MESSAGETYPE%' IFTMIN) ('%UNH_MESSAGERELEASE%' 96A)) DELETE(*YES) CPYEFFEDI FRMIFSFILE('//home/ieffect/edi/in') TODIR('/home/ieffect/edi/in/IFTMIN/D96A') PARMS(('IFTMIN' IFTMIN) ('%UNH_MESSAGERELEASE%' 96A)) DELETE(*YES) 
%UNH_MESSAGERELEASE%The message release from the UNH segment of an EDIFACT file (UNH data element S009-0054).CPYEFFEDI FRMIFSFILE('/%IFSPATH%/%IFSFILE%') TODIR('/home/ieffect/edi/in/IFTMIN/D96A') PARMS(('%UNH_MESSAGETYPE%' IFTMIN) ('%UNH_MESSAGERELEASE%' 96A)) DELETE(*YES) CPYEFFEDI FRMIFSFILE('//home/ieffect/edi/in') TODIR('/home/ieffect/edi/in/IFTMIN/D96A') PARMS(('IFTMIN' IFTMIN) ('96A' 96A)) DELETE(*YES) 
%UNB_ORIGINATOR%The sender from the UNB segment of the EDIFACT file (UNB data element S002-0004).CPYEFFEDI FRMIFSFILE('/%IFSPATH%/%IFSFILE%') TODIR('/home/ieffect/edi/in/IFTMIN/D96A') PARMS(('%UNB_ORIGINATOR%' 5674872354376)) DELETE(*YES)CPYEFFEDI FRMIFSFILE('/%IFSPATH%/%IFSFILE%') TODIR('/home/ieffect/edi/in/IFTMIN/D96A') PARMS(('5674872354376' 5674872354376)) DELETE(*YES)
%UNB_ORIGINATORQ%The sender qualifier from the UNB segment of the EDIFACT file (UNB data element S002-0007).CPYEFFEDI FRMIFSFILE('/%IFSPATH%/%IFSFILE%') TODIR('/home/ieffect/edi/in/IFTMIN/D96A') PARMS(('%UNB_ORIGINATOR%' 5674872354376) ('%UNB_ORIGINATORQ%' 14) DELETE(*YES)CPYEFFEDI FRMIFSFILE('/%IFSPATH%/%IFSFILE%') TODIR('/home/ieffect/edi/in/IFTMIN/D96A') PARMS(('5674872354376' 5674872354376) ('14' 14)) DELETE(*YES)
%UNB_RECIPIENT%The recipient from the UNB segment of the EDIFACT file (UNB data element S003-0010).CPYEFFEDI FRMIFSFILE('/%IFSPATH%/%IFSFILE%') TODIR('/home/ieffect/edi/in/IFTMIN/D96A') PARMS(('%UNB_RECIPIENT%' 5674872354376)) DELETE(*YES)CPYEFFEDI FRMIFSFILE('/%IFSPATH%/%IFSFILE%') TODIR('/home/ieffect/edi/in/IFTMIN/D96A') PARMS(('5674872354376' 5674872354376)) DELETE(*YES)
%UNB_RECIPIENTQ%The recipient qualifier from the UNB segment of the EDIFACT file (UNB data element S003-0007).CPYEFFEDI FRMIFSFILE('/%IFSPATH%/%IFSFILE%') TODIR('/home/ieffect/edi/in/IFTMIN/D96A') PARMS(('%UNB_RECIPIENT%' 5674872354376) ('%UNB_RECIPIENTQ%' 14) DELETE(*YES)CPYEFFEDI FRMIFSFILE('/%IFSPATH%/%IFSFILE%') TODIR('/home/ieffect/edi/in/IFTMIN/D96A') PARMS(('5674872354376' 5674872354376) ('14' 14)) DELETE(*YES)
%UNB_INTREF%The data exchange reference from the UNB segment of the EDIFACT file (UNB data element 0020).CPYEFFEDI FRMIFSFILE('/%IFSPATH%/%IFSFILE%') TODIR('/home/ieffect/edi/in/IFTMIN/D96A') PARMS(('%UNB_INTREF%' 1234872)) DELETE(*YES)CPYEFFEDI FRMIFSFILE('/%IFSPATH%/%IFSFILE%') TODIR('/home/ieffect/edi/in/IFTMIN/D96A') PARMS(('1234872' 1234872)) DELETE(*YES)
%UNB_TEST%The test indicator from the UNB segment of the EDIFACT file (UNB data element 0035).CPYEFFEDI FRMIFSFILE('/%IFSPATH%/%IFSFILE%') TODIR('/home/ieffect/edi/in/IFTMIN/D96A') PARMS(('%UNB_ORIGINATOR%' 5674872354376) ('%UNB_TEST%' 1)) DELETE(*YES)CPYEFFEDI FRMIFSFILE('/%IFSPATH%/%IFSFILE%') TODIR('/home/ieffect/edi/in/IFTMIN/D96A') PARMS(('5674872354376' 5674872354376) ('1' 1)) DELETE(*YES)
%UNH_MESSAGEVERSION%The message version from UNH segment of the EDIFACT file (UNH data element S009-0052).CPYEFFEDI FRMIFSFILE('/%IFSPATH%/%IFSFILE%') TODIR('/home/ieffect/edi/in/IFTMIN/D96A') PARMS(('%UNB_ORIGINATOR%' 5674872354376) ('%UNB_TEST%' 1) ('%UNH_MESSAGEVERSION%' D)) DELETE(*YES)CPYEFFEDI FRMIFSFILE('/%IFSPATH%/%IFSFILE%') TODIR('/home/ieffect/edi/in/IFTMIN/D96A') PARMS(('%UNB_ORIGINATOR%' 5674872354376) ('%UNB_TEST%' 1) ('D' D)) DELETE(*YES)
%UNH_MESSAGEAGENCY%The message controlling digit from the UNH segment of the EDIFACT file (UNH data element S009-0051).CPYEFFEDI FRMIFSFILE('/%IFSPATH%/%IFSFILE%') TODIR('/home/ieffect/edi/in/IFTMIN/D96A') PARMS(('%UNB_ORIGINATOR%' 5674872354376) ('%UNB_TEST%' 1) ('%UNH_MESSAGEVERSION%' D) ('%UNH_MESSAGEAGENCY%' UN)) DELETE(*YES)CPYEFFEDI FRMIFSFILE('/%IFSPATH%/%IFSFILE%') TODIR('/home/ieffect/edi/in/IFTMIN/D96A') PARMS(('%UNB_ORIGINATOR%' 5674872354376) ('%UNB_TEST%' 1) ('D' D) ('UN' UN)) DELETE(*YES)
%WEBCONTROLSESSIONLINK%

With the help of this variable, a link is provided that can be used to refer directly to the session logbook of the respective session within i-effect WebControl.

SNDEMAIL SUBJECT('Verarbeitungsfehler aufgetreten, Serverjob: %SERVERTSAKID%, Logbuch Sitzungsnummer: %SESSIONNUMBER%') MSGTEXT('Webcontrol Sitzung: %WEBCONTROLSESSIONLINK%')SNDEMAIL SUBJECT('Verarbeitungsfehler aufgetreten, Serverjob: %SERVERTSAKID%, Logbuch Sitzungsnummer: %SESSIONNUMBER%') MSGTEXT('Webcontrol Sitzung: https://MAPIK.GL.MENTEN.DE:443')
%SERVERJOBDESCRIPTION%The short description of the server entry.

%SERVERERRORMESSAGES%The job log messages of the current job with a rating >= 30

%SERVERERRORMESSAGESHTML%

The job log messages of the current job with a rating >= 30 formatted as HTML text.

%STATUS%When using the server variable %STATUS% as a special value in MSGTEXT parameter of the SNDEMAIL command, the message text is taken from a template supplied with the product.

This is an HTML template that can be used during the workflow of a server task to send status information.

The template shows the most important parameters of the completed job as well as a link to the corresponding session in WebControl.

SNDEMAIL SUBJECT('Verarbeitungsfehler aufgetreten, Serverjob: %SERVERTSAKID%, Logbuch Sitzungsnummer: %SESSIONNUMBER%') MSGTEXT('%STATUS%')

%IFSPATH_IND:occurence%The part of the path name of the IFS file whose index is specified in the parameter "occurence".

CPYEFFUNIQ FRMIFSFILE('%IFSPATH%/%IFSFILE%') TODIR('HOME/IEFFECT/EDI/ARCHIVE/%IFSPATH_IND:4%')

CPYEFFUNIQ FRMIFSFILE('/home/ieffect/edi/invoic/invoic.edi')
TODIR('HOME/IEFFECT/EDI/ARCHIVE/INVOIC')
%GETSEQUENCE:sequence%The value of the specified SQL sequence "sequence".

RUNMAP MAPID('INVOIC_XML') FS(*NONE)
TOPATH('%HOME%/EDI/OUT/XML/INVOIC_%GETSEQUENCE:CUSTOM_SEQ%.xml')

RUNMAP MAPID('INVOIC_XML') FS(*NONE)
TOPATH('/HOME/IEFFECT/EDI/OUT/XML/INVOIC_327567.xml')
%CONTRL_EMAIL_FROM%With the help of this variable, the e-mail address of the sender of the EDI message can be transferred for further processing.SNDEMAIL RECIPIENT('%CONTRL_EMAIL_FROM%') SUBJECT('%IFSFILE%') MSGTEXT('Diese Nachricht wurde maschinell erstellt') ATTACH('/%IFSPATH%/%IFSFILE%')

SNDEMAIL RECIPIENT('edifact@Host.Domain') SUBECT('CONTRL__99107430000XX_99009630000XX_20210204_120228887.txt') MSGTEXT('Diese Nachricht wurde maschinell erstellt') 
ATTACH('/%HOME%i/edi/out/CONTRL__9910743000004_9900963000009_20210204_120228887.txt')

%CONTRL_EMAIL_TO%With the help of these variables, the e-mail address of the sender of the EDI message can be transferred for further processing.SNDEMAIL RECIPIENT('%CONTRL_EMAIL_TO%') SUBJECT('%IFSFILE%') MSGTEXT('Diese Nachricht wurde maschinell erstellt') ATTACH('/%IFSPATH%/%IFSFILE%')

SNDEMAIL RECIPIENT('edifact@Host.Domain') SUBECT('CONTRL__99107430000XX_99009630000XX_20210204_120228887.txt') MSGTEXT('Diese Nachricht wurde maschinell erstellt') 
ATTACH('/%HOME%i/edi/out/CONTRL__9910743000004_9900963000009_20210204_120228887.txt')

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.