go to post Stephen Wilson · Aug 18, 2017 Could you share your straightforward code? For searching all routines in a namespace in Cache ObjectScript, I have used Find in Files within Cache Studio (class is %SYS.%Studio.Project) but it looks like you are looking to programmatically replace what is returned as a result. The basic 'Find and Replace' only seems to only apply to the currently active window. I do not know if Atelier has more advanced Find in Files and & Replace feature to search the entire namespace but from the documentation I've read, I suspect not.Other search facilities I have used include %GCHANGE routine and %RFIND. %GCHANGE has an option for changing the contents of a global - useful if you have XECUTE and indirection (@) statements that call executable code from a global reference. This practice was more common when the size of routines had to be very small and executing statements from within a global reference was one way getting round this limitation. If you have no executable code in globals then %GCHANGE probably doesn't apply.Check out the ObjectScript function $TEXT to return source code from a routine. You could use ZINSERT and ZREMOVE commands to programmatically alter the contents of source code. UPDATE: If I was trying to solve this problem. I would do a find in files to get the routine references. Verify the output and copy the contents to a plain text file. Clean up the file if necessary removing data that is not required. Read the contents of the file to obtain the routine references. Use ZINSERT and ZREMOVE to replace the source code contents. You will probably need to re-compile for the changes to take effect.
go to post Stephen Wilson · Aug 18, 2017 I find RSS feeds for subject groups are useful way to identify new posts. There are sort and filter options for:my feedmost votesmost activeno answerunanswerednewallI think all online forums suffer from 'unhelpful' and 'badly described' posts. Maybe sorting by 'most votes' or 'most active' would help?The behavioural issues you describe come from people and it is hard to design a technical solution to "fix" people. Most forums I have used give kudos to users who provide a lot of technical detail and frown upon users who ask one line questions showing no evidence of having tried to find a solution themselves. On balance, all forums need to treat beginners and inexperienced users with respect. We are all ignorant of something and we all have to start with nothing (no knowledge) Don't be afraid of up-voting or down-voting posts. Sometimes it's useful to link to an older post that dealt with the problem rather than duplicating questions/answers.
go to post Stephen Wilson · Aug 16, 2017 What about using more complex subcommand prefixes such as ZZMYCOMMAND /MYSWITCH:OPT1:"some_param" Could you code that using %ZLANG ?
go to post Stephen Wilson · Aug 16, 2017 Note the variable 'waittoend' and the zenPage.GetAuditLogs(RowId) method. This process builds the global that the secondary tablePane is built from. Without the return value, it is possible for the table to refresh before the global is built for the newly selected row.There is additional documentation here .
go to post Stephen Wilson · Aug 3, 2017 The I+3 is a hard-coded expression. At first it appears arbitrary or random. I have just taken +3 as an example. We have real-world examples of expressions like When some condition is met S LINE(I-8)="some value"When another condition is metS LINE(I-17)="some value"The hard-coded offset does not come from a variable. A lack of comments in the code makes it very difficult to understand and debug.
go to post Stephen Wilson · Aug 3, 2017 One possible answer is the following:ZBREAK *LINE:"T"::"ZWRITE LINE(I)"This will write the value to the TRACE device, which is a log file in my case. Not sure how to handle arbitrary subscript calculations like ZWRITE LINE(I+3) but this is close to what I'm looking for. Any other suggestions/comments are welcome.
go to post Stephen Wilson · Jun 26, 2017 Thanks Nikita Savchenko for the mention. Excellent detail in the article, I really appreciate putting this article out to the community for comments. Interesting note about libssh2.dll/.so. I would love to see an early proof-of-concept of libssh2 working with WebTerminal. I would also like the option to use Telnet or SSH rather than being forced into using one or the other.
go to post Stephen Wilson · May 26, 2017 Same problem occurred in Cache 2017.1.What if you simply changed your dataGrid page size to 12?If you do that then the scroll bars do not really come into play.
go to post Stephen Wilson · May 26, 2017 Philip sent me his sample files. Here they are datagridproblerm2013.zip
go to post Stephen Wilson · May 24, 2017 The link in MappingExample4.zip appears to be missing.I have attached my own version mappingexample4_community_v1.zip including the full ^ParentChild global. This version does not contain example usage of 'Next Code' and 'Invalid Conditions' as referenced in the article. As a example of using invalid conditions, if you want to skip all the 3rd subscripts in that have "DEL" as the subscript value use {L3}="DEL" as your invalid condition.
go to post Stephen Wilson · May 24, 2017 The MappingExample3.zip archive did not contain any Globals.Use mappingexample3_withglobals_1.zip if you want to import the global ^ParentChild used in the illustration.
go to post Stephen Wilson · May 23, 2017 Fixed XML parsing error in mapping_sample2.zip Try this insteadmapping.example2_fixedxmlparsererror.zip
go to post Stephen Wilson · Apr 6, 2017 Thanks Tom, we have implemented something very similar using the $System.License object.
go to post Stephen Wilson · Mar 29, 2017 Sadly, the %CSP.REST class does not exist in Caché 2013.1.6 and the Class Explorer UML tool only works in Caché 2014.1 or later. We really struggle to keep pace with upgrades to Caché as there is always a fear that something will break after an upgrade is applied. Testing to confirm everything is working as expected is a huge undertaking and requires a lot of organisation. The next opportunity to upgrade Caché will probably be around Sept-Oct 2017.
go to post Stephen Wilson · Mar 29, 2017 Personally, I would use the Visual Basic language styling on a white background. The linked COS UDL styling pack leaves much to be desired. The lime green for strings in the COS UDL won't show up very well on a white background so you can change the background via the Settings > Style Configurator. Post-conditional expressions and Method parameters are not recognised :(
go to post Stephen Wilson · Mar 24, 2017 1. Good question but I'm not fully sure I understand the design-time and runtime concepts so I'll try to explain it in different terms. If you open two Caché objects in memory using something like ##class(MyProjectName.MyClass1).%OpenId(id1) and ##class(MyProjectName.MyClass2).%OpenId(id2) can you create an arbitrary parent-child relationship object that links the two open objects within the executing ClassMethod? The implication is that if you were then to delete the parent object, you would also delete it's children.2. Exporting individual classes from one server to another and getting compile errors due to missing dependencies and child dependencies. The classes have been provided by another programmer but the relationships are not necessary for what I am doing. I would question why so many relationships were created but I suspect the programmer was trying to ensure that all the data and all the levels of a single global were mapped to a class property.3. I'll initially try to keep this high-level and theoretical rather than immediately delve into working code examples. I can tell you that the classes have been created from a Global using a CacheSQLStorage strategy.
go to post Stephen Wilson · Mar 16, 2017 We don't have any plans to introduce new namespaces but I can see how this would be a useful feature for some people. We have 'training' and 'live' namespaces that have a one-to-one mapping with a database. It allows you to test software in a "logically partitioned" area of the production server. This setup has its quirks. When you copy a live routine into a training database you have to run a routine that essentially converts references to live namespaces and replaces them with training namespaces. Training namespaces always end in 'T'. If you forget to run this routine, you could accidentally modify the live data...
go to post Stephen Wilson · Mar 16, 2017 You can also get this kind of information from the cache.cpf and CSP/bin/CSP.ini files. The Write $ZV function will get your version information. You may also view the system start-up time from the cconsole.log
go to post Stephen Wilson · Mar 16, 2017 Maybe is obvious to people but the downside to encryption is that if you lose your encryption keys, you lose all of your encrypted data. That would be ironic if the reason you encrypted your data was to prevent data loss and theft. This fear of data loss has been the key driver for not using key-based encryption within our applications - even though there are good business reasons for doing so.