Coastal & Marine Geology InfoBank

Home FACS Activities Atlas Geology School Related Sites More

USGS InfoBank program -- boxswap

Skip navigational links
Loading
InfoBank Programs: by Name   by Topic  
Expanded Description
Topic Description
Name
boxswap
Synopsis
/infobank/programs/edit/boxswap/boxswap.for
Description
  Program to swap location information of two .item files.

       
AUTHOR
  Clint Steele        4/3/2003


    
Reads
      read (5, '(i)', err=91, end=99) box1
      read (5, '(i)', err=92, end=99) box2
      read (90, '(q,a)') ALineLength, ALine(1:ALineLength)
      read (91, '(q,a)') ALineLength, ALine(1:ALineLength)
      read (90, '(q,a)') ALineLength, ALine(1:ALineLength)
      read (91, '(q,a)') ALineLength, ALine(1:ALineLength)
      read (90, '(q,a)', end=81) ALineLength, ALine(1:ALineLength)
      read (91, '(q,a)', end=82) ALineLength, ALine(1:ALineLength)
Writes
      write (path1, '(a,i3.3,a,i5.5,a)')
     *     '/infobank/items/',box1/100,'00s/',box1,'.item'
      write (path2, '(a,i3.3,a,i5.5,a)')
     *     '/infobank/items/',box2/100,'00s/',box2,'.item'
      write (92, '(a)') ALine(1:ALineLength)
      write (93, '(a)') ALine(1:ALineLength)
      write (93, '(a)') ALine(1:ALineLength)
      write (92, '(a)') ALine(1:ALineLength) 
      write (92, '(a)') ALine(1:ALineLength) 
      write (93, '(a)') ALine(1:ALineLength)
Opens
      open (unit = 90,
     *      access = 'sequential',
     *      form = 'formatted',
     *      status = 'old',
     *      file = path1(1:PathLength))
      open (unit = 91,
     *      access = 'sequential',
     *      form = 'formatted',
     *      status = 'old',
     *      file = path2(1:PathLength)) 
      open (unit = 92,
     *      access = 'sequential',
     *      form = 'formatted',
     *      status = 'unknown',
     *      file = '/infobank/tmp/boxswap.1.temp')
      open (unit = 93,
     *      access = 'sequential',
     *      form = 'formatted',
     *      status = 'unknown',
     *      file = '/infobank/tmp/boxswap.2.temp')
Calls
      call stringlen (Path1, PathLength)
      call stringlen (Path2, PathLength)
      call system ('/bin/mv /infobank/tmp/boxswap.1.temp '//
     *             Path1(1:PathLength))
      call system ('/bin/mv /infobank/tmp/boxswap.2.temp '//
     *             Path2(1:PathLength))

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/boxswap/boxswap.doc.html
Page Contact Information: InfoBank staff
Page Last Modified: Mon Sep 16 03:37:01 PDT 2013  (chd)