- Spaces at the end of file names in the IFS are significant. When you pass a 50 char field to WrtHtmlToStmf and don t wrap it in %trim, you create a file nameMessage 1 of 5 , May 23, 2013View SourceKevin BSee the spaces before the end quote?Put a 7 next to clia.txt and I get:wrklnk '/kevin/cl*' givesYou can also do this. Wrklnk to just the path portion. Then do a 7 to rename next to the file. You will be able to spaces on that screen. For example on my system.Spaces at the end of file names in the IFS are significant. When you pass a 50 char field to WrtHtmlToStmf and don't wrap it in %trim, you create a file name with spaces at the end. When you do wrklnk and give it the path and name, you have to pass wrklnk the spaces at the end also.Do a wrklnk '/path/to/the/file.html ' where you make the number of characters within the quotes equal to 50. That will probably work. You've already found the solution - %trim your filename before you pass it to WrtHtmlToStmf.
Work with Object Links
Directory . . . . : /kevin
Type options, press Enter.
2=Edit 3=Copy 4=Remove 5=Display 7=Rename 8=Display attributes
11=Change current directory ...
Opt Object link
Rename Object (RNM)
Type choices, press Enter.
Object . . . . . . . . . . . . . > '/kevin/clia.txt '
New object . . . . . . . . . . .
On Thu, May 23, 2013 at 5:17 AM, Giovanni B. Perotti <gb_perotti@...> wrote:
Maybe that you must %trim off the rightmost blanks from the path before performing the WRKLNK command.
--- In Easy400Group@yahoogroups.com, "Giovanni B. Perotti" <gb_perotti@...> wrote:
> In MMAIL, subprocedure WRTHTMLTOIFS() is from service program
> MMAIL/GPSRVPGM. This service program is NOT for external use, it is only for
> MMAIL internal developments.
> You must NOT use it, and use instead the same procedure from service program
> CGISRVPGM2, library CGIDEV2.
> Errors in using WRTHTMLTOIFS() are documented in file *LIBL/CGIDEBUG.
FYI This is the result of my tests. On the system i am working on, actually, there is non cgidev2 lib, we have mmail lib and hssfcgi lib, so i tested the procedure from these 2 libs.
In my pgm's i define a variable FullPathToFile 50 char containing the full path and file name to be created on the IFS, if i do:
ECmd = WrtHtmlToStmf(%Trim(FullPathToFile) : CodePage) everything works fine with both service programs, if i do:
ECmd = WrtHtmlToStmf(FullPathToFile : CodePage) the stream file is created correctly, containing the right data, i can open it and read it, but if i do wrklnk to the file path i get an object not found error. That's it.