go to post Mack Altman · May 3, 2019 Yes, this would still need to be compiled. To give an example, an uncompiled AR inventory report will be around 500MB in XML format. When compiled (utilize PowerShell to open the XML with Excel, and SaveAs and XLSX formatted file), the resulting file will be around 25MB.
go to post Mack Altman · May 1, 2019 While the XML solution will work, XML is heavy. You’ll need to have it compiled post-creation, which can be done programmatically on a Windows Server with PowerShell. Otherwise, I’d use a python script to do the compilation on a Unix server.
go to post Mack Altman · Nov 2, 2018 It's amazing how many different ways everyone's taken to read a standard format. I thought I'd add this excerpt from the RFC 4180. So far, I haven't found a way to read a CSV line that takes into account all of the requirements of the escaped field, specifically with the LF character. To see this for yourself, create a new Excel workbook, data into a field and use Alt+Enter a few times, and then save the file as a CSV file. The line feeds are within the field data.The ABNF grammar [2] appears as follows:file = [header CRLF] record *(CRLF record) [CRLF]header = name *(COMMA name)record = field *(COMMA field)name = fieldfield = (escaped / non-escaped)escaped = DQUOTE *(TEXTDATA / COMMA / CR / LF / 2DQUOTE) DQUOTEnon-escaped = *TEXTDATACOMMA = %x2CCR = %x0D ;as per section 6.1 of RFC 2234 [2]
go to post Mack Altman · Nov 2, 2018 This is great except in the instance where you don't know the descriptors. We utilize CSVTOCLASS for situations where we do.
go to post Mack Altman · Nov 2, 2018 I was able to find in the documentation where it's stated that multi-line characters unsupported.
go to post Mack Altman · Nov 1, 2018 I attempted to use the following as the line terminator, which is in fact a CRLF. For some reason, it terminates even when only the LF occurs. S fi.LineTerminator = $c(13,10)
go to post Mack Altman · Nov 1, 2018 Here's the next challenge, and one that I'm encountering using the $$CSVtoList^%occLibrary... line feeds within the field data (enclosed in double quotes).The line ends with CRLF, and within the double quote enclosed field there appears 
 followed by a Line feed. The RFC 4180 standard states this should be acceptable, but I'm reviewing how to review this now. Any thoughts?
go to post Mack Altman · Nov 1, 2018 This works beautifully.Are you aware of where the %occLibrary documentation may be referenced?
go to post Mack Altman · Nov 1, 2018 I'd like to know this as well. It would definitely save me a lot of time by referencing this documentation.
go to post Mack Altman · Nov 1, 2018 Typically, I've dealt with XML, EDI, and tab-delimited files within Cache. All CSV files were typically done in PHP. It's definitely a great exercise.I did want to note that the above solution did not work with the following string. CSIN-01,01/01/2002,01/15/2003,,1,1002381,ABC CORP,02/22/2018,"NET ""15""","ANYTOWN, DC",JANE DOE,"ANYTOWN, DC",06/13/2018,$13900.00 ,$101.15 ,$5.13 ,$308.00 ,$281.70 ,$0.00 ,$0.00 ,$217.00 ,JOHN DOE
go to post Mack Altman · Nov 1, 2018 The initial post advised that it was to take into account fields enclosed in double quotes. CSV stands for comma-separated value, so I'm not sure how that would change the information.I did add the example since it appeared someone may not understand what taking into account double quotes means.
go to post Mack Altman · Nov 1, 2018 This doesn't take into account fields enclosed in double quotes. The goal is to remain compliant with RFC 4180.
go to post Mack Altman · Oct 26, 2018 This does work. I think the only downside is if you were to apply this to longer numbers. For example, an invoice number with 9 digits you'd have to write "000000000". As far as readability, you'd have to count those zeroes every time. For this reason, I'd say the combination of $TRIM and $JUSTIFY would be more appropriate since you'd alleviate how to count the zeroes.
go to post Mack Altman · Oct 26, 2018 If in an alternate namespace, this would require the namespace to contain the %qarfunc, or have a routine mapping to the USER namespace.
go to post Mack Altman · Aug 24, 2018 It's been a while since I posted this. However, we have since upgraded to 2015.2 and we're receiving the above error when we put the correct settings in Task Manager Email Settings.Is anyone successfully sending emails via SMTP with Office 365/Exchange Online?
go to post Mack Altman · May 5, 2018 I came across this comment and felt that others may benefit by reviewing the documentation rather than the debate. The documented answer for this is found here.
go to post Mack Altman · May 2, 2018 I know that mgstat has the queue size, blocks updated, and phase. What I'm looking for is more what is left in the queue. As of now, the WD is still on the same phase (1h and 6m later).
go to post Mack Altman · Apr 11, 2018 Answers to the following questions may be helpful.What Caché version are you running?What operating system is Caché running on?What operating system is the shared drive?