Recent Posts

Pages: [1] 2 3 ... 10
1
Prelude Support / Re: User Activity
« Last post by DonQuixote on August 22, 2018, 07:16:47 am »
Thank you.  This is providing the information requested.
I am on a similar system as you describe.  Another suggestion someone else provided was on the AIX level.
They said all the login information is maintained in /etc/security/lastlog   file.   But, since only root has access the benefit is limited.
Thanks again.  I did have to create dictionary items since the attribute you mentioned is an undocumented feature.  lol.
2
Prelude Support / Re: User Activity
« Last post by Tom Pellitieri on August 22, 2018, 05:35:27 am »
Just a follow up on this:

It appears that there's only one entry per Port number.  I checked the attribute, logged off SB+, then logged back in without disconnecting my Linux account.  I rechecked, and there was not a second value for the current port.  The login time matched the new login.

We're currently using SB+ on a Red Hat Linux system with UniData.  In UniData, users are assigned the lowest available port number when they connect.  This was true when we used AIX as well.  When we were on Advanced Pick/Pick D3 under AIX (17+ years ago), port numbers were static based on physical (tty) connections.
3
Prelude Support / Re: User Activity
« Last post by Tom Pellitieri on August 21, 2018, 01:50:01 pm »
There isn't a standard report anywhere that I know about.  However....

Attribute 24 of the User ID Record in DMSECURITY appears to have a MV with the ten most recent SB+ login date, time, and port.  For example, my record (~TRP) has these values:

1849636387.0011
1849634370.0058
1849632836.0049
1849557503.0007
1849540550.0072
1849529878.0054
1849529865.0053
1849229330.0056
1849229324.0043
1849131930.0057

The first value shows I logged in today (Pick date 18496) at 36,387 seconds past midnight (10:06:27 am) on Port 11

There's no indication of when they log out. 

You may find additional information at the O/S level, using the O/S login.  In (Red Hat) Linux, you may use

last login-id

to get a list with login and duration.

--Tom
4
Prelude Support / User Activity
« Last post by DonQuixote on August 21, 2018, 11:48:00 am »
Is there a list somewhere showing LOGIN activity by USER.ID?
I'm not saying all their actions; I'm just saying logging into the system.
5
Prelude Support / Re: Please explain Error Message
« Last post by Tom Pellitieri on June 20, 2018, 12:28:06 pm »
If you're doing this from BASIC, you might only need to select ORDER.HISTORY.  The corresponding Line Keys are in Invoice order in Attribute 200.  Here's the BASIC framework.

Code: [Select]
CMD = "SELECT ORDER.HISTORY WITH ":(criteria):" BY ":(sort options)
EXECUTE CMD
LOOP WHILE READNEXT ID DO
   READ HREC FROM F.ORDER.HISTORY,HID THEN
      IX = DCOUNT(HREC<200>,@VM)
      FOR I = 1 TO IX
         READ LREC FROM F.ORDER.HISTORY.LINE,HREC<200,I> THEN
            (decide if you need the line or not, and print what you need)
         END
      NEXT I
   END
REPEAT

You could use /RW and a work file as well.  Rather than copying ALL of the data to a new file, I suggest that you create a file with just the record keys from both files, with no data.  You can then use dictionary items to pull the data you need from the appropriate file.  Since ORDER.HISTORY.LINE uses a two-part key (ORD.KEY!LINE), you don't have to worry about having the same key in both files. 

Since you might have multiple users running the report at the same time, I would suggest pre-pending @PORT (or PORT in BASIC) to the key when you write it to the file.  Header IDs would be port!orderkey and Line IDs would be port!orderkey!linenumber.

I do this for some tracking I need to do for our Sales reports.  I have to get Freight Charges from ORDER.HISTORY, and other Sales information from ORDER.HISTORY.LINE.  I have my own file with the appropriate keys only, and set up the few derived fields I need (e.g., Fiscal Period from ORDER.HISTORY, Ship Quantity/Ext. Price from ORDER.HISTORY.LINE).

For example, you can set up these derived fields in SB+:

PORT - A3:  <0>"G0!1"
ORD.KEY - A15:  <0>"G1!1"
BASE.LN - N3:  <0>"G2!1"
SORT.LN - N3:  (IF(BASE.LN="",0,BASE.LN))

You can also use SB+ F(file,key) derivations to get whatever fields you need from either file.  For example:

SHP.QTY - N6:  (IF(BASE.LN="",0,F("ORDER.HISTORY.LINE",KEY)<41>)
PERIOD - A5:  (F("ORDER.HISTORY",ORD.KEY)<72>)

Another alternative would be to run the report strictly from ORDER.HISTORY.LINE, and get the information from the header only for the first record of each order.  You would have to track when your order number changes to get the header information out.

Yet another alternative would be to use /RW from ORDER.HISTORY, and use a Process After Read paragraph to read the lines and load appropriate MVs into an @WORK slot.

Needless to say, there are a lot of ways to attack this.  Not knowing exactly what you need from both files makes it hard to give you better advice.
6
Prelude Support / Re: Please explain Error Message
« Last post by DonQuixote on June 20, 2018, 09:29:01 am »
My original problem is to blend the ORDER.LINE and ORDER.HISTORY.LINE files for a report.
The report is done using a basic program; so if the ID is not in one file then I read the other.
Instead of creating a work file as originally planned, I'm now thinking to work around that issue.
I could select the IDs I need from one file and then the other.  I can merge the two list using.
merge.list 1 UNION 2

It worked except for one thing; the sort.
I need to sort the blended lists by the order number and by the line number.
Remember the size of this select list is huge.
Any ideas?
7
Prelude Support / Re: Please explain Error Message
« Last post by DonQuixote on June 19, 2018, 07:38:04 am »
Thank you. That's exactly the answer. Thank you.
8
Prelude Support / Re: Please explain Error Message
« Last post by Tom Pellitieri on June 19, 2018, 04:49:44 am »
Check the physical size of the file at the O/S level.  Linux/Unix/AIX has a file size limit of around 2Gb.  If the file gets too big, you need to make it dynamic so the data can be split into multiple parts.

Generally, any file over 1.5Gb should be reviewed to purge old records or made dynamic instead.

Given that you are creating an historic copy of ORDER.HISTORY.LINE, I would recommend you use

CREATE.FILE WRK.port 3701,16 DYNAMIC KEYDATA

If no one is accessing the file, you may reformat your existing file using

memresize WRK.port 3701,16 MEMORY 64000 DYNAMIC KEYDATA

The MEMORY keyword allocates 64Mb to use during the resize.  The default is 8Mb, which is extremely slow.  You could easily bump that to 256000 if you don't have others on the system.

There are two options for determining when to split the file.  KEYONLY uses just the size of the record keys, while KEYDATA uses the size of both the keys and data.  Given that you are using ORDER.HISTORY.LINE, I recommend KEYDATA.

Hope this helps.
9
Prelude Support / Please explain Error Message
« Last post by DonQuixote on June 18, 2018, 03:58:21 pm »
I created a work file.   WRK.port
I read the ORDER.HISTORY.LINE file and add "H*" before the ID and write to this work file.
Many records write to the work file and then it aborts with the following errors.

'new block's offset is over the limit
error in write_record for file 'WRK.227C'
over the limit error in U_add_record for file 'WRK.227'
insertion failed error in add_to_group for file 'WRK.227C',
key 'H*001007G2464!5', number = 790
insertion failed error in U_apprend_strtuple for file 'WRK.227C'
key 'H*001007G2464!5', number = 790
Fatal error: WRITE error

What does it mean and how can I correct it.
I thought it was the size as these work files are created using modulo  101,1
So I forced to to create using modulo 3701,8
No change... same errors.
10
Prelude Support / Join us for Prelude 2018!
« Last post by precisonline on June 06, 2018, 02:30:22 pm »
October 8-10 2018 , Prelude users will be gathering at the Oak Ridge Hotel & Conference Center in Chaska, MN!
   Three full days of user and expert-led Conference Sessions
   Balanced agenda with sessions for technical and business application users
   Users, vendors and developers providing interaction, collaboration and support
   A great value for an exceptional learning, sharing and networking experience!
   Hotel and meals included in the conference fee!

Rates for Conference Sessions
Day Package:  $845     Early Bird rate: $745 (expires July 1, 2018)
3 days of conference sessions, including registration, conference fees, breakfast buffet, lunch and snacks & beverages throughout the day.

Overnight Package: $1395  Early Bird rate: $1295 (expires July 1, 2018)
3 days of sessions, plus overnight accommodations. This includes registration, conference fees, a standard hotel guest room for 3 nights, breakfast, lunch, dinner and snacks & beverages throughout the day.

You can register for the event here: http://www.novoroisystems.com/nugm-2018
Pages: [1] 2 3 ... 10