Example of displaying data with a template
The first task in this tutorial is to view data that has been structured into fields, without using a template. This demonstrates some of the display issues that can occur when unformatted data is viewed. In the next task, you view the same data, with a template.
- From the File Manager Primary Option Menu, select option 1. View.
- In the Data set name field for the input data set, type
'FMN.V14R1M21.SFMNSAM1'
. - In the Member field for the input data set, type
FMNCDATA
. - In the Copybook/template usage field, select option 3. None.
- Press Enter.
Figure 1 shows what this data looks like without a template.
Figure 1. Viewing structured data without a template Process Options Help ─────────────────────────────────────────────────────────────────────────────── View FMN.V14R1M21.SFMNSAM1(FMNCDATA) Top of 40 Col 1 Insert Length 80 Record AT TOP Format CHAR ----+----1----+----2----+----3----+----4----+----5----+----6----+----7-- ****** **** Top of data **** 000001 01Grant Smith .................................................. 000002 01Andrew Apple .5....&........................................... 000003 01Graham Prestcott .................................................. 000004 01Bill Somers .................................................. 000005 01Ted Dexter .....-............................................ 000006 01Roddy Armstrong .................................................. 000007 01Cliff Roberts .R................................................ 000008 01James Browne .)................................................ 000009 01Silvia Carrot ...../ ........................................... 000010 01Dan Peters ."................................................ 000011 01John Laws .;................................................ 000012 01Liz Childs .?................................................ 000013 01Bill McCork .N................................................ 000014 01Keith Sampson .................................................. 000015 01John Neptune .................................................. Command ===> Scroll CSR F1=Help F2=Zoom F3=Exit F4=CRetriev F5=RFind F6=RChange F7=Up F8=Down F9=Swap F10=Left F11=Right F12=Cancel
The first twenty records in this member contain non-displayable characters represented by periods and other characters. Without a template, these records cannot be easily viewed or edited.
- When you have finished examining the data, press the Exit function
key (F3) to return to the Edit (or View) Entry panel.
Now let's view the same data using a template generated from the COBOL copybook supplied in FMN.SFMNSAM1(FMNCCPY).
- In the Data set name field for the Copybook or Template,
type
'FMN.V14R1M21.SFMNSAM1'
. - In the Member field for the Copybook or Template, type
FMNCCPY
. - In the Copybook/template usage field, select option 1. Above.
- Press Enter.
For this example, we want to display the data in tabular format. If the Format field (at the top right of the panel) does not contain
TABL
, then overtype the first letter of its current value withT
and then press Enter.The sample data is now shown in TABL display format, arranged in columns.Figure 2. Viewing data using a template (TABL display format) Process Options Help ─────────────────────────────────────────────────────────────────────────────── View FMN.V14R1M21.SFMNSAM1(FMNCDATA) Top of 40 Record AT TOP Format TABL REC-TYPE REC-ID NAME EMPLOYEE-NO AGE SALARY #2 #3 R # #4 #5 #6 #7 AN 1:2 AN 1:2 AN 3:20 BI 23:2 BI 25:2 PD 27:4 <> <> <---+----1----+----> <---+> <---+> <---+--> ****** **** Top of data **** 000001 01 01 Grant Smith 7712 35 75000 000002 01 01 Andrew Apple 6645 53 78500 000003 01 01 Graham Prestcott 5583 28 48000 000004 01 01 Bill Somers 4418 33 68000 000005 01 01 Ted Dexter 3327 52 60250 000006 01 01 Roddy Armstrong 5683 34 77000 000007 01 01 Cliff Roberts 2265 57 100000 000008 01 01 James Browne 1117 46 125000 000009 01 01 Silvia Carrot 2308 29 61400 000010 01 01 Dan Peters 4479 54 63000 000011 01 01 John Laws 3422 21 46750 000012 01 01 Liz Childs 3439 55 66000 Command ===> Scroll CSR F1=Help F2=Zoom F3=Exit F4=CRetriev F5=RFind F6=RChange F7=Up F8=Down F9=Swap F10=Left F11=Right F12=Cancel
File Manager has used the first record type defined in the copybook to display the data and the first set of records (REC-TYPE = 01) are now readable. Any fields defined in the second record type (REC-TYPE = 02) that match fields defined in the first type are also displayed.