Re: [foxboro] Fwd: IACC Database in excel format

  • From: "William C Ricker" <wcricker@xxxxxxxxxxxxxxx>
  • To: <foxboro@xxxxxxxxxxxxx>
  • Date: Sat, 2 Jul 2011 17:17:44 -0400

I have a little script ...

This produces 2 files for each CP.  {LTRBUG}.txt is direct from the ICCAPI,
and {LTRBUG}.src is a 4 column file. 
 Col 1   Compound name
 Col 2   Block name
 Col 3   Parameter
 Col 4   Value

The source file imports quite nicely to a spreadsheet.
I normally put this into a directory called  '/opt/customer/cio'.
The files are dropped into the same directory the script runs from.

If you use it on windows, and you use the ".sh" extension, you can run
it directly by a double-click in the explorer.  On the windows box,
it must run on the AW which hosts the CPs you want to document.

Line 7 refers to '/etc/nt_cplns'.  On a Windows box, this file lists the CPs

hosted by the AW it's running on.  On a Solaris box, this should be 
file '/etc/cplns'.



Regards,
William C Ricker
FeedForward, Inc.


- getsrc.sh
----------------------------------------------------------------------------
--------

#! /bin/sh

exec >$0.log 2>&1


if [ ! "$1" ] ; then
  LIST=`cat /etc/nt_cplns`
else
  LIST="$*"
fi


od=`pwd`

for CP in $LIST ; do
  cd /opt/fox/ciocfg/api

  iccdrvr.tsk <<.end >$od/$CP.txt
OPEN $CP all $0
GET *:* ALL
CLOSE
EXIT
.end

  awk '
BEGIN  { blk="" ; cmp = "" }

$1=="NAME"      { cln=index($3,":")
                  if (cln==0) { cmp = $3 ; blk = cmp }
                  else       { cmp=substr($3,1,cln-1) ; blk=substr($3,cln+1)
}
                  next
                }
$1=="END"       { next }
                { printf "%-12.12s %-12.12s %-6.6s
%s\n",cmp,blk,$1,substr($0,12) }

                               ' $od/$CP.txt >$od/$CP.src


  set -x

  cd $od
done
----------------------------------------------------------------------------
--------


-----Original Message-----
From: foxboro-bounce@xxxxxxxxxxxxx [mailto:foxboro-bounce@xxxxxxxxxxxxx] On
Behalf Of manan raval
Sent: Saturday, July 02, 2011 2:33 AM
To: foxboro
Subject: [foxboro] Fwd: IACC Database in excel format

Hello Freelist,

Is there any way, that we can fetch all configured blocks parameters
in EXCEL or any other tabular formate?

Regards,

M B Raval
 
 

 
 
_______________________________________________________________________
This mailing list is neither sponsored nor endorsed by Invensys Process
Systems (formerly The Foxboro Company). Use the info you obtain here at
your own risks. Read http://www.thecassandraproject.org/disclaimer.html
 
foxboro mailing list:             //www.freelists.org/list/foxboro
to subscribe:         mailto:foxboro-request@xxxxxxxxxxxxx?subject=join
to unsubscribe:      mailto:foxboro-request@xxxxxxxxxxxxx?subject=leave
 

Other related posts: