Coastal & Marine Geology InfoBank

Home FACS Activities Atlas Geology School Related Sites More

USGS InfoBank program -- breakdown

Skip navigational links
Loading
InfoBank Programs: by Name   by Topic  
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> char
         for the FIRST PART of the output file PREFIX:
  What should blanks in the id field be handled as?
           <CR> = r
        <space> = leave
    <character> = change blanks to the character e
  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

    
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
101       read ( 90, 100, err = 101, end = 102 ) llen, aline
Writes
          write ( 6, 20 )
      write (option, '(1x)')
          write ( 6, 40 ) ( 9 - ilen )
      write ( 6, 60 )
          write ( 91, 103 ) aline
Opens
      open ( unit = 91, status = 'scratch', file = afilnam )
              open ( unit = 91, name = afilnam(1:namelength), 
     *        status = 'unknown',
     *        access = aaccess, iostat = ierr, err = 104)
Calls
      call openem ( 1, 0 )
      call showlines ( 90, 2 )
              call stringlen (afilnam, namelength)
                          call stringlen (afilnam, namelength)

Skip footer navigational links

Coastal and Marine Science Centers:  Pacific   St. Petersburg   Woods Hole  
InfoBank   Coastal and Marine Geology Program   Geologic Information   Ask-A-Geologist   USGS Disclaimer  


Accessibility FOIA Privacy Policies and Notices

Take Pride in America logo USA.gov logo U.S. Department of the Interior | U.S. Geological Survey
URL: http://walrus.wr.usgs.gov/infobank/programs/edit/breakdown/breakdown.doc.html
Page Contact Information: InfoBank staff
Page Last Modified: Mon Sep 16 03:37:02 PDT 2013  (chd)