0% found this document useful (0 votes)
524 views4 pages

FM IMS Quick Reference Card

File Manager for Mainframes: Quick commands

Uploaded by

Rajiv Garg
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
524 views4 pages

FM IMS Quick Reference Card

File Manager for Mainframes: Quick commands

Uploaded by

Rajiv Garg
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

File Manager / IMS Introduction

Option Description (continued)


You navigate around FM/IMS panels in the same way as any other
panels under ISPF. However, since FM/IMS has its own “primary • A partial database extract, containing segments

 option menu”, if you use an = (equal sign) to prefix an option selected by a combination of:
number in FM/IMS, then you go to that option number under o A file containing the root segment key values
®
FM/IMS, not the option under the ISPF Primary Option Menu. For for the segments you want to extract. You
example, if you enter =3 on an FM/IMS panel, then FM/IMS can create this file when editing a database,
displays the Extract Entry panel (option 3), and not ISPF option by entering the XKEY primary command
3. You might find that this technique is a useful time-saver. For o Extract criteria specifying the segments you
some FM/IMS options (such as Browse and Edit), you must want to extract and field selection criteria
Quick Reference Template
provide information in three or four panels before you finally get to select the database records to be
data displayed. When you exit from one of these “terminal” extracted
for
panels, you return over the same path. Prefacing an option with o Relationship criteria specifying how logical
“=” saves you traversing the reverse path. e.g. “=X” takes you segments are chased
File Manager/IMS™ for IBM z/OS®
completely out of FM/IMS. These different extracts are held in an extract criteria
set. Each subset is applied to a database record
Option Description separately. Duplicate records are removed using a sort
(Program Number 5655-U29)
facility after the extract is completed. You can create
0 select Set Processing Options to display and change and edit a criteria set while using the Extract panels, or
Web-site:
parameters that affect FM/IMS behavior you can use Criteria (option 7) to create and edit a
http://www.ibm.com/software/awdtools/filemanager
0.1 Set Print Processing Options This panel displays options criteria set for later use. Before you can create an
for FM/IMS print output extract criteria set, you must already have created a
0.2 Set System Processing Options Specifies whether template for the associated database
records are padded or truncated, and the character to 4 select Load to load segments that you previously
Please refer to the User’s Guide and Reference for full
pad them with extracted (using option 3, Extract) into an IMS database
product documentation.
0.3 Set Batch Job Card Information These options set the 5 select Template to create and update a template from
JCL job card information, together with the allocation a DBD (describing the segments in a database, and their
SC19-1239-00 - User’s Guide and Reference
default settings for any temporary or permanent data logical relationships) and COBOL or PL/I copybooks
SC19-1241-00 - IMS Feature User’s Guide and Reference
sets which might be allocated, for batch jobs that (describing the layout of each segment). A template is a
GC19-1238-00 - Customization Guide
FM/IMS submits when you use the Extract (option 3) and PDS member containing the minimum information
Load (option 4) panels required in a view:
0.4 Compiler Language Selection Sets the language used • The list of segment types in a database
for compiling copybooks to create a template. • The layout (field names, lengths and data
COBOL = Use the COBOL compiler. This is the default types) of each segment type
PL/I = Use the PL/I compiler To create a template, you need:
Auto detect = Analyze the source and use the • The DBD load library member (containing the
appropriate compiler list of segment types in a database)
0.5 Set COBOL Processing Options • For each segment type in the DBD, a copybook
0.6 Set PL/I Processing Options describing one or more segment layouts
0.7 Edit/browse options 6 select View to create and update a view from a
0.8 IMS Specifications template and to edit the view. In FM/IMS, a view is a
0.9 IMS Data set settings collection of information that you use to select and
Notices 0.10 Output Data Set Allocation This panel displays the data format segments and fields when browsing or editing a
set allocations for the output data sets that FM/IMS can database. You can create a view and save it in a
©Copyright International Business Machines Corporation 2008. All rights reserved.
create sequential data set or a PDS member for later use, or
US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule 1 select Browse to display segments without changing you can create and edit a view “on the fly” while
Contract with IBM Corp.
them * browsing or editing a database, and either save it for
The following paragraph does not apply to the United Kingdom or any other country where such provisions 2 select Edit to display segments, and also to edit, insert later use or discard it. Before you can create a view,
are inconsistent with local law: INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS and delete them * you need to create a template
PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A * In Browse and Edit the IMS database can be accessed 7 select Criteria to define criteria sets for extracting
PARTICULAR PURPOSE. Some states do not allow disclaimer of express or implied warranties in certain
transactions, therefore, this statement may not apply to you.
either via a BMP region or a DLI region segments (option 3, Extract). Each criteria set can
3 select Extract to extract all or selected segments from contain multiple subsets; each subset can define criteria
This information could include technical inaccuracies or typographical errors. Changes are periodically made an IMS database into a sequential data set. You can for selecting segments. Only the segments that match
to the information herein; these changes will be incorporated in new editions of the publication. IBM may
make improvements and/or changes in the product(s) and/or the program(s) described in this at any time select segments based on a list of key values or on all of the subset criteria are selected for extraction. You
without notice. criteria sets (option 7, Criteria). After extracting the can also limit the number of logical relationships
segments, you can use Load (option 4) to load them into pursued when extracting segments
The information in this document represents a snapshot in time and are an internet IBM assessment of
product companies based on information available to IBM obtained as of the date the document was created. another IMS database. Types of extracts performed are: 8 select Print Audit Trail to print an audit trail of the
No formal testing or validation has been done of the functions of the competitive products listed and
information provided may be incomplete. Other product and company names mentioned herein may be the
• A full database extract, including a full extract of any segments that you have changed, inserted or deleted,
trademarks of their respective owners. logically related databases while using option 2, Edit
Page 2 Page 3
TEMPLATES & VIEWS If the compilation is completed without errors, then FM/IMS FILE MANAGER Primary Commands (Edit) (cont.)
processes the information in the ADATA file to create a
Overview template. If the compilation is completed with errors, then REPEAT: inserts a single segment occurrence or an
To create a Template, you go to the Template Entry (option 5) FM/IMS displays a pop-up menu, where you can choose to: entire substructure into the database. (Not
panel and specify: a DBD load library member, the partitioned • Browse the compilation listing. active in ZOOM mode).
data set where you want the template saved, and the • Stop the template creation process. SAVE: causes FM/IMS to immediately issue a
partitioned data sets containing your copybooks. FM/IMS then • Try the compilation again. Before you select this checkpoint (CHKP) call. The checkpoint call
displays the Template Specification panel, listing the segment option, you should first view the compilation listing requests to have all segment update currently
types in the DBD. For each segment type, you specify the and correct any errors in the copybooks. in buffers written to the database data sets
member name of a copybook containing the layout (or layouts)
for that segment type. If a copybook contains more than one FM/IMS support of COBOL data description entries FILE MANAGER Primary Commands (Browse & Edit)
layout then, for each layout, you can specify layout In the data description entries specified in the copybook, FM/IMS
identification criteria in the template. Layout identification supports the following clauses: BOTTOM: scrolls to the last segment in the database
criteria tell FM/IMS which layout to use when displaying • ASSIGN (or, if you are using a view, the last selected
occurrences of that segment type. When browsing or editing • OCCURS (including OCCURS DEPENDING ON) segment in the database)
data, FM/IMS would use the appropriate layout to display • PICTURE (except for numeric editing) CANCEL/QUIT: returns you to the Database Positioning panel
occurrences of that segment type, depending on the value • REDEFINES (when used in the Data panels), but it will not
specified. FM/IMS saves the template in a member with the backout changes made during the edit session
• RENAMES
same name as the DBD, in the PDS you specified. A View begins CHILD: change your position in the database from the
• USAGE
as a copy of a template. To create a view, you go to the View current segment to any dependent segment of
• VALUE the current segment
Entry (option 6) panel and specify the PDS and member name of
an existing template. You can then edit the view, and add DBD: displays information on the database and
FILE MANAGER Primary Commands (Edit) segments being edited or browsed
information to:
• change the display width of a field DOWN: in multi-segment display, the DOWN command
The following commands are available in Edit mode in addition scrolls forward through the segments in the
• select the fields you want displayed to the Browse primary commands.
• display leading zeros on numeric fields database. In single-segment display, the
• specify a field heading to use instead of the field name DOWN command scrolls forward through the
CHANGE: find and replace one or more occurrences of data of the current segment
in the copybook a character string in the data being edited. DPRINT: prints the data in the database segments that
• select the segments you want displayed When data is displayed in SNGL or TABL are available to the browse or edit session
You create one template per database (DBD); the template and format, the CHANGE command can also find FIELD: displays information regarding each field
DBD have matching member names. You only need to update a and replace one or more occurrences of a defined in the DBD for the specified segment
template if segment types are added, segment types are numeric value in a numeric field. FIND: finds the next occurrence of a character
renamed, or segment layouts change in the underlying database The CHANGE command cannot be used to string or field value in the data being edited
structure. You can create as many views as you like for the same change fields that are part of a segment’s key or browsed. Automatic scrolling is performed,
database, with each view providing a different way of looking at DELETE: delete from the database the current if necessary, to bring the string into view and
the data, selecting different segments and fields. You can create segment and all its dependent segments. After the cursor placed at the beginning of the
and edit a view while you are browsing or editing a database, a segment and its children are deleted, the string or field. The operands available and the
refining it to select only those segments and fields that are of next segment in the hierarchical sequence operation of the FIND command depend on
interest to you, and to format them according to your becomes the current segment whether a view is being used and if a view is
specifications. FE: find the next occurrence of a field in error in used, the current setting of SHOW SUP ON
the data being edited or browsed. FE is only (exposed data in group lines) or SHOW SUP
How FM/IMS compiles a copybook into a template Whenever active when a view is associated with the OFF (grouped segments represented by a
you create or update a template, FM/IMS: database. The cursor is placed at the single line)
1. Concatenates the copybooks (that you have matched beginning of the string in error. Automatic FORMAT: toggle between tabular display format (TABL)
with segment types) and includes them all in a shell scrolling is performed, if necessary, to bring and single-row display format (SNGL), and
program. (You cannot use a mix of COBOL and PL/I the string into view CHAR, HEX and LHEX formats. The FORMAT
copybooks to create a template: you must either use INSERT: insert an occurrence of a segment type into primary command has the same effect as
only COBOL copybooks or only PL/I copybooks. the database. (Not active in Zoom mode) changing the Format field (in the upper right
2. Invokes the COBOL or PL/I compiler to check the RECOVERY: turn the FM/IMS automatic checkpoint facility
syntax of the copybooks, and to produce an ADATA hand corner of the panel)
ON or OFF. When you first enter the edit
file. dialog, recovery is OFF. If you turn it ON,
it remains ON until you leave the edit dialog
You can use the Compiler Language Selection (option 0.4) panel (exit from the Edit Entry panel) or until you
to specify whether FM/IMS invokes the COBOL or PL/I compiler, turn it OFF
or automatically detects the language and invokes the RELATED: display information regarding logical
appropriate compiler. relationships defined for the current database

Page 4 Page 5 Page 6


FILE MANAGER Primary Commands (Browse & Edit) (cont.) FILE MANAGER PRIMARY COMMANDS (Browse & Edit) (cont.)
FILE MANAGER Primary Commands (Browse & Edit) (cont.)
RIGHT: in multi-segment display the RIGHT command VSAVE: this command can be issued from the
GE: this command has been added to the scrolls toward the end of the data for the Database Positioning panel or from the Data
Database Positioning panel to specify that the displayed segments. In SNGL format, the Display panel. If this is a new view, a popup
positioning logic is to use a Greater than or RIGHT command is not active panel will be displayed to prompt for the data
Equal to search for the specified key values ROOT: change your position in the database from set and member name
HEX: set or reset the hexadecimal display in all the current segment to either the root XKEY: creates a data set containing the keys of all
formats segment in the current hierarchical path or to root segments from the current position. You
HIERARCH: displays a graphical representation of the the first root segment in the database can use this data set on the Extract (option 3)
structure of the database being edited or SCOPE: change the scope of command operation and panel to extract segments
browsed segment retrieval to either within the current ZOOM: in CHAR, HEX and LHEX display formats, this
KEY: display the Key Specification panel (based on database record or across all database records. command limits the display to just one
the current hierarchical path and segment SEGMENT: display information about a segment defined segment, showing you all of the data in the
position), where you enter key values for as part of the current database segment without having to scroll left or right.
segments and thus change the current position SELECT ALL: select or deselect all of the segments from the In SNGL and TABL display formats, zooming in
in the database Database Positioning, Segment Selection and shows all fields in the segment presented in
LEFT: in multi-segment display the LEFT command Segment Layout panels SNGL display format, rather than only those
scrolls towards the beginning of the data for SHOW: this command is applicable to data panels fields selected by the view. The ZOOM
the displayed segments. In SNGL format, the that show different segment types, when a command zooms in on the segment selected
LEFT command is not active view is associated with the database. The by the cursor, or the top segment displayed if
LOCATE: position a scrollable formatted display at the command controls the display of lines for the cursor is not positioned on a segment. To
field that matches the supplied field-name. segments that are: zoom back out to the display format that was
The display is positioned on the field that • Suppressed (not of the currently current prior to zooming in, enter the ZOOM
contains the supplied string formatted segment type) command again
NEXT: using the parameters supplied, scroll the • Not matched (satisfy the selection
current database position to the next criteria for a segment layout, but Prefix Commands (edit only)
occurrence of a segment type have a length that differs from the D delete a segment and all its dependent segments
PARENT: change position in the database from the segment layout) I Insert an occurrence of the segment type displayed on
current segment to any other segment TOP: scroll to the top of the selected ’view’ of the the line where the command was entered
occurrence in the hierarchical path to the database. If in CHAR mode, paging down R repeat an occurrence of the segment type displayed on
current segment through the segments the TOP command the line where the command was entered
PREVIOUS: using the parameters supplied, scrolls the displays the segments from the original start RA repeat hierarchical substructures in the database. The
current database position to the previous of the display, not necessarily the start of the segment displayed on the line on which the RA command
occurrence of a segment type database. In SNGL mode, the TOP command is entered is the parent of the substructure to be
RCHANGE: repeats the change performed by the previous brings you back to the first position of the repeated. Note: Not supported when using a static PSB
CHANGE primary command. All options displayed segment
specified on the original CHANGE command TWIN: repositions on an occurrence of the current Prefix Commands (browse & edit)
(CHILD, SEGMENT, GET(n), etc.) will still apply segment type under the same parent FC format in Char
to RCHANGE. With GET(n) a new record range TYPE: shows or hides the data type and length FH format in Hex
will be started with an RCHANGE command columns for each displayed field when in SNGL FL format in LHEX
REFS: show or hide the field reference and display format FS format in SNGL mode
redefine columns for each field when in SNGL UNDO: roll back changes since the last checkpoint FT format in TABL mode
display format UP: in multi-segment display, the UP command Using one of the above as a line command against a
RFIND: repeat the search performed by the previous scrolls backwards through the segments in the displayed segment occurrence is effectively the same as
FIND primary command. All options specified database. In single-segment display, the UP scrolling that segment to the top of the display, issuing
on the original FIND command (CHILD, command scrolls backwards through the data a view for that line (if it is other than the current
SEGMENT, GET(n), etc.) will still apply to of the current segment layout) and changing format.
RFIND. With GET(n) a new record range will be VIEW: display currently suppressed segments of the K change your current position in the database to another
started with an RFIND command segment type indicated by the shadow line segment occurrence
RESET: this command “cleans up” the displayed data, selected by the cursor. Segments of other V when you associate a view with a database, FM/IMS
by turning off the highlighting of strings found segment types are suppressed from display. displays segments of one layout. You can enter the V
by the FIND command, and hiding all non- To use the VIEW command, type VIEW on the line command against a segment that has been
matched and suppressed records (equivalent command line, position the cursor on the suppressed from display, and the segment (and all
to entering SHOW ALL OFF). In Edit, you can shadow line of the suppressed segments you segments of the same layout type) are displayed. They
also reset all pending line commands want to view, and then press Enter become currently formatted segments. All other
segments then become shadow lines

Page 7 Page 8 Page 9


REXX
Using FM/IMS in Batch Overview
FM/IMS assigns to each field defined in a template a unique field Example 1 Select segments in which the transaction date (field
In addition to using FM/IMS via ISPF panels, FM/IMS provides two reference number. When you want to refer to a field in a #14) is any date in July 2000, or the transaction value (field #27)
functions that you can use in batch jobs: selection criteria expression, you specify the field’s field is greater than $100,000.00
IEB (IMS Edit Batch) reference number prefixed by #. Note that you can only refer to (#14 >= 20000701 & #14 < 20000801) | #27 > 100000.00
Runs a REXX procedure that can edit segments in an IMS fields defined in the segment you are currently working with.
database. In addition to using any other valid REXX in this You cannot refer to fields defined in a different segment type. Example 2 Select segments in which the count of credit notes
procedure, IEB can contain the following functions:- Note also that, in segment identification criteria, you can only (field #62) is greater than 10% of the count of invoices (field #61)
• DELIMS to delete an IMS segment refer to fields defined in the static portion of the segment (that #62 > #61/10
• GETIMS to retrieve an IMS segment is, the portion of the segment that precedes any variable-length
• ISRTIMS to insert an IMS segment array defined with the OCCURS DEPENDING ON clause). Example 3 Select segments in which the employee identifier
• PRINT to print an IMS segment (field #17) starts with any of the letters A, C, or E.
• REPLIMS to update an IMS segment External REXX FUNCTIONS CO(SUBSTR(#17,1,1),’A’,’C’,’E’)
• VIEWIMS to create a view for later use, or load an
existing view (that you can then use with the GETIMS FM/IMS provides the following external REXX functions that you Example 4 Select segments in which the supplier number (field
function to retrieve a segment) can use, in addition to the built-in REXX functions described in #23) is 997644 or 997645, and the item description (field #33)
Usage notes The REXX functions are available only in REXX the OS/390 TSO/E® REXX Reference (e.g. ABS, MIN/MAX, POS, contains the word ’CABINET’
procedures that you use with IEB. SUBSTR etc.) NCO(#23,997644,997645) & CO(#33,’CABINET’)

IPR (IMS Print) CHANGE change a character string Example 5 Select segments in which the 4-byte packed decimal
Prints either all the segments in an IMS database, or only those CONTAINS check for character values field starting at position 17 in the segment contains a negative
segments selected by the view you specify. If you specify FLD refer to a field from the current input record value
VIEW=Y, then IPR prints only those segments selected by the NCONTAIN check for numeric values FLD(17,4,P) < 0
view. Otherwise, IPR prints all segments in the database. The PRINT print a record
PRTFORM parameter determines the format in which the data is PRTCOUNT count of records printed Example 6 Select segments in which either the transaction value
to be printed: RECSIN count of records read (field #27) is greater than $50,000.00 and the purchase order
• CHAR prints the segments as they are stored in the IMS RECSOUT count of records written to a given data set number (field #25) starts with characters other than ’TX’, or the
database TALLY total a field value and report the total transaction value is greater than $70,000 and the supplier
TM test a string for a bit value number (field #23) is 984545, but not if both sets of conditions
• HEX prints three lines of data for each segment. The
WRITE write a record are true
first line shows the character representation of each
(#27 > 50000.00 & SUBSTR(#25,1,2) ¬= ’TX’) && (#27 >
byte. The second and third lines show the hexadecimal
Note: You can only use these FM/IMS-specific REXX external 70000.00 & #23 = 984545)
value of each byte
functions, and the INREC and OUTREC variables, in a
• SNGL prints the segments split into individual fields
REXX procedure specified by the Use REXX proc field.
down the report
You cannot use these functions and variables in REXX
• TABL prints the segments split into individual fields
procedures outside of this FM/IMS environment.
across the report
Note. To print in SNGL or TABL format, you must use a view. REXX Comparison operators

= Equal
¬=, \= Not equal
< Less than
¬<, \< Not less than
> Greater than
¬>, \> Not greater than
<= Less than or equal to
>= Greater than or equal to
>< Greater than or less than (same as not equal)
<> Less than or greater than (same as not equal)
== Strictly equal
¬==, \== Strictly not equal
<< Strictly less than
¬<<, \<< Strictly not less than
>> Strictly greater than
The IBM Logo and IBM z/OS are registered trademarks of International Business
¬>>, \>> Strictly not greater than Machines Corporation in the United States, other countries, or both.
<<= Strictly less than or equal to IMS is a trademark of International Business Machines Corporation in the United States,
>>= Strictly greater than or equal to other countries, or both.

Page 10 Page 11 Page 12

You might also like