|
Hi Everyone, I have an IFS service program with the following procedure: p IFS_prt b export d IFS_prt pi d hFile like(int) value d Text 32766a value d Data s 32766a d NbrWritten s like(int) c eval Data = %trimr(Text) c eval NbrWritten = api_write( c hFile: c %addr(Data): c %len(%trimr(Data))) p e And I use it in an RPGLE (V4R5) program like this: d CnvRec s 128a c eval CnvRec = 'GL CONVERSION ' + @TapeID + x'25' c callp IFS_prt(hCnvFile:CnvRec) Note the disparity in lengths of CnvRec and Text. The manual (Title: ILE RPG for AS/400 Reference; Document Number: SC09-2508-02) states that: "The rules for what can be passed as a value parameter to a called procedure are the same as the rules for what can be assigned using the EVAL operation. The parameter received by the procedure corresponds to the left-hand side of the expression; the passed parameter corresponds to the right-hand side. See "EVAL (Evaluate expression)" in topic 4.4.36 for more information." To me that sounds like it's effectively doing an EVAL TEXT = CNVREC in the above example. If that's true, then TEXT should be padded with blanks after the x'25'. Instead, starting at pos.1025, it has some junk, then repeats the value in CnvRec. So what's the real story with the VALUE option? tia, Peter Dow Dow Software Services, Inc. 909 425-0194 voice 909 425-0196 fax _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com
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.