IDMS Bachman Diagrams with VISIO.

Preface.

The IDMSBach.vss and IDMSBach.vst VISIO files were created with and for use on VISIO Enterprise 5.0, but should usable in any VISIO 5.0 version. The applications will not work in earlier versions of VISIO and there is no guarantee that they will work in VISIO 2000.

The dialogs and programs were created to help IDMS DBAs and Programmers produce Bachman digrams of their databases. There may be situations that has not been considered, and you are asked to forward requests for changes to Tommy Petersen.

Contents.

Getting Started.
Functionality.
Automatic Diagram Creation.
Manual Diagram Creation.
Adding Records.
Adding Sets.
System owned sets.
Multimember sets.
Reconnecting Set Pointers.

Getting Started.

Before you start you need to have VISIO 5.0 installed on your PC.

Next you need to store the two files IDMSBachman.vss and IDMSBachman.vst on your hard drive. I suggest that you store those in the VISIO\SOLUTIONS\DATABASE folder which will make them come up nicely as IDMSBachman when starting VISIO and selecting Database.

If you want to utilize the Automatic Diagram Creation you also need a copy of a punched schema on your hard drive, the file must be called c:\schema.txt. Create the file on the mainframe by running IDMSCHEM with a "PUNCH SCHEMA schema-name." Statement, and download it as an ASCII file to your PC.

The programs create two other files on your hard drive: c:\schemaf.txt and c:\schemaf2.txt. Make sure that none of those files already exist on your hard drive, there is no warning prior to overwriting those files.

Functionality.

Diagrams can be created manually by dragging icons from the Stencil to the Drawing Surface, and entering record and set descriptions into dialog boxes, or the diagram can be created automatically by downloading a schema to the PC and having the tool automatically create and enter information in records and sets.

Automatic Diagram Creation.

After downloading a schema to the hard drive (see above), open the IDMSBachman template, and drag the GO icon from the Stencil to the Drawing Surface.

The Layout dialog will appear. You need not enter any information here, you will however need to press the Save button before continuing.

In the Layout dialog, you can enter positions for your records, e.g. you can lay out the diagram, by entering Column and Row coordinates for the records, columns will be spaced 3 inches apart and rows will be spaced 1.5 inches apart. Fifteen minutes spent entering coordinates will save a lot of work later. There is no checking of the coordinates, so be careful not to place two records at the same coordinate as they will be placed so one covers the other in the finished diagram. The records can be moved manually after the diagram has been created.

After the coordinates have been entered, press Save to save the file as c:\schemaf2.txt. You may want to back this file up, as you can use it for imput later if necessary. Pressing the "Read Formatted File" button will read the c:\schemaf2.txt file in with the entered column and row coordinates.

Press Draw, the diagram will now be drawn and all sets added and connected to their owner and member records.

Records and Sets can be added later by following the instructions for Adding Records and Adding Sets below.

Manual Diagram Creation.

Diagrams can be created manually, this is recommended only if you have a small schema, or a lot of time on your hands. Sometimes VISIO does not correctly populate the first shape in the diagram, so it is recommended that you first drag a record onto the diagram and leave it blank. You are advised to add all your records before adding any sets.

Adding Records.

Drag the Add A Record icon from the Stencil to the Drawing Surface and enter the information into the dialog. Be careful to spell the record name correctly as this is used later to connect the sets.

Press Update to add the record, or Leave Blank to create an empty record shape on the drawing surface.

Adding Sets.

Drag the Add A Set icon from the Stencil to the Drawing Surface and enter the information into the dialog. Member name must be the name of a record already added to the diagram. Ownername must be either of the name of a record already added to the diagram, "SYSTEM" or "VSAM". Both SYSTEM and VSAM owners will be added as System Owned Indexes.

The sets will be connected to the center of the Owner and Member records, except for System owned indexes where the set is connected from the bottom of the triangle to the center of the Member record.

System Owned Sets.

System owned sets (Indexes) can be either SYSTEM or VSAM sets, but are in the programs treated the same way. The represenntation of the System Owner is created automatically.

Multimember Sets.

Multimember sets are not handled.

You will need to disconnect the set from the Member record it is connected to. Then drag the Multimember Connector icon to the drawing surface and connect it to the empty end of the original set and to the Member record, repeat this for each member record.

 

Reconnecting Set Pointers.

All sets are by default connected to the center of the Owner and Member records. You will need to go through the diagram and reconnect the sets to the connection points (small blue Xs on the perimeter of the record shapes) of the records.

You can re-route sets, by dragging the green handles on the connectors.