MFS Definition Statement
This chapter describes the macros that are used to create an MFS format file.
1. Overview
An MFS format file consists of message definition statement and format definition statement. Each has hierarchical structure and the message definition statement creates MID and MOD and the format definition statement creates DIF and DOF.
The following describes rules that apply to macro definition. Refer to the following table for a definition of each macro.
Convention | Meaning |
---|---|
>>--- |
The start of syntax |
---> |
Continuing to the next line |
>--- |
Continued from the previous line |
--->< |
The end of syntax |
>>-------Required Item---------->< |
Required item |
>>---+---Required Selection1---+----->< '---Required Selection2---' |
One option must be selected. |
>>---+---------------+----->< +---Optional Item1---+ '---Optional Item2---' |
Optional item |
.---Default Item---. >>---+----------------+---->< |
Default value |
.---------------. V | >>---+---Repeatable Item----+----->< |
Repeatable item |
2. Message Definition Statement
The following illustrates the structure of the message definition statement. Under one MSG statement, multiple LPAG statements can be defined. The SEG statement and MFLD statement are defined hierarchically.
MSG LPAGE PASSWORD SEG DO MFLD .... ENDDO SEG .... LPAGE .... MSGEND
2.1. MSG Statement
Represents the start of the message definition statement.
-
When MSG TYPE=INPUT or OUTPUT
>>-label--MSG--+------------------+-----------------------------> | .-INPUT--. | '-TYPE=-+-OUTPUT-+-' >--,SOR=(formatname)--------------------------------------------> >--+--------------------------+-------------------------------->< '-,NXT=msgcontrolblockname-'
Keywords Description TYPE
Sets whether the statement is INPUT or OUTPUT.
SOR
Sets the format definition statement name.
NXT
Sets the MID or MOD name that will be referred the next time.
Describes the MOD name if the current statement is INPUT , and describes the MID name if the current definition statement is OUTPUT.
-
When MSG TYPE=OUTPUT
>>-+----------------+------------------------------------------>< | .-NO--. | '-,PAGE=-+-YES-+-'
Keywords Description PAGE
Sets whether to use the OLP(Operator Logical Paging) function. (Not supported)
2.2. LPAGE Statement
When to use logical paging, LPAG statement should be set. Currently, logical paging for MSG TYPE=INPUT is not supported.
-
When MSG TYPE=OUTPUT
>>-+-------+--+----------------------+--------------------------> '-label-' '-LPAGE--SOR=dpagename-' >--+--------------------------------------------------+---------> '-,COND=(-+-mfldname-----+--,--+->--+--,'value'--)-' +-mfldname(pp)-+ +-<--+ '-segoffset----' +-≥--+ +-≤--+ +-=--+ '-!=-' >--+--------------------------+-------------------------------->< '-,NXT=msgcontrolblockname-'
Keywords Description SOR
Sets the DPAGE name of the format definition statement
COND
Sets the conditions to select one LPAGE among LPAGEs.
NXT
Sets the MID name to process the next message.
If this option is set, the MID name set in the MSG statement will be ignored.
2.3. SEG Statement
When multi-segment message is used in an application, set multiple SEG statements.
-
When MSG TYPE=INPUT
.-YES-. >>-+-------+--SEG ---GRAPHIC=-+-NO--+-------------------------->< '-label-'
Keywords Description GRAPHIC
If YES and if EDIT =UC is set in TRANSACT (system definition), lower cases will be converted to upper cases.
-
When MSG TYPE=OUTPUT
>>-+-------+--SEG ---------------------------->< '-label-'
2.4. PASSWORD Statement
The input data in the MFLS statement defined in the PASSWORD statement is used as password for getting tacf logon authentication. The user’s ID is the ID of the user connecting to the input termnial. You can use it by defining before the SEG statement.
>>-+-------+--PASSWORD ---+-blank----+-------------------------->< '-comments-'
Keywords | Description |
---|---|
comments |
Comments. |
2.5. DO Statement
Used when defining repeatable MFLD statement. If DO statement is used, macro pre-processor (macroprep) should be used for pre-processing and the MFS format compiler tool (osimfsgen) should be used.
>>-+-------+--DO--count---------------------------------------->< '-label-'
2.6. MFLD Statement
Defines a field (TYPE=INPUT) that will be sent from a terminal to an application, and defines a field (TYPE=OUTPUT) that will be sent from an application to a terminal.
-
When MSG TYPE=INPUT
>>-+-------+--MFLD--+------------------------+------------------> '-label-' '-(dfldname-,'literal'-)-' >--+-------------------+--+--------------+----------------------> | .-1-------. | | .-L-. | '-,LTH=-+-nn------+-' '-,JUST=-+-R-+-' >--+----------------------------------------------------------->< '-,FILL=-+-X'40'-+-' +-X'hh'-+ +-C'c'--+ '-NULL--'
Keywords Description (dfldname,'literal')
If no data is received from a terminal, sends the value, which is set as 'literal', to an application.
LTH
Sets the field length.
JUST
Sets left, right alignment.
FILL
Sets the character to fill remaining spaces when the data length received from a terminal is shorter than the MFLD length.
If FILL=NULL, sends the received data as it is without filling the remaining positions, to an application. In this case, the application should handle variable length data processing.
The default value is X'40' and FILL=X'3F' is same as FILL=NULL.
FILL=X'00' is not the same as FILL=NULL, and the remaining positions are padded with 00.
-
When MSG TYPE=OUTPUT
>>-+-------+--MFLD--+----------------------------+--------------> '-label-' +-dfldname-------------------+ +-(dfldname, system-literal)-+ +-(dfldname, 'literal')------+ >--+--------------+---------------------------------------------> | .-1--. | '-,LTH=-+-nn-+-' >--+---------------------------+------------------------------->< | .-NO--. | '-,ATTR=(-+-----+-+-----+-)-' '-YES-' '-,nn-'
Keywords Description (dfldname,system-literal)
Sets system literal. For more information about system literal, refer to the System Literal section.
(dfldname,'literal')
Sets character string as literal. The data of the corresponding MFLD must not be included in the data sent to the screen by the program.
LTH
Sets the field length.
ATTR
It is used to dynamically change ATTR(YES or NO) or EATTY(nn) set in DFLD. For more information about dynamic change, refer to Dynamic Property Change section.
System Literal
The following describes system literals.
System Literal | Format | Description |
---|---|---|
LTSEQ |
nnnnn |
Output message number for logical terminal |
LTNAME |
aaaaaaaa |
Logical terminal name |
TIME |
HH:MM:SS |
System time |
DATE1 or YYDDD |
YY.DDD |
System date |
DATE2 or MMDDYY |
MM/DD/YY |
System date |
DATE3 or DDMMYY |
DD/MM/YY |
System date |
DATE4 or YYMMDD |
YY/MM/DD |
System date |
DATE1Y4 or YYYYDDD or DATEJUL |
YYYY.DDD |
System date |
DATE2Y4 or MMDDYYYY or DATEUSA |
MM/DD/YYYY |
System date |
DATE3Y4 or DDMMYYYY or DATEEUR |
DD/MM/YYYY |
System date |
DATE4Y4 or YYYYMMDD or DATEISO |
YYYY/MM/DD |
System date |
LPAGENO |
nnnn |
Current logical page number |
Dynamic Property Change
Dynamic property change is used in the following cases:
-
ATTR=YES
It is used when changing the property set in ATTR of DFLD. In this case, the data that will be sent to an application contains 2 bytes of additional data, so LTH should be set with the length that contains 2 additional bytes.
For example, If the data length of the screen is 5 bytes, set LTH as follows. For more information, refer to MFS Function.
When ATTR=YES, LTH=2+5=7
-
ATTR=(,nn)
Used to change the property set in EATTR of DFLD. EATTR property data is 2 bytes, so a value which is double the value set in nn should be included in the length.
For example, if the data length is 5 bytes, set LTH as follow:
-
When ATTR=(NO,3) or ATTR=(,3)
LTH= 2*3+5=11
-
When ATTR=(YES,3)
LTH=2+2*3+5=13
-
3. Format Definition Statement
The following shows the structure of the format definition statement. Under one FMT statement, multiple DEV statements can be defined. Define DIV, DPAGE, and DFLD statements hierarchically under the DEV statement.
FMT DEV DIV DPAGE DO DFLD .... ENDDO DPAGE .... DEV .... FMTEND
3.1. FMT Statement
Represents the start of the format definition statement.
>>-label--FMT--+-blanks---+------------------------------------>< '-comments-'
3.2. DEV Statement
Sets the device properties.
>>-+-------+--DEV--TYPE--+-3270-----------+---------------------> '-label-' +-(3270,2)-------+ '-3270-An--------' >--+------------------------------------------------+-----------> '-,FEAT=-+-IGNORE------------------------------+-' +-1-----------------------------------+ +-2-----------------------------------+ +-3-----------------------------------+ +-4-----------------------------------+ +-5-----------------------------------+ +-6-----------------------------------+ +-7-----------------------------------+ +-8-----------------------------------+ +-9-----------------------------------+ +-10----------------------------------+ >--+-------------------+--+---------------------+---------------> '-,SYSMSG=dfldlabel-' '-,DSCA=---X'value'---' >--+--------------------------------------------------+-------->< | .-,-------------. | | V | | '-,PFK=(dfldname,-+----'literal'-----------------)-' | .-,----------------------. | | V | | '---integer=---'literal'---+-'
Keywords | Description |
---|---|
TYPE |
OSI supports TN3270 terminal. |
FEAT |
If FEAT of TERMINAL (system definition) is set to Fn (n is a number between 1 and 10), select a DEV of which the value of FEAT is n among DEVs. If the corresponding DEV does not exist, a DEV which is set to IGNORE will be selected as the default value. For example, If FEAT=F2 is defined in TERMINAL, a DEV of which FEAT=2 is selected. If DEV of which FEAT=2 does not exist, a DEV of which FEAT=IGNORE is selected. |
SYSMSG |
Sets the DFLD on which the system message will be displayed. |
DSCA |
DSCA (Default System Control Area) sets some default configuration for the display of a terminal screen. For example, to write on the screen, it determines whether to delete the screen or overwrite the screen. The format is 2 bytes character X’hhhh'. In the TN 3270 terminal, the first byte is fixed to 0. The second bytes can be set as follow:
|
PFK |
Sets literal or commands for PFK (Program Function Key). The field dfldname saves 'literal' that matches the entered PFK and is used when the MKLD statement refers to the value. The parameters after dfldname can be defined using only 'literal' or with numbers. |
3.3. DIV Statement
The following describes the format of the DIV statement .
>>-+-------+--DIV--+------------------+------------------------>< '-label-' | .-INOUT--. | '-TYPE=-+-OUTPUT-+-'
Keywords | Description |
---|---|
TYPE |
Sets if the current definition statement is OUTPUT or INPUT. |
3.4. DPAGE Statement
Sets the DPAGE statement for definition. The value set from SOR in LPAGE is the label name of DPAGE.
>>-+-------+--DPAGE---------------------------------------------> '-label-' >--+-----------------------------+----------------------------->< '-CURSOR=(------lll,ccc-----)-'
Keywords | Description |
---|---|
CURSOR |
Sets the cursor position. The default value is (1,2). |
3.5. DO Statement
It is used to define the DFLD statement which repeats regularly. When a DO statement is used, use macroprep, a macro pre-preprocessor, for preprocessing and then use osimfsgen, an MSF format compiler tool.
>>-+-------+--DO--count---------------------------------------->< '-label-'
3.6. DFLD Statement
Sets fields that are used to receive data from a terminal or to send data to display on a terminal.
>>-+-------+--DFLD--+-----------+--,POS=(lll,ccc)---------------> '-label-' '-'literal'-' >--+----------+-------------------------------------------------> '-,LTH=nnn-' >--+---------------------------------------+--------------------> | .-ALPHA-. .-,NOPROT-. | '-,ATTR=(-+-------+-+---------+-| A |-)-' '-NUM---' '-,PROT---' >--+--------------------------------------------------------+-->< '-,EATTR=(-+--------+-+----------+-+-----------+-| B |-)-' +-HD-----+ +-,CD------+ '-,EGCS-----' +-HBLINK-+ +-,BLUE----+ +-HREV---+ +-,RED-----+ '-HUL----' +-,PINK----+ +-,GREEN---+ +-,TURQ----+ +-,YELLOW--+ '-,NEUTRAL-' A .-,NORM---. .-,NOMOD-. |--+-,------+--+---------+--+--------+--+-,--------+------------| +-,NODISP-+ '-,MOD---' '-,HI-----' B |--+-,-------------+--+-----------+-----+-------+---------------| +-,OUTL-----+ '-,MIX--' +-,BOX------+ +-,RIGHT----+ +-,LEFT-----+ +-,UNDER----+ '-,OVER-----'
Keywords | Description |
---|---|
POS |
Field position. |
LTH |
Field length. |
ATTR |
Field property.
|
EATTR |
Extended field property.
|