go to post Jonathan Harris · Oct 24 Now there is an issue. When a data field is 0, it does not read it as numeric. Example, I have input values of 3.5 and 0 and want to subtract them, but I don't get output Example, I have input values of 3.5 and 1 and want to subtract them, output is 2.5.
go to post Jonathan Harris · Oct 24 As Emily Latella would say, "Never mind." I tried the $NUMBER function and it worked.
go to post Jonathan Harris · Mar 26 I used the cat command with >> but that clearly isn't the way to go.
go to post Jonathan Harris · Mar 26 I am trying to avoid using tar. Let me simplify as I am trying to work with just one file now. I tried this command; gzip -9 -r -q test001.zip /path Where /path is the directory I want to zip all files in and I want to have as output test001.zip, which unix complains that test001.zip does not exist, which I don't understand as I am trying to create this. Am I misunderstanding the arguments?
go to post Jonathan Harris · Jul 18, 2022 Not sure how to accept a reply, but the $EXTRACT(input,$FIND(input,"(")-1,*) did the trick once I worked out the details of syntax. Thanks again. Now I dive in further over my head to the next "we never did this before" project.
go to post Jonathan Harris · Jul 8, 2022 I put the $ in and the code worked. I wound up using this, $EXTRACT(input,$FIND(input,"(")-1,*).
go to post Jonathan Harris · Jul 7, 2022 This version does not recognize EXTRACT or FIND. Is it possible to do a SubString from an index to the end It seems like they have no function for this. ..ReplaceStr(input,start to "(","(") where I replace everything up to the first parens with just a parens. This would be so simple, I thought.
go to post Jonathan Harris · Mar 4, 2022 I'm having trouble getting the shell script get the output, which will be multiple lines, into a file. Right now I have this NAMESPACE='XXXXX'irissession XXXXX <<EOMznspace="${NAMESPACE}"set mysqlstat="select * from file.Log where ConfigName='hhhhhhhhhhh"set sr=##class(%SQL.Statement).%ExecDirect(,mysqlstat) if sr.%SQLCODE=0 do sr.%Display()haltEOM This works great to get output to a screen. I tried the statements from your last reply but still get screen output, nothing to the file, and an occasional objection to my syntax. I have a lot of experience with the shell scripting but the SQL and objectscript are relatively new. It's getting the output into a flat file that is the missing link for me. Once there, I can parse, search, and format output all day.
go to post Jonathan Harris · Mar 4, 2022 This solved my first issue, getting the data from a script. I want to get it into a file. My last set statement outputs using variable.%Display(). I've been searching the documentation but haven't found how to write output to a text file. It seems like I can't find the command for it, which I think would look like variable.%OutputCommand(file path).
go to post Jonathan Harris · Mar 3, 2022 Let me step back and work with just the two prompts that don't seem to play well together.I run the irissession SERVER command and there I can use the set statements, one using a set and the other calling a class. This output comes to the screen. I cannot run these if I don't run the irissession command. I can't run unix commands like grep or output to a file if I do. I'd like to be able to have a script that gets access to this data and then gets out. My script can run the irissession command but after that nothing in the script gets accessed.