× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.




I have this routine that's suppose to create a new IFS document (if already
exists, I want to overwrite what's there).  When I tested this program last
week, it worked as expected.  But now that it's in production, it's not
working anymore.  I've even moved the data from this morning to the test
system to walk through the steps today still a no go.

When I stepped through the program...

FileName = '/html/imsinv/INV00100001676760.HTML'  // this is correct.
FileNamP = SPP:C71128539607BF90                   // I assume this is
correct.
OFLAG = 16777282
OMODE = 511
CP = 819

but...

open(FileNamP:Oflag:Omode:cp) = -1

I found in the archives that someone else needed to trim the FileName for
the openFile() routine that they were using, I'm wondering though, do I
need to have a trim about my FileNam on the FileNamP = %ADDR(FileNam) line?
Well then again, the FileName will always be the same length of 35
characters. This process is new to me, please bear with me.

Thanks,

P.S. I am using the 'QC2LE' binding directory.

BegSr CreateIFSDocument#;
   // This code was copied from the web, therefore, I'm
   // not quite sure how this all works. But I'll Try to
   // explain it to the best of my knowledge.
   *In99 = *Off;
   // Form the file name you want to create in the IFS.
   FileNam  = IFSDir + 'INV' + DRGLCPY + %EditC(DRORD:'X') +
              '.HTML';
   // This is new to me, but I believe that I'm telling
   // this field to point to the address of FileNam
   FileNamP = %ADDR(FileNam);
   // setup the OFlag to indicate that we want
   // this file to be write only and to truncate
   // left over data when the file already exists.
   // Again, I don't know how this works, but
   // O_WRONLY = write only, O_TRUNC = truncate.
   Oflag = O_WRONLY + O_TRUNC + O_TEXTDATA;

   // Open the file name requested.
   If open(FileNamP:Oflag:Omode:cp) = -1;
      perror(FileNamP);
      *In99 = *On;
      LeaveSR;
   EndIf;

EndSr;


Michael Schutte
Admin Professional
Bob Evans Farms, Inc.
We've built a better hotcake -- Stacked and Stuffed Hotcakes -- coming
January 11th!
For hotcake tips, interviews with our chefs and more, check out the Stacked
and Stuffed blog at http://imstuffed.blogspot.com


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.