Question Thembelani Mlalazi · Dec 5, 2017 How to Subtract or Add dates I am trying to age based on a given date and current date here is my code: Property DOB As %Date Method GetAge() As %Integer { if (..DOB="") { set today=0 } else { set today=$ZDate($HOROLOG,2)-$ZDate(..DOB) } write "Today's==="_$ZDate($HOROLOG),! write today return today } #Object Data Model #Caché 0 4 0 2.6K
Question Thembelani Mlalazi · Nov 14, 2017 How to Manipulate XML to Formatted String I am using studio 2015 version which does not have dynamic objects and I need to read xml and convert that to a json I have managed to come close to json string but with little difficulties .I need to be able to identify the root element and specify where to put braces between objects anyone with any idea is welcome he is my code so far #JSON #XML #Caché 1 12 0 1.6K
Question Thembelani Mlalazi · Nov 9, 2017 Is There way to write to a text file direct without Stream I am using a %GlobalStream to create as % stream.Object and writing that to a file but for some reason when I run that on the terminal I get <PARAMETER>zWrite^%Library.GlobalCharacterStream.1 and no file is createdI have tried the following here is my code and still get the same result any help appreciated #Beginner #Object Data Model #Terminal #XML #Caché 0 5 0 3.1K
Question Thembelani Mlalazi · Nov 6, 2017 Looping through a DTL I have a DTL that reads an xml file and I want transform that to a list of objects but I have a problem looping through my xml as when I try I get the first instance on the xml not the whole XML being transformed. here is my example. Here is the output <s01:WardOccupancy> <s01:WardOccupancy> <Organisation>BYG</Organisation> </s01:WardOccupancy> </s01:WardOccupancy> </msg> from #Ensemble #DTL #XML 0 1 0 707
Question Thembelani Mlalazi · Oct 20, 2017 Record mapper xml to a xml output file I have a batch record mapper that reads a csv file and passes the message to a process that uses the EnsLib.MsgRouter.RoutingEngine and would like to pass the message to an operation that will output that as a XML file but so far been unlucky as the operation that I use , uses the EnsLib.EDI.XML.Operation.FileOperation which only works with the messages("BusinessOperation class for writing XML messages to a file. #Beginner #Business Process (BPL) #DTL #XML #Ensemble 0 2 0 1K
Question Thembelani Mlalazi · Oct 16, 2017 How to generate a random string of a fixed length in cache Is it possible to generate a random string in cache please advice thank you in advance #Beginner #Object Data Model #Caché 0 4 0 1.7K
Question Thembelani Mlalazi · Oct 13, 2017 CSVFile straight TO a XML File I am trying to read a csv file and transfer it to a XML file without storing the objects to a database I have this code here doing the reading and have another method transferring the object read to a file but the reading one reads fine when it comes to the converting one I run to problems nothing happens any help appreciated #CSV #Object Data Model #ObjectScript #XML #Caché 0 2 0 808
Question Thembelani Mlalazi · Oct 12, 2017 Issue transforming CSVFile To An XML File I have a business service that brings in a xml virtual document to the production and also a csv service that brings in a csv file and have a process that transforms both to a xml output but I have a problem with the csv as it is giving me this error when I try to trans form it ```ERROR <Ens>ErrException: <PROPERTY DOES NOT EXIST>zOnRequest+1 ^EnsLib.MsgRouter.VDocRoutingEngine.1 *DocType``` I have read here followed the suggestion but now I do not get any errors but my m #Business Process (BPL) #CSV #DTL #XML #Ensemble 0 5 0 539
Question Thembelani Mlalazi · Oct 10, 2017 How to project XML to Nested Xml I have an xml file that I read into objects and I am trying to print that file back in nested xml anyone with idea on how that can be achieved or where I can read in order to achieve this, here is an example of what I am trying to do.From this <Root> <FamilyMembers> <familyName> </familyName> <Name> </Name> <Age> </Age> <Employment> </Employment> </FamilyMembers> </Root> To this #Object Data Model #XML #Caché 0 2 0 664
Question Thembelani Mlalazi · Oct 9, 2017 How to read CSV file contents into Objects in Cache I have this code here;I am trying to read a csv file but when I run this code I get <LIST>%open+3^%stream.Object.1 would anyone have a look and tell me where I am going wrong .Record mapper is fine but I need a custom csv Importer #CSV #Object Data Model #Caché 0 13 0 4.8K
Question Thembelani Mlalazi · Oct 4, 2017 How to Ignore Headers on a CSV File when Using Record Mapper I have implemented a csv record mapper to read files into the production in ensemble but it errors every time I read a file with headers on the columns as these are not recognised as the specified data types .Is there a way to ignore the headers when reading in values from a file with headers. Please note this have been built using the pre built components. #CSV #Ensemble 0 1 0 815