|
Hi Jerry,
C Eval String_V = %TrimR(String) + Ifs_RecEnd + x'00' * Open the IFS file for update and write the updated string... C Eval File1 = OpenIFS(%TrimR(IFS_Filename):'w') C Callp WriteIFSRec((String_V):File1)
Three things:a) You don't need to manually add the x'00' on the first line. The options(*string) on the prototype will add it for you automatically.
b) You have an unnecessary set of parenthesis around String_V on the WriteIFSRec() call.
c) You can code an expression on the WriteIFSRec() call if you line, this would save you having to do an EVAL prior to the call.
Assuming that String_V is defined with the VARYING keyword, you can do this:
C Eval String_V = %TrimR(String) + Ifs_RecEnd C Callp WriteIFSRec(String_V:File1) or, simply: C Callp WriteIFSRec(%trimr(String)+Ifs_RecEnd:File1) In free-format, it's easier to fit this all in one line: /free WriteIFSRec( %trimr(String) + Ifs_RecEnd : File1 );
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.