Have you looked at SORT.TYPE? Rich ----- Original Message ----- From: "Al DeWitt" <adew...@stylmark.com> To: u2-users@listserver.u2ug.org Sent: Thursday, November 10, 2011 3:52:12 PM Subject: [U2] Unidata 7.1.20 Pick Flavor & Selecting Multi-Values
I'm am trying to help out my users by helping them make sense of what they have done to themselves. The field in question, Bin Number, is alphanumeric. About three quarters of the entries are all numeric and one quarter are alphanumeric. Below is a perfect example of my issue. LIST INVWHS "27814*001" F1 F2 F3 12:43:18 NOV 10 2011 1 CPN*WH Qty On Hand Shipping Qty Bin Number 27814*001 158 0 70300 SO76127 My users want all the numeric sorted from lowest value to highest value as if the field was actually numeric. My thought was to add to V-desc fields. One that determines if the value is numeric or not (ALD.NUM.BIN) and the other is the length of the field(ALD.BIN.LN). This would sort based on the length of the value. The greater the length the greater the value. So the 10001 should print after 9999 and not in the vicinity of 1000 as it's doing now. My first question is: How do I make ALD.NUM.BIN report the condition of both values. As you can see below it only shows the first value. I'm thinking I need a -SUBR statement but can't find a list of them in the Unidata manuals. LIST INVWHS "27814*001" F3 ALD.NUM.BIN ALD.BIN.LN 12:45:51 NOV 10 2011 1 CPN*WH Bin Number Num Bin Bin Ln 27814*001 70300 1 5 SO76127 7 Here is the dictionary item (it was built using System Builder): Top of "ALD.NUM.BIN" in "DICT INVWHS", 9 lines, 215 characters. 001: I 002: SUBR("SB.SMART.QUERY",'MK':@FM:'E;@1;C3;@6;X;Z#;I2;C1;J1;C0',@ID,@RECORD,@F ILE.NAME,@NV) 003: 004: Num Bin 005: 1R 006: MV 007: Assuming everything works correctly I need to modify my select statement: Before I change: SELECT INVWHS WITH WHS = "001" BY.EXP BIN Followed up with READNEXT CPN.WHS,BIN.LOCATION After I change my select to: SELECT INVWHS WITH WHS = "001" BY.EXP ALD.NUM.BIN BY.EXP ALD.BIN.LN BY.EXP BIN Which results in: Top of "ALD.TEST004" in "SAVEDLISTS", 1,657 lines, 33,139 characters. *---: L 1322: 27814*001ý1ü1ý-5ü-5 Top of "ALD.TEST005" in "SAVEDLISTS", 1,330 lines, 26,939 characters. *---: L 0447: 27814*001ý1ü2ý-5ü-5 How should I modify my READNEXT statement so that BIN.LOCATION returns the correct value for each value? Thanks. _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users