Libraries

#### Search Results

Search

# Libraries

This section covers the following topics:

- What are Libraries?

- Creating Libraries

- Listing Libraries

- Copying Libraries

- Deleting Libraries

- Listing Library Members

- Copying Library Members

- Deleting Library Members

- The Information (Info) Function

## What are Libraries?

For a definition of private, public and common libraries, see Libraries in Using Super Natural in the User's Guide.

You can perform the following commands on libraries:

| ADD | MODIFY | COPY | DELETE | INFO | MEMBER
Private Library |  |  | X | X |  | X
Public Library |  |  | X | X |  | X
Common Library |  |  | X | X |  | X

Super Natural libraries can contain the following types of members:

- Transaction programs

- Prototype programs

- Application programs

- Data models

- Layout member

- Work-in-progress layout member

You can perform the following commands on members:

| ADD | MODIFY | COPY | DELETE | INFO | MEMBER
Member |  |  | X | X | X |

## Creating Libraries

There is no `Add Library` function.

To create a library

- Copy an existing library specifying the required library prefix for the target library.

  Common libraries are not created until they are defined in the Common Library Definition List (although they may appear in the Library List).

Note
Libraries are not created until members are copied to them.

## Listing Libraries

To list libraries with a certain prefix and member prefix

1. Issue the `LIBRARY` command.

   Or:
   Select the object Library from the AdministrationMenu.

   The Library List screen appears as in the following example:

        14:49                      ***** Super Natural *****                 1999-05-21
        SBE                            - Library List -                           SNMLL
                                                                          More:   - +
                         Library prefix: Y  Program prefix: I
                    Cmd  Library  Programs
                         *______
                     __  DD           7
                     __  DEMO         1
                     __  ESC         58
                     __  EZA         48
                     __  FHA          1
                     __  FSO          3
                     __  HAA          9
                     __  HAH         55
                     __  HAH1        15
                     __  HAH2        13
                     __  HAH3        13
                     __  HSE          6

        Cmd(s): Copy, Delete, Member
        Select one command from list
        Command ===>
        Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
              Help        Exit              Flip        +                       Canc

   The Library List screen shows the following:

   - Library prefix

   - Member prefix

   - The libraries defined to Super Natural with the library prefix and member prefix shown

   - The number of programs with the prefix shown contained in each library shown

2. Enter the prefix for the type of library you want to see in the Library Prefix field.

3. Enter the prefix for the type of program you want to see in the Member prefix field.

   The libraries with the prefix specified are listed and the number of programs with the prefix specified contained in each library is shown.

## Copying Libraries

You use the `Copy Library` function to copy members of a certain type either to an existing or to a new library. You cannot copy all the members of a library at once. You must copy each member type separately.

Notes:

1. When you copy a transaction, its layout member is also copied.
2. If you copy transactions created with Super Natural Version 2.4.2 or below, a dummy layout member is created for each one.
3. You cannot copy transactions with transaction mode for reporting Destination USER FILE between libraries.

To copy a library

- Issue the `COPY LIBRARY` command specifying source and target library prefix and name as in the following example:

       COPY LIBRARY YTEST I ZPUBLIC I

  If you enter `CO` in the command column of the Library List screen next to the library you want to copy, a window appears which prompts you for prefix and name information.

  A window appears showing which members are currently being copied. If there is already a member with the same prefix and name in the target library, you are asked if you want to replace (overwrite) the member in the target library.

## Deleting Libraries

You use the `Delete Library` function to delete members with a certain prefix from libraries. You cannot delete all the members of a library at once. You must delete each member type separately.

If you delete all transactions, the layout members which belong to them are also deleted. However, the work-in-progress layout members are not deleted. Work-in-progress layout members (prefix!) can only be deleted from the Member List screen.

Note
A library itself is not deleted until all its members are deleted.

To delete a library

1. Issue the `DELETE LIBRARY` command specifying library prefix, library name and program prefix as in the following example:

        DELETE LIBRARY YTEST I

2. Confirm the deletion in the window which appears.

   All the programs with the prefix specified are deleted from the library.

   Or:
   Enter `DE` in the command column of the Library List screen next to the library you want to delete.

3. Confirm the deletion in the window which appears.

   All the programs with the prefix specified in the Member prefix field of the Library List screen are deleted from the library.

Note
You must delete common libraries and their definitions separately.

## Listing Library Members

To list the members contained in a library

- Issue the `MEMBER` command specifying library-prefix, library-name and program-prefix.

  The Member List screen appears:

       14:50                      ***** Super Natural *****                 1999-05-21
       SBE                             - Member List -                           SNMML
                                                                         More:     +
                        Library prefix: Y  Member prefix: I
                   Cmd  Library  Member
                        SBE____  *______
                    __           AUTO
                    __           CONNECT
                    __           CONTROL
                    __           CONT2
                    __           DATACH
                    __           DATACH2
                    __           DATACH3
                    __           DATA2
                    __           DATA3
                    __           DATA4
                    __           DATA5
                    __           DATA6

       Cmd(s): Copy, Delete, Info
       Select one command from list
       Command ===>
       Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
             Help        Exit              Flip        +                       Canc

  The Member List screen contains the following information:

  - Library prefix

  - Member prefix

  - The name of the library whose members are listed - you can overtype this with another library ID

  - The members with the prefix specified contained in the library specified

## Copying Library Members

To copy a library member

- Issue the `COPY MEMBER` command specifying library prefix, library name, member prefix and member name for both source and target member as in the following example:

       COPY MEMBER YSBE ISAMPLE3 CTUTOR ISAMPLE3

  If you enter `CO` in the command column of the Member list screen next to the member you want to copy, the Copy Member window appears which prompts you for name and prefix information for the target library and target prefix.

  In some cases, you cannot copy a transaction to another library because of layout conflicts.

Note
You cannot copy transactions with transaction mode for reporting Destination USER FILE between libraries.

## Deleting Library Members

To delete a library member

- Issue the `DELETE MEMBER` command specifying library prefix, library name, member prefix and member name as in the following example:

       DELETE MEMBER YSBE ISAMPLE3

  Note
  If you enter `CO` in the command column of the Member list screen next to the member you want to copy, the copy member window appears which prompts you for name and prefix information for the target library and target prefix.

## The Information / Info Function

To obtain information about a member

- Enter the command abbreviation `IN` in the command column of the Member List screen next to the member name.

  Or:
  Issue the `INFO MEMBER` command specifying library prefix, library name, member prefix and member name as in the following example:

       INFO MEMBER YSBE IDATA3

  The Transaction Information window appears:

       11:47                      ***** Super Natural *****                 1999-05-24
                                       - Member List -                           SNMML
                                                                         More:     +
                  +---------------------Transaction Information----------------------+
                  ! Transaction .......... DATA3    Version .... 3.1.0               !
                  ! Created/modified by .. SBE      Date/Time .. 1993/01/12 12:03:00 !
                  ! Description .......... data maintenance transaction t            !
                  !                        ype UPDATE MULTIPLE                       !
                  ! Type ................. Update single                             !
                  ! Selection ............ Full-screen                               !
                  ! Data change .......... None                                      !
                  ! Report type ..........                                           !
                  ! Report level ......... Detailed                                  !
                  ! Destination .......... Screen                                    !
                  ! Run mode ............. Online                                    !
                  ! Primary file ......... PERSONNEL                                 !
                  ! Sec. file ............                                           !
                  ! User file ............                                           !
                  !                                                                  !
       Cmd(s): Co +More:   +---------------------------------------------------------+

       Command ===>
       Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
             Help        Exit              Flip  -     +                       Canc

  The Transaction Information window supplies the following information:

  - Transaction name

  - Super Natural version with which the transaction was created

  - Who created/last modified the transaction

  - When the transaction was created/last modified

  - User-entered transaction description

  - Information about the transaction modes (Report Type, Data Selection etc.)

  - Primary file

  - Secondary file (if defined)

  - Name of user file (for Destination USER FILE)

  You can page forward to obtain information on the following if relevant to the transaction:

  - Link and lookup fields used.

  - Selection criteria

  - Calculation

  - Logical conditions

  - Fields used

  When you print the information, you are also provided with information on the entries made in the Worksheet.

### On this page

- What are Libraries?
- Creating Libraries
- Listing Libraries
- Copying Libraries
- Deleting Libraries
- Listing Library Members
- Copying Library Members
- Deleting Library Members
- The Information / Info Function