Scott Roth · Apr 19, 2023 go to post

Alex, 

I tried that but now I am receiveing... ERROR #5002: ObjectScript error: <UNDEFINED>zDecodeBase64HL7ToFile+22^osuwmc.Functions.1 *%C(10)

ClassMethod DecodeBase64HL7ToFile(base64 As %Stream.GlobalBinary, Ancillary As %String, FileName As %String) As %String

{

  set ArchDir = "/ensemble/data/transfer/AncillaryPDF/"

  set ArchAncDir = ArchDir_Ancillary_"/"

  set FaxDateDir = ArchAncDir_$PIECE($ZDATE($HOROLOG,7)," ",1)_"-"_$PIECE($ZDATE($HOROLOG,7)," ",2)_"-1/"

  if '##class(%Library.File).DirectoryExists(ArchDir)

  {

    do ##class(%Library.File).CreateDirectory(ArchDir)

  }

  if '##class(%Library.File).DirectoryExists(ArchAncDir)

  {

    do ##class(%Library.File).CreateDirectory(ArchAncDir)

  }

  if '##class(%Library.File).DirectoryExists(FaxDateDir)

  {

    do ##class(%Library.File).CreateDirectory(FaxDateDir)

  }

  set Oref = ##class(%FileBinaryStream).%New()

  ///$$$LOGINFO(FaxDateDir_FileName)

  set Oref.Filename = FaxDateDir_FileName

  Do base64.Rewind()

  While 'base64.AtEnd {

      set ln = base64.ReadLine()

      set:ln[%C(10) base64.LineTerminator=$C(10)

      set lnDecoded = $system.Encryption.Base64Decode(ln)

    do Oref.Write(lnDecoded)

  }

  Do Oref.%Save()

  set PDFFilePath = FaxDateDir_FileName

  return PDFFilePath

}

Scott Roth · Apr 19, 2023 go to post

I am also seeing this error when Decoding Base 64 and writing the contents out to a file on the file system. Can I not return a String to the DTL?

ClassMethod DecodeBase64HL7ToFile(base64 As %Stream.GlobalBinary, Ancillary As %String, FileName As %String) As %String

{

  set ArchDir = "/ensemble/data/transfer/AncillaryPDF/"

  set ArchAncDir = ArchDir_Ancillary_"/"

  set FaxDateDir = ArchAncDir_$PIECE($ZDATE($HOROLOG,7)," ",1)_"-"_$PIECE($ZDATE($HOROLOG,7)," ",2)_"-1/"

  if '##class(%Library.File).DirectoryExists(ArchDir)

  {

    do ##class(%Library.File).CreateDirectory(ArchDir)

  }

  if '##class(%Library.File).DirectoryExists(ArchAncDir)

  {

    do ##class(%Library.File).CreateDirectory(ArchAncDir)

  }

  if '##class(%Library.File).DirectoryExists(FaxDateDir)

  {

    do ##class(%Library.File).CreateDirectory(FaxDateDir)

  }

  set Oref = ##class(%FileBinaryStream).%New()

  ///$$$LOGINFO(FaxDateDir_FileName)

  set Oref.Filename = FaxDateDir_FileName

  Do base64.Rewind()

  While 'base64.AtEnd {

      set ln = base64.ReadLine()

      set lnDecoded = $system.Encryption.Base64Decode(ln)

    do Oref.Write(lnDecoded)

  }

  Do Oref.%Save()

  set PDFFilePath = FaxDateDir_FileName

  return PDFFilePath

}

Scott Roth · Apr 18, 2023 go to post

By Adding a timeout of 2, and setting the force flag I was able to get it down from 18 min to roughly 11 min. If I remove the timeout and force flag, and watched the output I could possibly find those problematic children. I wonder if using Ens.Job would be any easier as the objects have been disabled its a matter of getting the Jobs to stop and send the unbind. 

Has anyone used Ens.Jobs before to quickly bring down a Namespace in a controlled environment? We need to unsure the unbinds are sent so we can move to a new IP address on a different section of the network.

Scott Roth · Apr 18, 2023 go to post

Using the suggestions below, looping through the Config Items doesn't appear to be the issue. I ran into an issue with the UpgradeProduction. In total it took 18 min to shutdown all the Services in just one namespace when I looped through all the Config Items, disabled them, and then Updated the Production with no timeout or force to shut them down. Is there a way to make UpgradeProduction run faster beside setting the timeout or force?

Scott Roth · Apr 12, 2023 go to post

I need to be able to loop through all the Services/Operations to shut them down to ensure that the TCP Disconnect is sent. 

We had a consultant create us a script that uses Regex to loop through and shutdown those Services/Operations, but running the script to bring everything down takes a good 10 min or so to disable all the Service Operation Objects.

In testing the cut over when we did our Test Environment in total it took us 20 min to bring down Ensemble (2018.1.3) and bring up IRIS (2022.1) with the network changes.

But we forgot this step and had to ask different systems to restart their Interfaces because they were still hung on the previous connections and don't have framework to realize the connection was no longer connected.

Is there a way to be able to cutdown the response time of EnableConfig item?

Scott Roth · Apr 12, 2023 go to post

You could send it through a Business Process (BPL) and make multiple sends to an EnsLib.RecordMap.FileOperation. 

Scott Roth · Apr 12, 2023 go to post

Could you create an %ALL namespace and map the the routines in the %ALL namespace so they are available across all the namespaces?

Scott Roth · Apr 10, 2023 go to post

The problem was from having the Port Authority previously setup using the Namespace before it was recreated. Working with WRC, I had to delete the existing Doc DB IRIS Interoperability from Doc DB Applications, remove the existing job from the task manager, and recreate the Task Scheduler job to have it recreated.

Scott Roth · Apr 6, 2023 go to post

There wasn't any clear cut explanations on how I could use that. Do you have some examples?

Scott Roth · Apr 6, 2023 go to post

I tried the open also. But I did find a work around by resetting the ##class(%File).SetAttributes which is basically doing a chmod but at the ObjectScript level when creating/appending to the file. 

So what is %Stream really doing, is it just creating a new file based on what is in memory? Is it just reading the entire file into Memory so the IO is cut down and creating a new file from what is in Memory?

Scott Roth · Apr 6, 2023 go to post

the Function is already using %Stream.FileCharacter and MoveToEnd(). After MoveToEnd() is called the second time we see the permissions on the file get updated.

Scott Roth · Apr 6, 2023 go to post

We have gone through all the permission settings at the directory and user level. We do not believe it is an unmask issue as the file is ok when it is first created, but the subsequent writes cause the permissions to change. If it was an unmask issue wouldn't the file have the wrong permissions in the first place? And I confirmed its not a user issue as its been duplicated with the owner of the directory and others within the same group.

Instead of MoveToOpen is there a way to use Open the file and go to the end of the file to insert the data? I tried looking at %File but could not figure out now to append data to the end of the file I just kept overwriting data.

Scott Roth · Apr 5, 2023 go to post

Not really... 

I am not sure if this matters, but I deleted and re-created the TESTCLIN namespace while this was still on the scheduler and trying to run. I updated the Report settings to point to the new TESTCLIN namespace but still receiving this error. I have opened a ticket with WRC to see if the Doc DB IRISInteroperabilityPorts just needs deleted from TESTCLIN and we try again.

Scott Roth · Mar 30, 2023 go to post

I tried parallel processing by splitting messages between the two business processes however I ran into deadlock issues, so thats out of the question. But thanks

Scott Roth · Mar 24, 2023 go to post

This is the first time I am using Export, so how would I get all the classes under a package?

Scott Roth · Mar 24, 2023 go to post

Timothy and I have already been in contact and had discussed this in the past. As of right now I have put that on hold here at OSUWMC due to other priorities.

Scott Roth · Mar 8, 2023 go to post

The ZSTOP example in the documentation uses the ZUTIL method, does anyone have examples on how to code ZSTOP outside of the Documentation provided. 

Scott Roth · Mar 1, 2023 go to post

Thanks this gives me some guidance along with other examples I have gotten. NotifyBecomesPrimary is the one I’m most looking at right now. Once that hits then I’m going to call a shell script through $ZF to execute. 

Scott Roth · Mar 1, 2023 go to post

Do you know where I can get a sample of ZMIRROR to know how to code it?

Scott Roth · Mar 1, 2023 go to post

@Lorenzo Scalese 
How did you configure/install ZMIRROR? Where does it need to be put for the system to recognize it needs to run? I understand what ZMIRROR does, just looking for examples.

Scott Roth · Feb 28, 2023 go to post

The documentation mentions the use of ZMIRROR to Monitor the Mirroring....

Does anyone have any code/scripts they would be willing to share that shows me how ZMIRROR works and how it can be used?

Does ZMIRROR have to be scripts that are run on each part of the Mirror to monitor the status or can this be done on the server that is the Arbiter?

How can one detect that a failover is happening and therefore kick of shell level scripts to execute stuff on the OS Level such as moving the VIP and syncing directories?

Scott Roth · Feb 28, 2023 go to post

We wanted to know if we could get the status from the Arbiter to tell a shell script at the OS level to kick off... to failover the VIP, and additional directories at the server level that is not part of the IRIS mirror.

Scott Roth · Feb 24, 2023 go to post

Does anyone have some good examples of ZSTART, ZSTOP, or ZMIRROR that they use to start the External Language Server like the %JDBC Server? As we move to mirroring I worry about remembering to start up the %JDBC Server if it does not start automatically.

Please and thanks

Scott

Scott Roth · Feb 22, 2023 go to post

Is there a way that we could get the status of the mirror from the arbiter, so it can kick of failover scripts to move things to our failover node that is non IRIS related?

Scott Roth · Feb 21, 2023 go to post

Yes at the Application level we will be using a VIP, I just wonder I should of used that same VIP for the mirroring setup with the Async (DR) node.

Scott Roth · Feb 21, 2023 go to post

My Certifications/Load Certifications doesn't appear to be working for me. When I click Load Certifications, nothing happens besides the button being shaded.

Scott Roth · Feb 21, 2023 go to post

Do I need a Virtual IP specific for the Mirror? What happens if we fail over to Node B, but the Async (C) was pointed to the mirror on Node A. What happens to the Async?

Scott Roth · Feb 21, 2023 go to post

The quick and dirty answer is yet. I have something similar where I created specific pages geared towards others outside of my group to allow them access to their specific page built for their data lookup tables to be modified. I created a specific role for this, and we manage access to that role by using an AD group/Delegated Authentication. 

Scott Roth · Feb 16, 2023 go to post

I've decided to just go with the ISCAgent install right now, thanks. I will keep this in mind when I have time to revisit it.