The following are Frequently Asked Questions concerning the socket tool created by Richard Foy [White Cloud Software] to allow interaction between PROMAX and USP routines within the PROMAX environment. If you would like to contribute to this FAQ, please send mail to pgarossino@amoco.com.
Last updated May 19, 2000
Basics
tpipe
Error Codes
3.0 My job starts and then hangs with the following message in the view window "
1.0 What happened to the old PROMAX<->usp interface?
1.1 How do I enter a USP command line sequence to this tool?
1.2 Can I run USP job scripts from within PROMAX?
1.3 I have a script that reads from stdin, writes to stdout. It doesn't run...what gives?
or
#! /bin/ksh -f
or
#! /bin/sh -f
or you favourite shell declaration to the start of the script and try again. If this doesn't clear up the problem give us a call.
1.6 How can I input a USP dataset to PROMAX using the PROMAX<->usp interface?
1.7 What is the big deal if I use 16 bit data representation
in PROMAX?
We found during development that USP users generally ran either from the command line or from scripts that they constructed and kept archived for future use. The old interface could not access this archive of processing jobs. This version runs the USP portion of the flow from a script which allows among other things the use of named pipes etc.
Yes you can. You can build your usual jobs
on the USP side as you would for execution inside XIKP.
Your script would not specify an input OR an output:
would be a script that would provide you with a headers
only dataset on the USP side. Once you had that you could
for instance:
#! /bin/csh -f
hdrstrip -O2 headers
which would do time slice filtering of your input dataset.
It is important to restore the headers as the PROMAX header
entry [InTrCn] is required to resync with your PROMAX database on the way
back into PROMAX.
#! /bin/csh -f
ttds3d -ND txy -OD xyt |\
fkkstrip -l5 -AM -pass |\
ttds3d -ND xyt -OD txy |\
hdrswap -N2 headers
During the development of this tool we found that it was difficult to give the user all the flexibility of Unix within PROMAX [named pipes etc.] without specifying the shell in the job script. If you script is not running try adding:
#! /bin csh -f
If you click on that default the entry will change to allow you to input the number of records you will be feeding to the USP flow. We have tried to make the routine smart enough to figure this out and would appreciate a mail note with the particulars of your case so we can improve the tool. In the mean time please enter the number of ensembles you expect to flow through the USP flow by hand.
1.5 How can I output a USP dataset from PROMAX using the PROMAX<->USP interface?
First of all make sure your "mode of operation" is "PROMAX->USP->PROMAX mode". In your USP job script insert any of the following:
tpipe "editt -O your_dataset"
tpipe is a routine that will pass a copy of stdout to
whatever is in quotes AS WELL AS passing the data onto
the rest of the flow which is required by the PROMAX end
of the tool. An alternative, if tpipe is not available on your system would be:
wye " cat > your_dataset" "cat"
Another alternative would be :
tee your_dataset
These commands all have in common that they provide a copy of the USP datastream back to the PROMAX<->USP interface. This is required for the socket-tool to run.
Make sure your "mode of operation" is "read in a raw USP datset". Now detect "name of the USP disk dataset to be input" where you may enter the fully qualified path name of your use dataset. It is a good idea to give PROMAX the details of the primary and secondary sort order of this dataset. You can do this by filling out the "Description of the USP datset entry". By default a minimum set of PROMAX headers will be populated. If you desire additional or specific mapping of USP trace header values into PROMAX make use of the "USP->PROMAX Mapping Parameters" section of the menu.
This is very much a data dependant question. If your
data amplitudes fit within the bounds of +/- 32768 then
you are probably OK. Be aware though that if you feed
PROMAX 32 bit data the input routine will scale your data every 100 samples in an attempt to
prevent clipping. If you are not interested in having
this happen then don't do the conversion. Simply process in 32 bit to start with.
2.0 awk doesn't appear to honour the $2 in the following when combined with tpipe.
3.0 My job starts and then hangs with the following message in the view window
Of course in this case there was a trailing blank behind the line continuation character on the utop line that resulted in the odd stty: message above. If you see this message go look at your USP script and remove any trailing blanks. In vi you can hit "shift $" to get to the end of the line. If this takes you to a position beyond your line continuation character then you are issuing a null command to Unix which causes the job to stop. This is so as there is now NO line continuation after the null and the next line, expecting input on stdin, never gets it. The job just sits there waiting......at least until you kill it.
Also notice the permission denied line just below. That is a real red herring. It caused me to waste several hours diagnosing this problem the first time I hit it. The key here is the stty message complaining about a blank command.