Re: Converting static files into Dynamic

2004-04-17 Thread Susan Lynch
From: Martin Scholl [EMAIL PROTECTED]
Subject: UD: Converting static files into Dynamic


 Is there an easy way to convert static files into dynamic files?
 I just found that one file, that I created as static tends to grow
 large.  I want to shield my customers from and DBA work and rather have
 them as dynamic.
 UD 6.0 on Windows


The memresize command works very well at this.  See the Unidata commands
manual.  I am assuming you have determined whether you want DYNAMIC KEYONLY
or DYNAMIC KEYDATA, and are aware that you will still want to resize the
file periodically, because dynamic files (at least in Unidata, don't know
about UV) tend to grow but only shrink if the file is cleared or resized.

Suggestion: don't forget the MEMORY parameter on the memresize - it really
helps speed up the process!

Susan M. Lynch
F.W. Davison  Company, Inc.



-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


Re: SB+ Information

2004-03-25 Thread Susan Lynch
- Original Message -
From: Jan Shaw and Keith Johnson Sent: Thursday, March 25, 2004 7:38 PM
Subject: RE: SB+ Information


 ...I've had a look at Malcolm Bull's site, but the on-line group
 (ISBUG.net) seems to be defunct.  Is there a user group still active
on-line
 or any other information?  I'm looking for the sort of information that
 gives pointers and background, rather than straight documentation.

 For example, how does one stick a bunch of changes together and then
migrate
 them from a test environment to a live one?  It's a small site, so they
 can't afford a full-scale package like Susan's.  I would like to set
 something up for them.


 Thanks,  Keith Johnson 'tm'ing the post name space

Try http://groups.yahoo.com/group/sbsolutions

Susan Lynch


-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


RE: Looking for associated multi-value algorithm...

2004-03-16 Thread Susan Lynch
Group:

My apologies for top-posting this - but for those who have already read 6 other 
variations on this code, it would be a pain to page down below the original request, 
and for those who have not seen the original request, it would be a pain to have to go 
find it.

There are as many good ways to code this as there are programmers - here is what I 
would do, preserving the variables as much as possible because I assume this code 
fragment fits into a larger program and you don't want to have to modify the whole 
program.

STARTPOS = 1 ; * Set the first value to be checked! 

SPECIAL.VAL =  ; * Assuming that you will want this later on eg to decrement the qty 
if ordered, reserve it, etc. 

SPECIAL.FROM.QTY.TEMP = 0 

SPECIAL.PARTS = SPECIAL.REC12 

LOOP 

  LOCATE PART.NBR IN SPECIAL.PARTS1,STARTPOS SETTING SPECIAL ELSE SPECIAL =  

UNTIL SPECIAL =  DO 

  SPECIAL.FROM.QTY = SPECIAL.REC14,SPECIAL 

  IF SPECIAL.FROM.QTY  QTY.REQUESTED THEN 

IF SPECIAL.FROM.QTY.TEMP  SPECIAL.FROM.QTY THEN 

  SPECIAL.FROM.QTY.TEMP = SPECIAL.FROM.QTY 

  SPECIAL.VAL = SPECIAL ; * the value for the part number desired with the 
greatest qty at or above desired qty

END 

  END

  STARTPOS = SPECIAL + 1 

REPEAT 

IF SPECIAL.VAL =  THEN 

  DATA.OUT = Part :PART.NBR:, Qty :QTY.REQUESTED: not found. ; * or other error 
logic... 

END ELSE 

  SPECIAL.PART.PRICE = SPECIAL.REC16,SPECIAL.VAL ; * You only need to do this once 
at the end!

  DATA.OUT = OCONV(SPECIAL.PART.PRICE,MDP)R#12 

END 

RETURN

Susan M. Lynch
F.W. Davison  Company, Inc.

Original message from [EMAIL PROTECTED]:

I'm looking for an algorithm for searching through a group of associated multi-value 
fields.  The fields are F12 (PartsList), F14 (From Qty) and F16 (Unit Price).  I can't 
depend on these being in any certain order, just that the associated fields will be in 
identical order.  What I want to return is the Unit Price (F16) given PART.NBR and 
QTY.REQUESTED.  I've got a code snippet of what I think will work, but I'd like to get 
some feedback on it...it won't work because, there's a better way of doing this, etc.  
Thanks.

SPECIAL.PARTS = SPECIAL.REC12
SPECIALCOUNT = DCOUNT(SPECIAL.PARTS,VM)
SPECIAL.FROM.QTY.TEMP = 0
FOR SPECIALPART = 1 TO SPECIALCOUNT
   LOCATE PART.NBR IN SPECIAL.PARTS1,STARTPOS SETTING SPECIAL ELSE EXIT
   SPECIAL.FROM.QTY=SPECIAL.REC14,SPECIAL
   IF SPECIAL.FROM.QTYQTY.REQUESTED AND SPECIAL.FROM.QTY=SPECIAL.FROM.QTY.TEMP THEN
  SPECIAL.FROM.QTY = SPECIAL.REC14,SPECIAL
  SPECIAL.PART.PRICE = SPECIAL.REC16,SPECIAL
  TEMP.OUT = OCONV(SPECIAL.PART.PRICE,MDP) R#12
  SPECIAL.FROM.QTY.TEMP = SPECIAL.FROM.QTY
   END
   STARTPOS = SPECIAL + 1
   FIRST = 0
NEXT SPECIALPART
DATA.OUT=TEMP.OUT
RETURN

--
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


Re: [UD] File block size with long keys

2004-02-16 Thread Susan Lynch
- Original Message -
From: Simon Lewington [EMAIL PROTECTED]

Sent: Friday, February 13, 2004 7:41 AM
Subject: [UD] File block size with long keys


 UD 6.0.7 on Windows

 Does anyone know if Unidata is doing something special writing data with
 long keys to a static file - and what that is?

 Running the following...

 KEYLENGTH=36
 DTALENGTH=0
 MODULO=1
 SEP=1
 NRECORDS=3
 EXECUTE 'CLEAR-FILE DATA SRLTEMP1'
 PCPERFORM 'memresize SRLTEMP1 ':MODULO:',':SEP:' TYPE 0 STATIC'
 OPEN SRLTEMP1 TO SRLTEMP1 ELSE STOP
 FOR N=1 TO NRECORDS
   WRITE STR('0',DTALENGTH) ON SRLTEMP1,OCONV(N,'MR%':KEYLENGTH)
 NEXT N
 PCPERFORM 'guide SRLTEMP1 -o'

 ...shows that the block is overflowed, even though it's only got 3 records
 of less that 50 bytes each.

 36 bytes looks like it's the cutoff on key length - below that the
overflow
 vanishes.  Above that and any block with more than one item overflows.
With
 a block size of 2048, 86 bytes is the cutoff.  Using a non-zero data
length
 makes no difference (ie 35 byte keys won't overflow even with 50 byte
data).

 I can't find anything in the manual saying what's going on, or
recommending
 different block sizes for files with long keys.

 Cheers
 Simon


Simon,

Well, it looks like nobody else is going to answer this one.  Just from
observation, using Unidata PE on Windows and a hex editor, it appears that
even 2 records with keys 36 bytes long in a static file with blocksize 1024
will cause the key-and-displacement table to take the entire block, with the
data being put into overflow.  On the other hand, with a blocksize 2048, I
put 10 records with 36-byte keys into a block without going into overflow.
I don't know what the algorithm is for determining when the group is forced
into overflow, but my gut feeling is, for longer keys, I would increase the
blocksize.

This was of interest to me because we have a few files, which, depending on
the size of the component data elements in the keys (codes which are defined
by our users), could easily reach your 36-byte size, so I took a quick look.
Another thing to be wary of when sizing files - sigh!

Susan M. Lynch
F.W. Davison  Company, Inc.



-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


Re: SQL Server and Crystal Reports

2004-02-11 Thread Susan Lynch
Mark,

I don't know about SQL books, but I have found the Crystal manuals to be all
that I needed to customize forms for our clients who have used Crystal
Reports.  The manuals are pretty good - they included enough examples to get
me going!

Susan M. Lynch
F.W. Davison  Company, Inc.



- Original Message -
From: Mark Johnson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, February 11, 2004 7:16 AM
Subject: SQL Server and Crystal Reports


I would like to know the best beginning books for either of these two
topics. I don't yet want a reference, rather to know if 'Dummies' Books are
appropriate or if anyone else has better beginning selections.

My UD client migrating to these wants to keep me and this is the
environment.

thanks.

--
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users




-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


Re: InValid Characters

2004-02-09 Thread Susan Lynch
Tim,

Thanks - I just looked at CTLGTB and there is an entry there for both.

EDIT-LIST looks like this:

M
0
@UDTHOME/SYS_BP EDIT-LIST
root

EDIT.LIST looks the same, but has EDIT.LIST instead of EDIT-LIST.

In UDTHOME, we have a sys directory, which contains a SYS_BP file, which
contains EDIT.LIST and EDIT_LIST, not EDIT-LIST.

Does this indicate that one of my predecessors on these systems was getting
adventuresome, or is this standard issue?

Susan M. Lynch
F.W. Davison  Company, Inc.



- Original Message -
From: Timothy Snyder [EMAIL PROTECTED]
To: U2 Users Discussion List [EMAIL PROTECTED]
Sent: Monday, February 09, 2004 11:51 AM
Subject: Re: InValid Characters







  the systems I work on don't have EDIT-LIST, and I never think
  to change the punctuation and try the revised form of the
  commands - I grew up on EDIT-LIST and SAVE-LIST, etc.

 The ECL parser should accept the dashed versions of these commands.  Any
 chance you have a VOC entry (or something in the global catalog) for
 EDIT-LIST or EDIT.LIST that's getting in the way?

 Tim Snyder
 IBM Data Management Solutions
 Consulting I/T Specialist , U2 Professional Services

 [EMAIL PROTECTED]
 --
 u2-users mailing list
 [EMAIL PROTECTED]
 http://www.oliver.com/mailman/listinfo/u2-users




-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


Re: InValid Characters

2004-02-09 Thread Susan Lynch
Tim,

UD 6.0.6 (but, if I remember correctly, this was true on the release 5 that
we came from as well, and our standard policy is to uninstall and re-install
Unidata for a new release, which should have replaced CTLGTB).  This being
my first experience with the Unidata flavor, I thought it was standard
behavior - annoying but standard.  So, rather than set up what I thought was
a non-standard synonym (and have to set  up on all the customer machines as
well, if one of my colleagues started using it), I was just avoiding editing
lists.

The synonym entry in the VOC does work as expected.

Susan M. Lynch
F.W. Davison  Company, Inc.



- Original Message -
From: Timothy Snyder [EMAIL PROTECTED]
To: U2 Users Discussion List [EMAIL PROTECTED]
Sent: Monday, February 09, 2004 1:41 PM
Subject: Re: InValid Characters






 I tried to respond a while ago, but my message came back with The
 message's content type was not explicitly allowed.  I'll try a different
 cut-and-paste approach.  Hopefully this isn't a duplicate for anybody

 snip
  Susan Lynch [EMAIL PROTECTED]
 
 Thanks - I just looked at CTLGTB and there is an entry there for both.
 
 EDIT-LIST looks like this:
 
 M
 0
 @UDTHOME/SYS_BP EDIT-LIST
 root
 
 EDIT.LIST looks the same, but has EDIT.LIST instead of EDIT-LIST.
 
 In UDTHOME, we have a sys directory, which contains a SYS_BP file, which
 contains EDIT.LIST and EDIT_LIST, not EDIT-LIST.
 snip

 Susan,

 That all looks like what I'm seeing on a system here, and both EDIT-LIST
 and EDIT.LIST work fine. What platform, UDT release, etc. are you working
 with?

 Just for giggles, it may be interesting to create a synonym VOC entry for
 EDIT-LIST that looks like this:
 1: S
 2: EDIT.LIST

 If that works, it may help track this down.

 Tim Snyder
 IBM Data Management Solutions
 Consulting I/T Specialist , U2 Professional Services

 [EMAIL PROTECTED]
 --
 u2-users mailing list
 [EMAIL PROTECTED]
 http://www.oliver.com/mailman/listinfo/u2-users




-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


Re: InValid Characters

2004-02-06 Thread Susan Lynch
Bill,

Not sure whether you are on UV or UD, so I will avoid using the EDIT-LIST
command (which UD does not have).  Given that restriction, probably the
easiest method would be to

SELECT PS = [101393 BY-DSND @ID
(assuming that @id is left-justified)

If only 1 item selected, DELETE PS

If more than 1 item selected, SELECT PS SAMPLE 1, then LIST PS to be sure
that the one selected is the one with the unusual characters in the key.

If yes, then repeat the two SELECTs and DELETE PS.  If no, then your system
is sorting unprintable characters differently than mine is, and you will
have to play with the selection process in order to get the right record
selected prior to deleting it.


Susan M. Lynch
F.W. Davison  Company, Inc.



- Original Message -
From: Brutzman, Bill [EMAIL PROTECTED]
To: 'U2 Users Discussion List' [EMAIL PROTECTED]
Sent: Friday, February 06, 2004 5:49 PM
Subject: InValid Characters



When I issue the following LIST command, there is are apparent bad
characters, ascii box drawing characters.

How can I clear them ?  The two characters show up a single box below.

Thus far, I have had no luck using EditPlus, HP-Unix vi, UniVerse Edit
Up-Arrow mode, or UV.VI.

I tried the ascii equivalents of the box characters per...

   DELETE PS ^210^201
   Record ID ^210^201 not found.
   0 records DELETEd.

   DELETE PS ^210
   Record ID ^210 not found.
   The records for @ID 103662 and 101393 appear to be clean.

   DELETE PS ^D2
   Record ID ^D2 not found.
   0 records DELETEd.

   DELETE PS ^D2^C9
   Record ID ^D2^C9 not found.
   0 records DELETEd.

Suggestions would be appreciated.

--Bill

---

LIST PS

D.PS..

103662
   101393
101312




D.PS. 103662
NEXT.COMP.PN.
PREV.COMP.PN. 103661
QTY.PER.ASSY.
TYPE.
SCRAP.FACTOR.
LEAD.TIME.OFFSET.
OPERATION
EFFECTIVE.DATE...
EFFECTIVE.CODE...
ENG.CHG.ID...
DATE.ADDED...
NWU.PN...
PWU.PN...
BALýNBR..
REFERENCEýDESIGNATORS.
NOTEýREFERENCE...
ECO DATE.

D.PS.  NEXT.COMP.PN.
PREV.COMP.PN.
QTY.PER.ASSY.
TYPE.
SCRAP.FACTOR.
LEAD.TIME.OFFSET.
OPERATION
EFFECTIVE.DATE...
EFFECTIVE.CODE...
ENG.CHG.ID...
DATE.ADDED...
NWU.PN...
PWU.PN...
BALýNBR..
REFERENCEýDESIGNATORS.
NOTEýREFERENCE...
ECO DATE.

D.PS. 101393
NEXT.COMP.PN.
PREV.COMP.PN. 103626
QTY.PER.ASSY.
TYPE.
SCRAP.FACTOR.
LEAD.TIME.OFFSET.
OPERATION
--
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users




-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


Re: [UV] VARIABLE-1 = and Basic Compile $OPTIONS EXTRA.DELIMwork consistently

2004-02-03 Thread Susan Lynch



As I recall, the INSERT function with a -1 parameter always added the 
relevant field mark until one of the Microdata releases around 1979, when some 
bright soul in their engineering department decided that the extra null value at 
the end was 'irrelevant' and should not be added. This change in behavior 
provoked a storm of protest at the next national conference, as all of us had 
incorporated code that used the -1 in sets of multi-valued attributes that 
needed to stay in sync. 

PO #
Item (mv'd)
Qty on order (mv'd)
Qty in stock (mv'd)

If there was nothing in stock for the third item on the Purchase Order, but 
there was stock for the fourth item on the Purchase Order, we all wanted the 
data to look like this

001 P001 @VM P002 @VM P003 @VM P004
00250 @VM 20 @VM 40 @VM 30
003 10 @VM 20 @VM @VM 15

But instead, suddenly we were seeing 15 units onhand for P003 and no onhand 
for P004. The 'irrelevant' data was very relevant in our applications, and 
the result of the change in behavior was significant (as in, what a nightmare, 
reprogramming every update routine that included that syntax!).

Microdata management understood ourfrustration and the subsequent 
release set the behavior back to always inserting the field mark. However, 
most of us who lived through that Microdata release have steered clear of the -1 
except for lists which are never going to have to synchronize with any other 
list. It is safer not to assume that an engineer who does not understand 
how you are using the product is not going to change the behavior out from under 
you.

Susan M. LynchF.W. Davison  Company, Inc.(781) 340-9255



  - Original Message - 
  From: 
  Marco 
  Manyevere 
  To: [EMAIL PROTECTED] 
  Sent: Tuesday, February 03, 2004 4:34 
  AM
  Subject: Re: [UV] VARIABLE-1 = "" 
  and Basic Compile "$OPTIONS EXTRA.DELIM"work "consistently"
  
  
  The same documentation goes on to say:
  
  
  In INFORMATION and IN2 flavor accounts, if _expression_ is an empty string
  and the new element is appended to the end of the dynamic array, 
  the end of
  a field, or the end of a value, a delimiter is appended to the 
  dynamic array,
  field, or value. Use the -EXTRA.DELIM option of the 
  $OPTIONS 
  statement
  to make the REPLACE function work as it does in IDEAL, PICK, 
  and
  REALITY flavor accounts.
  In my opinion this behaviour is still unexpectedand here 
  is why I say so:
  If Information behaves the same as PICK as you say, then the 
  behaviour is still contrary to documentation because in the example I gave 
  below, a @FM was still appended even if the string to be added was empty: 
  i.e.
  A = 'abc'
  A-1 = ''
  A-1 = 'def'
  will result in 3 fields. According to the REPLACEextract 
  you quoted,A-1 = '' should not add a field mark regardless of 
  whether A is empty or not for PICK flavour.
  Marco
  Marco,As 
some previous replies were saying, the behaviour you describe is 
normaland documented. The explanation for this is found in the "REPLACE" 
Basicfunction, which is the equivalent for the angle brackets notation 
at theleft of an assignment operator ("=") for dynamic arrays 
handling.For more information, please refer to the Basic documentation 
manual (File"BASIC.pdf" in the CDROM library)Here is an excerpt 
of the documentation :REPLACE functionSyntaxREPLACE 
(_expression_, field#, value#, subvalue# { , | ; } replacement)REPLACE 
(_expression_ [ ,field# [ ,value#] ] ; replacement)variable  field# [ 
,value# [ ,subvalue#] ] .../...In IDEAL, PICK, PIOPEN, and 
REALITY flavor accounts, if replacement is anempty string and an attempt 
is made to append the new element to the endof the dynamic ar ray, 
field, or value, the dynamic array, field, or valueis leftunchanged; 
additional delimiters are not appended. Use the EXTRA.DELIMoption of the 
$OPTIONS statement to make the REPLACE function appenda delimiter to the 
dynamic array, field, or value/...The fact is that 
"UniVerse" is mainly designed to reproduce the behaviourof legacy 
products in the "Pick" family. In this case, the implementationof the 
"INFORMATION" and "IDEAL" flavour followed the default behaviour 
in"Pick" native products.I hope this answered your 
question.Regards,Hervé BALESTRIERISupport Technique 
Avancé - IBM Data Management - Produits "U2"- Forwarded by Herve 
Balestrieri/France/IBM on 03/02/2004 09:35 -Marco Manyevere 
<[EMAIL PROTECTED] To: [EMAIL PROTECTED] .com cc: Sent by: 
Subject: VARIABLE-1 = '' Inconsistent behaviour 
u2-users-bounces@ oliver.com 03/02 /2004 05:55 
Please respond to U2 Users Discussion List 
Hi All,Consider the program:A = 
''A-1 = ''A-1 = ''A-1 = 3A-1 
= ''A-1 = 4PRINT A3I expect it output '3' 
but it outputs '4'. Whats the explanation? I'm on UV9.6 [NT] running 
information flavour.Regards,MarcoBT Yahoo! 
Broadband - Free modem offer,