|
DonQuixote
|
 |
« on: September 15, 2010, 10:28:47 AM » |
|
In a /QRD using file WAREHOUSE if I wanted to select the primary bin location Not Equal to "***" my command would be PRIM.BIN.NUM # "***" and this works fine. but if I wanted to only select the primary bin location Equal to "***" PRIM.BIN.NUM = "***" does not work and I seem to get everything. My guess is the asterisks are wild cards in this case. How can I get the bin location "***"?
|
|
|
|
|
Logged
|
|
|
|
precisonline
President/Chief Technologist
Administrator
Rock Star
    
Posts: 1532
|
 |
« Reply #1 on: September 15, 2010, 10:53:30 AM » |
|
That's an interesting question. The only way I would know to do it would be to create a derived value field that converts the field to hexadecimal (MX0C conversion) and then select with that derived field = "2A2A2A". I am not aware of any "escaping" characters that change the characteristic of a wildcard.
|
|
|
|
|
Logged
|
-Kevin Accidents "happen"; success, however, is planned and executed.
|
|
|
|
Tom Pellitieri
|
 |
« Reply #2 on: September 16, 2010, 06:03:43 AM » |
|
I just ran a test with the following:
Report Name CEI.BIN.TEST Report Description TEST BIN SELECT Dict File Name WAREHOUSE Data File (If diff) Sort Fields PROD.NUM Fields To Print ( 51 Chars) PROD.NUM WHSE.NUM PRIM.BIN.NUM Selection Criteria PRIM.BIN.NUM = "***" Output Destination A File Totals Only (Y/N) N Item Double Spacing (Y/N) N Select List Name TRP.Z Label Parameters Preferred Heading TEST Footing
My list has 1000 items, 188 with "***", 101 "legit", and 711 null. This worked fine for me. Perhaps your ECLTYPE is not set to "P"?? From TCL, if you type
ECLTYPE
you should see
2 U_PSTYLEECL ON
--Tom
|
|
|
|
|
Logged
|
|
|
|
|
DonQuixote
|
 |
« Reply #3 on: September 16, 2010, 10:31:27 AM » |
|
My ECLTYPE is set to ON. and I still get everything. Try putting other data besides "***" and null in the bin and see what happens. My selection criteria includes other things; maybe that makes a difference. Selection Criteria WHSE.NUM = "?" AND PRIM.BIN.NUM = "***"
my work around which solves my immediate problem is the following WHSE.NUM = "?" AND PRIM.BIN.NUM = "*]"
This will be fine until someone gets the bright idea of starting warehouse numbers with asterisks.
|
|
|
|
|
Logged
|
|
|
|
precisonline
President/Chief Technologist
Administrator
Rock Star
    
Posts: 1532
|
 |
« Reply #4 on: September 16, 2010, 10:37:42 AM » |
|
Everything eventually resolves to TCL commands. Have you tried this?
LIST WAREHOUSE WITH WHSE.NUM = "001" AND PRIM.BIN.NUM = "***" WHSE.NUM PRIM.BIN.NUM
..and does it work at all?
(Of course, replace the 001 warehouse number with whatever makes the most sense.)
|
|
|
|
|
Logged
|
-Kevin Accidents "happen"; success, however, is planned and executed.
|
|
|
|
Tom Pellitieri
|
 |
« Reply #5 on: September 16, 2010, 11:39:56 AM » |
|
Interesting... my original test translated to:
SORT WAREHOUSE BY PROD.NUM WITH PRIM.BIN.NUM = "***" ...
But when I added the WHSE = "?" clause, and provided Warehouse 100, it did:
SORT WAREHOUSE BY PROD.NUM WITH PRIM.BIN.NUM >= "**" AND WITH WHSE.NUM = "100" ...
I don't know why SB+ would change the selection this way. Any ideas, Kevin??
--Tom
|
|
|
|
|
Logged
|
|
|
|
precisonline
President/Chief Technologist
Administrator
Rock Star
    
Posts: 1532
|
 |
« Reply #6 on: September 16, 2010, 11:48:50 AM » |
|
Sounds pretty broken to me. I know there's some goofy stuff that happens if one of the fields in a selection criteria is defined as mv'd, but none of these fields are mv'd are they? Does the order of the clauses make any diff?
|
|
|
|
|
Logged
|
-Kevin Accidents "happen"; success, however, is planned and executed.
|
|
|
|
Tom Pellitieri
|
 |
« Reply #7 on: September 16, 2010, 01:32:15 PM » |
|
WHSE.NUM is derived from attribute 0 using "G2!1", and PRIM.BIN.NUM is value 1 of attribute 1 (1.1 in /FD)
If I hard-code the selection (e.g, PRIM.BIN.NUM = "***" AND WHSE.NUM = "100"), it works, but as soon as I change it to WHSE.NUM = "?", the TCL command changes to PRIM.BIN.NUM > "**". It does not matter which order I specify the two fields.
EDIT:
I set up a new derived field, CEI.DEF.BIN1, with a derived value of (PRIM.BIN.NUM = "***"). I then changed my selection to
CEI.DEF.BIN1 = "1" AND WHSE.NUM = "?"
This worked properly.
I suspect the change from = "***" to > "**" should be reported as a bug to IBM Rocket...
|
|
|
|
« Last Edit: September 16, 2010, 01:38:00 PM by Tom Pellitieri »
|
Logged
|
|
|
|
precisonline
President/Chief Technologist
Administrator
Rock Star
    
Posts: 1532
|
 |
« Reply #8 on: September 16, 2010, 01:41:21 PM » |
|
I wonder if they have some code that "sees" the * as a wildcard and therefore they change the = to >= ? And I wonder if the hex idea I had earlier would work?
|
|
|
|
|
Logged
|
-Kevin Accidents "happen"; success, however, is planned and executed.
|
|
|
|
Tom Pellitieri
|
 |
« Reply #9 on: September 17, 2010, 05:37:49 AM » |
|
Well, testing for OCONV(PRIM.BIN.NUM,"MX0C") = "2A2A2A" is really no different than what I did, although not having to call OCONV for each warehouse entry would save overhead.
Of course, if ECLTYPE = "U", "2A2A2A" would match any 6 letter item...
|
|
|
|
|
Logged
|
|
|
|
precisonline
President/Chief Technologist
Administrator
Rock Star
    
Posts: 1532
|
 |
« Reply #10 on: September 17, 2010, 07:02:52 AM » |
|
Actually, the "2A2A2A" won't do the pattern match unless the LIKE connector is used, right?
|
|
|
|
|
Logged
|
-Kevin Accidents "happen"; success, however, is planned and executed.
|
|
|
|