Announcement

Collapse
No announcement yet.

Formats

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Formats

    Hi Ted,

    Formats are created and stored in a SAS catalog called FORMATS.SAS7BCAT, which can reside in 3 places in the system and is referenced by a format library definition in the System Administration module > Studies under the Library tab.


    GFORMAT – Global system format library, these formats are available all the time for use in data structures, Data entry screens or in Base SAS code.

    SFORMAT – Source level format library, active when a study is selected in that source and applies to all studies under that source.

    PFORMAT – Study level format library, active when that study is selected, only applies to that study.


    These are assigned to a format search path where formats are searched bottom up. For example, if you use a format called $yesno and it is assigned at the global level, SAS will search this path – pformat, sformat, then gformat.

    The format build provides a way of creating and managing the formats from within the system and are stored into the level that you select. The format catalog (at any level) could just as easily be created with an external SAS program.


    Formats are used in two ways in our system.

    1. In Data Structures – this is the typical way sas formats are used. A field is formatted with $yesno to display Yes or No instead of the stored raw value 1 or 0.

    2. In data entry screens, a format can also be used as a source for the items in a selection type object, such as a drop down combo box. This really has no connection to the format definition in the associated data structure; it just provides a friendly selection for the user – the name will be displayed and the value will be stored to the dataset when updated. If the data structure does not have a format assigned to the field, then when you view or print the data you will just see the raw value. So, if you want it to print with the formatted value, you also need to assign the variable the format in the data structure definition.

    Regards,

    Greg-


    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


    From: Ted Parmenter
    Sent: Wednesday, November 19, 2008 9:19 AM
    To: Support
    Subject: Question about format availability

    I have a question about the use and availability of formats. I believe there are three places where formats may be created:

    1) Study Administration/Data Structures (Mode: Edit Structures)/Format Builder

    2) Study Administration/Format Builder

    3) Study Information/Listings

    Here is where I am fuzzy:

    Where are these formats supposed to be available for use? So far as I can tell, they are not available in the same places. What I see is, when a format is created under ‘Data Structures’ or ‘Listings’, it is available for use when specifying formats used in data structures and/or listings. And, when a format is created in the ‘Format Builder’, it is available only in Study Administration/Screen Design (mode: Edit Screen)/Values List Editor. Is this accurate?

    What are the purposes of the two sets of formats? Is one set of formats (the ones created either in Data Structures or Listings) only for the back end and data/listing output, and the other set (the ones created in Format Builder) only for the front-end user interface?

    If every format is supposed to be available anywhere formats are listed, regardless of where the format was created, then I am apparently doing something wrong, because that is not what I see.

    Thanks for your help.

    Ted
Working...
X