Creating MFS formats with SDF II

SDF II is an interactive tool for designing and generating MFS formats.

SDF II does not replace MFS, but it does make developing and maintaining MFS formats easier. Because SDF II uses a panel editor for designing and testing formats, it frees the MFS programmer from some of the tasks associated with coding MFS source statements.

With SDF II, application programmers and analysts who might not know the special requirements of MFS can perform a part of the programming job that would otherwise call for specialized knowledge. SDF II uses a panel editor, such as the one shown in the following screen shot, to define and test a panel.

                                DEFINE FORMAT
 
Format . . . . . . . . . . . . . .Positions 1-75 or 80, Lines 1-24 of 24
Marks: V - C . L , S +                                  Contents: FORMAT
001
002                  *************************************
003                  ** E M P L O Y E E   P A Y R O L L **
004                  *************************************
005
006  LAST NAME:                       FIRST NAME:
007
008  EMPL NO:
009
010  SOC SEC NO:
011
012  RATE OF PAY:
013
014
015
016  INPUT:
017
018
019
020
021
022
023
024
PF1=HELP     2=SPLIT     3=END       4=RETURN      5=RFIND      6=CHANGE
PF7=UP       8=DOWN      9=SWAP     10=LEFT       11=RIGHT     12=CURSOR

After testing the panel, the SDF II user can automatically generate the MFS source code, shown in the example code below, that is needed for the format definition. Using MFS only, the programmer would need to code these statements manually.

DOF
PAYF     FMT
         DEV       TYPE=(3270,2),FEAT=IGNORE,DSCA=X'00A0'
         DIV       TYPE=INOUT
         DPAGE     CURSOR=((5,15))
         DFLD      '**********************',POS=(1,21)
         DFLD      '*  EMPLOYEE PAYROLL  *',POS=(2,21)
         DFLD      '**********************',POS=(3,21)
         DFLD      'LAST NAME:',POS=(5,2)
LNAME    DFLD      POS=(5,15),LTH=16
         DFLD      'FIRST NAME:',POS=(5,36)
FNAME    DFLD      POS=(5,48),LTH=16
         DFLD      'EMPL. NO:',POS=(7,2)
EMPNO    DFLD      POS=(7,11),LTH=6
         DFLD      'SOC SEC NO:',POS=(9,2)
SSN      DFLD      POS=(9,14),LTH=11
         DFLD      'RATE OF PAY: $',POS=(11,2)
RATE     DFLD      POS=(11,16),LTH=9
         DFLD      'INPUT:',POS=(16,2)
INPUT    DFLD      POS=(16,9),LTH=30
         FMTEND
MID
PAYIN    MSG       TYPE=INPUT,SOR=(PAYF,IGNORE)
         SEG
         MFLD      'PAYUP '     SUPPLIES TRANCODE
         MFLD      LNAME,LTH=16
         MFLD      FNAME,LTH=16
         MFLD      EMPNO,LTH=6
         MFLD      SSN,LTH=11
         MFLD      RATE,LTH=9
         MFLD      INPUT,LTH=30,JUST=R,FILL=C'0'
         MSGEND
MOD
PAYDAY   MSG       TYPE=OUTPUT,SOR=(PAYF,IGNORE)
         SEG
         MFLD      LNAME,LTH=16
         MFLD      FNAME,LTH=16
         MFLD      EMPNO,LTH=6
         MFLD      SSN,LTH=11
         MFLD      RATE,LTH=9
         MFLD      INPUT,LTH=30,JUST=R,FILL=C'0'
         MSGEND

SDF II is designed for use on a 3270–display device; however, SDF II can create formats for all devices supported by MFS.

Related reading: For more information on SDF II, see SDF II General Introduction.