{{tag>category:"AREV Specific"}} [[https://www.revelation.com/|Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community]] ==== Is there a character size limit on Perform Selects? (AREV Specific) ==== === At 23 FEB 2000 01:59:24PM Michael Slack wrote: === Is there some sort of character size limit on a PERFORM SELECT statement out of a program in Arev 3.12? If so what is it? We have a table that holds deleted rows from other tables. This is done by way of an MFS. When the rows are put into our holding table, the key to the row has the table name it came from appended to the front of it and made into a multi-part key. I'm now trying to write a program to go in and clean out SOME of those rows from the holding table by using SOME of the table names in the key. There are some of these rows from certain tables that we never want to clean-out by a blanket menthod. The problem I seem to have run into a couple of times so far during testing is that the Select statement that is built within the program gets to big for the system to process. One time it seemed to indicate that it had a problem with the text somewhere after the 512th character. Another time it broke to the debugger and my playing with it seemed to indicate that somewhere after the 1024th character it had a problem. The manuals I have don't seem to mention any limitation. I'm building the Select statement within the program piece by piece so that I'm not running into the 256 character limit for a line of code within the program. I don't see how I could be getting anywhere near the 64K limitation. Can anyone tell me where to look for the information I need? Thank you for your time. Michael Slack ---- === At 23 FEB 2000 02:06PM Steve Smith wrote: === Check the WHO window to check that the 3.1 to 3.12 upgrade has been properly applied. There were severe constraints in 3.1 in terms of TCL syntax length - lifted by 3.12. If in doubt, reapply the upgrade. Sometimes you had to restart the 3.12 patch (available from thism site) You could also try running to a temporary file and then sorting on that. Steve ---- === At 23 FEB 2000 02:35PM Warren wrote: === There is a restriction on the length of TCL commands. I don't remember what it is. The 3.12 increases this, (but still doesn't say what it is). Pick and or Prime Information had an interactive TCL continuation command character, I think it used to be either a ]]" or an "_". The PERFORM/EXECUTE buffer had a different limitation and work around. I seem to recall it was putting an @FM at strategic points in the statement. Another one of my enhancement requests. ---- === At 24 FEB 2000 02:44PM Eric Emu wrote: === Instead of a select statement like SELECT MINORITIES BY AGE BY SHOESIZE BY HAIRCOLOR WITH AND WITH SEX=INDETERMINATE" AND WITH GAZOONGAS=BLUE" create a symbolic MYSORT with a formula RETURN FMT(AGE,'R(0)#3'):FMT(SHOESIZE,'R(0)#3'):FMT(HAIRCOLOR,'L#10') create another symbolic MYCRITERIA ANS=' CLASS=@RECORD ;*or whatever SEX=@RECORD ;*or whatever GAZOONGAS=@RECORD ;*or whatever IF AND SEX=INDETERMINATE" THEN IF GAZOONGAS=BLUE" THEN ANS=1 END RETURN ANS Then you can condense your TCL statement to SELECT MINORITIES BY MYSORT WITH MYCRITERIA=1 Eric ---- === At 24 FEB 2000 03:55PM Victor Engel wrote: === Very nice PC post. However, I have one question. What is a gazoonga? ---- === At 25 FEB 2000 01:39AM Eric Emu wrote: === http://www.(insert unknown noun here).com Eric ---- === At 25 FEB 2000 09:31AM Michael Slack wrote: === Thanks for the tip. I obviously hadn't thought in that direction for this particular problem. I'm going to see if I can't easily incorporate your suggestion into my code. The question remains, is there a character limit to a "PERFORM 'SELECT ..." statement in Arev 3.12 from a program? Thanks, Michael Slack ---- === At 25 FEB 2000 09:36AM Michael Slack wrote: === Thanks for the help. The continuation command character sounds like what I'm looking for. I'm hoping that once I find it that it will let me build "PERFORM 'SELECT ..." statements longer than what ever the limitations are. Thanks, Michael Slack ---- === At 25 FEB 2000 09:39AM [url=http://www.sprezzatura.com" onMouseOver=window.status=Click here to visit our web site?';return(true)]The Sprezzatura Group[/url] wrote: === There is a limit. 3.12 increased it but it is still round about 1000+ characters. [url=http://www.sprezzatura.com" ]The Sprezzatura Group[/url] [i]World Leaders in all things RevSoft[/i] [img]http://www.sprezzatura.com/zz.gif[/img] ---- === At 25 FEB 2000 09:55AM Michael Slack wrote: === I've checked the WHO for our system and everything looks good. Plus we've been running under Arev 3.12 since sometime in 1995. I can't use your suggestion on sending the output to another file for sorting because the process I'm trying to build doesn't do any sorting. My problem is that I have a lot of things to check for in the ID to determine if the row is one that is to be deleted or not. The ID is multi-part and the first part is the table name that the row originally came from. We have quite a few tables that have thier deleted rows saved to the table that I'm now trying to clean-up. I'm currently experimenting with not selecting the much smaller list of table names that are part of the key that are not to be touched by this process. Plus I'm trying to shorten the "PERFORM 'SELECT ..." statement by using the short-hand approach. Such as "WITH @ID #] tablename1 AND #] tablename2 AND #] tablename3 ...". For the present, that is allowing me to get past that particular blockage and develop other parts of the program. Part of the problem is that I would like to later add some fuctionallity to the program that may require very long "PERFORM 'SELECT ..." statements. If you have any thoughts on the matter please let me know. Thanks, Michael Slack ---- === At 25 FEB 2000 10:04AM Michael Slack wrote: === Thank you for the information. If I can figure out some way to keep the "PERFORM 'SELECT ..." statements to 1000 characters or less then I chould be in good shape. I think I have a germ of an idea on how to do that all ready. Thanks, Michael Slack ---- === At 28 FEB 2000 09:52AM Warren wrote: === There is none in ARev, at least none that I can discover or anybody at RTI has told me of. I requested this enhancement late 80's-early 90's but AFAIK it was never acted on. Most of TCL I believe is using the meta language stuff and is difficult to modify. Revelation and Advanced Revelation are some of the best Pick based development systems for PCs. With a few enhancements such as above they could have been *the* best. ---- === At 28 FEB 2000 10:04AM Warren wrote: === I had to do a fix for a client using an HR-1 system based on ARev 2.03/2.1x (HR-1 systems used a highly modified ARev kernel, for instance WHO would say the ARev version was 2.03 yet it used the same indexing system as 2.1x (no !INDEXING file)). Basically you have to break the TCL command up into several statements which logically have an ever tighter selection criteria. Each chunk must also be a syntactically valid TCL command. It would be nearly impossible or at least very difficult to write a TCL shell processor that could do this. Since the HR department of my client had several people who were proficient in TCL it was just a simple matter of training them to recognize the symptoms and how to split the commands up properly. ---- === At 28 FEB 2000 10:09AM Warren wrote: === Condense it down further with a G (group item): MYGROUP Field 3 (Group info): BY MYSORT WITH MYCRITERIA=1 TCL command: SELECT myfile MYGROUP ---- === At 28 FEB 2000 06:54PM Richard Hunt wrote: === If I had that problem, i would basic program the whole routine. 1) Select all records in the file. Use the PERFORM command like this... PERFORM "SELECT BILLS". the reason to use this select is because you will be deleting records (rows). 2) Using a LOOP REPEAT, you can READNEXT each record (row) id. 3) Using BEGIN CASE, CASE, and END CASE statements; you can "weed out" the record (row) ids not to delete. 4) Then delete the records (rows). somewhat like this. OPEN 'BILLS' TO BILLS_DATA ELSE MESSAGE=Unable to open the "BILLS" file.' CALL MSG(MESSAGE) STOP END SENTENCE=SELECT BILLS' PERFROM SENTENCE DONE=0 LOOP READNEXT BILLS_ID ELSE DONE=1 END UNTIL DONE DO BEGIN CASE CASE FIELD(BILLS_ID,'*',1) EQ 'AAA' CASE FIELD(BILLS_ID,'*',1) EQ 'BBB' CASE FIELD(BILLS_ID,'*',1) EQ 'CCC' CASE 1 EQ 1 DELETE BILLS_DATA, BILLS_ID END CASE REPEAT STOP END A very very simple version. Ya gotta to remember to "LOCK" and "UNLOCK" the records (rows). and well see all the "CASE" statements try to eliminate the record (row) from being deleted. The final "CASE" statement "CASE 1 EQ 1" says... ok I dont meet any of the above criteria so... DELETE! I would definately go this way rather than the "SELECT BILLS WITH ... AND WITH ... AND WITH ...". ---- === At 29 FEB 2000 09:50AM Michael Slack wrote: === Thanks for the tip. I hadn't thought of it from that point of view but that approach is worth considering. I'll see if I can incorporate that type of approach into my code. Thanks, Michael Slack [[https://www.revelation.com/revweb/oecgi4p.php/O4W_HANDOFF?DESTN=O4W_RUN_FORM&INQID=NONWORKS_READ&SUMMARY=1&KEY=41CB053B4C54CFEE8525688E006850C7|View this thread on the forum...]]