HP3000-L Archives

January 2002, Week 1

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Hans Hendriks <[log in to unmask]>
Reply To:
Hans Hendriks <[log in to unmask]>
Date:
Fri, 4 Jan 2002 11:47:01 -0600
Content-Type:
text/plain
Parts/Attachments:
text/plain (46 lines)
Joe M Andress <[log in to unmask]> wrote in message news:<[log in to unmask]>...
> I have a desire to perform the following type of SUPRTOOL pseudo-activity
>
> ITEM YMDEFF,DATE,YYYYMMDD          {date item as X(08) in form of YYYYMMDD}
> ITEM YMDHIRE,DATE,YYYYMMDD         {data item as X(08) in form of YYYYMMDD)
>
> EXTRACT YMDHIRE = $DATE(YMDEFF) - 30
>
> I know this is not correct but the desired impact is to calculate a data
> item that is 30 (days) prior to the value of the value of YMDEFF.

Joe,

You need to use the $days and $STDDATE functions to do this:
  $days(fieldname) converts the field to a juliandays value, i.e. the
offset in days since Jan 1st, 4813 BC.
  $stddate(fieldname) converts a date to CCYYMMDD format.

So, in your case, you need to convert YMDEFF to a juliandays value,
deduct 30, and convert the result into a CCYYMMDD date again. This
will take two passes:
  item YMDEFF,date,yyyymmdd
  define j-YMDEFF,1,4,int
  extract j-YMDEFF = ($days(YMDEFF) - 30)

...then in the next pass:
   item j-YMDEFF,date,julianday
  extract YMDHIRE = $stddate(j-YMDEFF)

The next challenge is to use the result to update the dataset.
Suprtool version 4.5 has the new "Update from a table" feature
described at: http://www.robelle.com/tips/upd-from-table.html

For older versions of Suprtool, see:
http://www.robelle.com/support/suprtool/massupdates2.html

Regards,

/Hans
Hans Hendriks
Robelle Solutions Technology
[log in to unmask]

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2