USGS InfoBank banner.  USGS, Coastal and Marine Geology, InfoBank banner.
 USGS Coastal and Marine Geology banner.    Search InfoBank.
USGS InfoBank program -- breakdown Skip navigational links
    ________   ________   ______________   ________   _________   _______________   ________  
  tab edge  Home  tab edge  Data  tab edge  Activities  tab edge  FACS  tab edge  Atlas  tab edge  Definitions  tab edge  More  tab edge  
   
InfoBank Programs: by Name   by Data Type   General Tools   GIS   Plotting   Web   USGS Disclaimer   InfoBank Programs   Boothill  
   
Expanded description
Topic Description
Name
breakdown
Synopsis
/infobank/programs/edit/breakdown/breakdown.for
Description
  Program to divide data into files based on value. 
   
  Ex: the DAY field, line number, or cruise ID.
    
Prompts
  Enter input file name:

  Enter the STARTING COLUMN NUMBER (1 to 512) of the id field:
  Enter the LENGTH IN COLUMNS (1 to 9) of this id field:
  The UNIQUE FIELD ID will be in the prefix of the output file name.
                                             (example:  LINE003.DAT)
  <if your field is less than 9 characters...>
  Enter up to <9 - your field length> characters
         for the FIRST PART of the output file PREFIX:
  What should blanks in the id field be handled as?
           <CR> = removed
        <space> = leave as is
    <character> = change blanks to the character entered
  Enter up to 3 characters for the output file SUFFIX:
  Do you want the output files opened with APPEND access?
    
Subroutines
  vesc       (external include)

  openem     (external shareable)
  howlong    (external shareable)
  showlines  (external shareable)
  forerror   (external shareable)
  percentage (external shareable)
    
Author
  Carolyn Hayashida Degnan, 02/04/84

  modified to construct its own output file names, 08/24/84
  evolved from DAYBREAK, 08/24/84
  Clint Steele  3/6/92  added check to skip header (!) records
  Clint Steele  10/28/94  changed zero setting of blanks to underscore
  Clint Steele  2/2/95    added prompt for blank character replacement

    
Opens
 open ( unit = 91, status = 'scratch', file = afilnam )
         open ( unit = 91, name = afilnam(1:namelength), 
*        status = 'unknown',
*        access = aaccess, iostat = ierr, err = 104)
    
Reads
     read ( 5, 11, err = 12 ) istart
     read ( 5, 21, err = 22 ) ilen
 read (5, '(q,a1)') optionlength,option(1:optionlength)
     read ( 5, 41, err = 42 ) aprtfix
 read ( 5, 61, err = 62 ) asuffix
     read ( 5, 70, err = 71 ) aans
     read ( 90, 100, err = 101, end = 102 ) llen, aline
    
Writes
     write ( 6, 10 )
     write ( 6, 20 )
 write (option, '(1x)')
     write ( 6, 40 ) ( 9 - ilen )
 write ( 6, 60 )
     write ( 91, 103 ) aline
    
Calls
 call openem ( 1, 0 )
 call showlines ( 90, 2 )
         call stringlen (afilnam, namelength)
                     call stringlen (afilnam, namelength)
 call forerror ( ierr )
    

Skip footer navigational links

InfoBank   Menlo Park Center   Santa Cruz Center   St. Petersburg Center   Woods Hole Center   Coastal and Marine Geology Program  
 
U. S. Department of the Interior   U. S. Geological Survey   Geologic Information   Ask-A-Geologist   USGS privacy statement   Disclaimer  

URL: /infobank/programs/edit/breakdown/breakdown.doc.html
Maintainer: Clint Steele
Comments: e-mail
Last modified: Wed Nov 20 15:01:01 PST 2002  (wcs)