Welcome to P-STAT

We specialize in TURF and TABLES:
PLUS Statistics, Data Management and Report Writing
P-STAT® is a registered trademark of P-STAT, Inc.
Simple Solutions for Complex Problems

Simple Solutions for Complex Problems









P-STAT 2.23
Revision 16


FORMAT.DATE is a major enhancement in processing dates

Preparations for P-STAT 3.

P-STAT 2.23 revision 16

P-STAT Version 2.23 revision 16 is the latest version available for PC/Windows, Linux and Solaris. This release has a major enhancement in date processing. FORMAT.DATE provides a template which tells P-STAT how dates should be displayed. The input to FORMAT.DATE are the values to be converted according to the rules of the template.

        PUT ( FORMAT.DATE ( 'Sept 15 2003', ##template )) $

        If ##template   =     'yyyy dow month dd'
        The result is:             2003 mon september 15

        If ##template   =     'yyyy Dow Month dd'
        The result is:             2003 Mon September 15

        IF ##template   =     'Day.of.week, Month dd, yyyy'        
        The result is:               Monday, September 15, 2003

Other controls are available to handle time, AM, PM, and differentiate noon and midnight. The third example above illustrates how commas, colons, dashes, etc. can be used to separate the values. FORMAT.DATE in the help file contains complete documentation.

Tricks of the trade

  1. SAMPLE produces an output file that is a random sample of the input file. This, by itself, makes a useful command. The feature that makes it unique is the ability to specify specific variables in the input file which are to be matched in the output file.

    If these "BY" variables are used, each such subgroup will be sampled to the same extent as the file as a whole. There is a limit of 15 BY variables but no limit on the number of subgroups that they define.

  2. EXPAND is the type of function that justifies our belief that P-STAT does indeed have "Simple Solutions for Complex Problems". EXPAND is one of the PPL funtions supported by the menus available in PC/windows.

    EXPAND can be used to convert a single variable into a new set of dummy variables. See this example for details.

    EXPAND can also be used to project multiple input variables into the set of new variables. In this usage there are several options for the output variables.