#!/usr/local/bin/perl -w # get_quick_status_update_data.pl # Get the information about the project specified by calling web form # and proceed to ask user for what to change. # Robert C. Groman $version = "V1.20-June 22, 1999"; # June 22, 1999. V1.20 Replace listgb with list. RCG # March 17, 1999. V1.10 Change separator between instrument and SI name to # be "--" rather than "-" to accommodate instrument names using # hyphens. rcg # Assumptions: # Only updates to existing projects in the inventory are allowed. $debug = "no"; #set to no if you want this to update the #real thing. print STDOUT <Get Quick Status Update Data

Get Quick Status Update Data

HEADING if ( $debug eq "no" ) { $datadir = "/data/rgroman/Inventory/"; $dataobj = "/globec/gb/inventory"; $webdir = "/inv"; $scriptsdir = "/data/rgroman/Inventory/scripts"; $list = "/data5/globec/bin/list -c -n -b "; } elsif ( $debug eq "yes" ) { $datadir = "/data/rgroman/Inventory/debug"; $dataobj = "/globec/gb/inventory_test"; $webdir = "/invtest"; $scriptsdir = "/data/rgroman/Inventory/scripts/debug"; $list = "/data5/globec/bin/list -c -n -b "; print STDOUT ("

DEBUG VERSION ONLY

\n"); } else { print STDOUT <Perform Quick Update of Inventory Status

I am sorry but the debug flag ($debug) is not set correctly. I cannot continue. Contact the DMO for help.

TROUBLE exit 1; } $poststring = $scriptsdir . "/poststring"; open PARAM, "$poststring |" or die "Could not get cruise/project information, $!"; $cruiseid=; close PARAM; chomp $cruiseid; $action = $webdir . "/get_quick_status_update_data_1.pl"; print STDOUT ("
\n"); print STDOUT ("

For project/cruiseid: "); print STDOUT ("\n"); print STDOUT < Select from either the list of instruments already referenced for this cruise OR select a new instruments from the list provided. Then click on the "Get details" button. INTRO #Get level 1 data for specified cruiseid #print STDOUT ("

**debug, cruiseid=$cruiseid

\n"); #Get level 1 data for specified cruiseid/project $restriction = "project=" . $cruiseid . ",data_type,siname"; $action = $list . " \"" . $dataobj . "(" . $restriction .")\"|"; #print STDOUT ("
**debug, action=$action
\n"); unless ( open LEVEL1, $action ) { print STDERR ("

Problem accessing data for ", $cruiseid, " using the following command\n"); print STDERR ("
$action
Must quit.\n"); exit 0; } print STDOUT ("

\n"); print STDOUT ("\n"); print STDOUT ("

or select a new instrument from list here:\n"); print STDOUT ("

\n"); print STDOUT ("

\n"); print STDOUT ("

\n"); print STDOUT ("


Last modified: $version\n"); print STDOUT ("\n \n");