Well noted. Lesson learned. ~Claudine From: rbase-l@googlegroups.com [mailto:rbase-l@googlegroups.com] On Behalf Of Bruce Chitiea Sent: Tuesday, August 08, 2017 11:19 AM To: rbase-l@googlegroups.com Subject: Re[2]: [RBASE-L] - Version 10 - dotted vs. ampersand variables
FWIW: As an APL programmer back in the day, I learned that short and symbolic came at a steep price in clarity. So I strive to take full advantage of R:BASE's practically-unlimited object naming ability to make just about everything I can "self-documenting". Yes, that makes for more typing up front; but coming back to troubleshoot code is no longer the terror it used to be. Bruce Chitiea SafeSectors, Inc. 909.238.9012 Mobile ------ Original Message ------ Sent: 8/7/2017 8:25:35 PM Subject: RE: [RBASE-L] - Version 10 - dotted vs. ampersand variables From: "Claudine Robbins" <crobb...@iexgroup.com<mailto:crobb...@iexgroup.com>> To: "rbase-l@googlegroups.com<mailto:rbase-l@googlegroups.com>" <rbase-l@googlegroups.com<mailto:rbase-l@googlegroups.com>> Cc: Buddy, Truth be told I messed up big time. I’m going blind looking at these variables… I used vlading where the variable name is vlad… My apologies for leading you astray. Now, everything is working fine. Thank you very much, Claudine From: rbase-l@googlegroups.com<mailto:rbase-l@googlegroups.com> [mailto:rbase-l@googlegroups.com<mailto:rbase-l@googlegroups.com>] On Behalf Of Buddy Walker Sent: Monday, August 07, 2017 7:35 PM To: rbase-l@googlegroups.com<mailto:rbase-l@googlegroups.com> Subject: RE: [RBASE-L] - Version 10 - dotted vs. ampersand variables Claudine I would add ‘INT’ before the (vlading) when building your variable SET VAR vValue = (.vValue + ', INT(' + ('.Vlading' +(CTXT(.VCOUNT)))+’)’ ) I think I have the it added in (RED) the right spot Buddy From: rbase-l@googlegroups.com<mailto:rbase-l@googlegroups.com> [mailto:rbase-l@googlegroups.com] On Behalf Of Claudine Robbins Sent: Monday, August 7, 2017 8:03 PM To: rbase-l@googlegroups.com<mailto:rbase-l@googlegroups.com> Subject: RE: [RBASE-L] - Version 10 - dotted vs. ampersand variables Trying to figure this out on my own. I tried one field at a time and all load fine until I reach vlading. All text fields total 667 characters. Am I running up against a size limit of some kind? From: rbase-l@googlegroups.com<mailto:rbase-l@googlegroups.com> [mailto:rbase-l@googlegroups.com] On Behalf Of Claudine Robbins Sent: Monday, August 07, 2017 6:17 PM To: rbase-l@googlegroups.com<mailto:rbase-l@googlegroups.com> Subject: RE: [RBASE-L] - Version 10 - dotted vs. ampersand variables Oh, it helps a lot. And what a beautiful thing it is when code works as expected! One problem remains however, on the last field loaded I get an error 122 that LOADLADING needs to be TEXT. Except for vamt which is currency, the variables and the temp table column are text so I’m stumped. This is my code: SET VAR vValue TEXT SET VAR vValue = ('.VDTG'+(CTXT(.VCOUNT))) SET VAR vValue = (.vValue + ',' + ('.Vcar'+(CTXT(.VCOUNT))) ) SET VAR vValue = (.vValue + ',' + ('.Vwb'+(CTXT(.VCOUNT))) ) SET VAR vValue = (.vValue + ',' + ('.Vamt'+(CTXT(.VCOUNT))) ) SET VAR vValue = (.vValue + ',' + ('.Vorigin'+(CTXT(.VCOUNT))) ) SET VAR vValue = (.vValue + ',' + ('.Vdestin'+(CTXT(.VCOUNT))) ) SET VAR vValue = (.vValue + ',' + ('.Vlading' +(CTXT(.VCOUNT))) ) INSERT INTO comparecontrast (LOADDTGSPLIT,LOADCARNAME,LOADWB,CARAMT,LOADORIGIN,LOADDESTIN,LOADLADING) VALUES &vValue vValue = .VDTG1,.Vcar1,.Vwb1,.Vamt1,.Vo TEXT rigin1,.Vdestin1,.Vlading1 Vlad1 = LOAD FROM SEABOARD-CORPUS: TEXT [1] 5-1/8" X 15 MANUAL VALVE, BOLTS, RING GASKETS *** -----Original Message----- From: rbase-l@googlegroups.com<mailto:rbase-l@googlegroups.com> [mailto:rbase-l@googlegroups.com] On Behalf Of Claudine Robbins Sent: Sunday, August 06, 2017 10:39 PM To: rbase-l@googlegroups.com<mailto:rbase-l@googlegroups.com> Subject: Re: [RBASE-L] - Version 10 - dotted vs. ampersand variables Razzak, Well I can't wait to try it tomorrow! I actually also have several values to load into my temp table... Thank you very much. Claudine Sent from my iPhone On Aug 6, 2017, at 8:23 PM, A. Razzak Memon <raz...@rbase.com<mailto:raz...@rbase.com>> wrote: Claudine, The timing of your post couldn't have been better. Yes, you can! In your specific case ... You will have to create an additional variable to build the string which is the "values" part of the insert. When you finally go to use that variable, use the "&" prefix instead of the "." prefix. Here is the key part of an example from one of my application ... -- Predefined variables and logic is defined here ... SET VAR vValue TEXT WHILE vWorkingOn <> vLFNFileCount THEN SET VAR vWorkingOn = (.vWorkingOn + 1) SELECT (MAX(External_File_ID)+1) INTO vExternal_File_ID INDIC iv1 FROM External_Files -- Build the string with needed file names set var vValue = ('(' + '.vExternal_File_ID') set var vValue = (.vValue + ',' + '.vLFNFileNameS' + CTXT(.vWorkingOn)) set var vValue = (.vValue + ',' + '.vLFNFileExt'+(CTXT(.vWorkingOn))) set var vValue = (.vValue + ',' + '.vLFNFileDateTime'+(CTXT(.vWorkingOn))) set var vValue = (.vValue + ',' + '.vLFNFileSize'+(CTXT(.vWorkingOn))) set var vValue = (.vValue + ',' + '.vLFNFilePath'+(CTXT(.vWorkingOn)) + ')') -- Now use this string for the value part of the insert INSERT INTO External_Files + (External_File_ID, + External_File_Name, + External_File_Extension, + External_File_DateTime, + External_File_Size, + External_File_Original_Path) + VALUES + &vValue ENDWHILE RETURN Hope that helps! Very Best R:egards, Razzak At 09:05 PM 8/6/2017, Claudine Robbins wrote: > SET VAR VCOUNT = 1 > SET VAR yylading TEXT = ('Vlad'+(CTXT(.VCOUNT)))----vlad1 SET VAR > &yylading TEXT = NULL-----same as vlad1 = NULL SELECT LADING INTO > &yylading INDICATOR ivlad FROM orders WHERE (dtg+split) = .ventry > R>sho v vlad1 > LOAD FROM SEABOARD-CORPUS: > [1] 5-1/8" X 15 MANUAL VALVE, > BOLTS, RING GASKETS *** > LOAD FROM BASIC > ENERGY-CORPUS: [1] 5-1/8" X > 15 MANUAL VALVE, BOLTS, RING > GASKETS > > I’m trying to do something which is NOT in the whitepaper dotted vs. > ampersand variables. > > I’m in a 4 count while loop, so as vcount is incremented field vlad becomes > vlad1, vlad2, vlad3, and vlad4. > > My select correctly acquires the lading value. Before I increment vcount = > (.vcount +1), I want to load vlad1 in a temporary table. > > INSERT INTO tempTBL VALUES (????). I’ve tried (&yylading), &yylading > (error), '&yylading',and '.yylading' . All I manage to get is &yylading, > .yylading or vlad1 but not the actual value contained in vlad1. > > I don’t have any great hopes that this can be done but what the heck, > I thought I’d ask anyway… -- You received this message because you are subscribed to the Google Groups "RBASE-L" group. To unsubscribe from this group and stop receiving emails from it, send an email to rbase-l+unsubscr...@googlegroups.com<mailto:rbase-l+unsubscr...@googlegroups.com>. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "RBASE-L" group. To unsubscribe from this group and stop receiving emails from it, send an email to rbase-l+unsubscr...@googlegroups.com<mailto:rbase-l+unsubscr...@googlegroups.com>. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "RBASE-L" group. To unsubscribe from this group and stop receiving emails from it, send an email to rbase-l+unsubscr...@googlegroups.com<mailto:rbase-l+unsubscr...@googlegroups.com>. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "RBASE-L" group. To unsubscribe from this group and stop receiving emails from it, send an email to rbase-l+unsubscr...@googlegroups.com<mailto:rbase-l+unsubscr...@googlegroups.com>. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "RBASE-L" group. To unsubscribe from this group and stop receiving emails from it, send an email to rbase-l+unsubscr...@googlegroups.com<mailto:rbase-l+unsubscr...@googlegroups.com>. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "RBASE-L" group. To unsubscribe from this group and stop receiving emails from it, send an email to rbase-l+unsubscr...@googlegroups.com<mailto:rbase-l+unsubscr...@googlegroups.com>. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "RBASE-L" group. To unsubscribe from this group and stop receiving emails from it, send an email to rbase-l+unsubscr...@googlegroups.com<mailto:rbase-l+unsubscr...@googlegroups.com>. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "RBASE-L" group. To unsubscribe from this group and stop receiving emails from it, send an email to rbase-l+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.