Hi All
Hope all are staying safe!!!
I have a requirement to create a text file in IFS and write log data into it.
I used SCOTT's IFSIO and IFSTEXT code to do this. To open the file, I used the below command.
With this, I was successfully able to create the file and I used write() function to add content into the txt file.
My file looks something like this in the IFS.
To view, the below text file, I had to do WRKLNK '/home/user', press ENTER, scroll down till I find TMP20200531.TXT and press 5 to open the file.
Even though, I was able to write successfully into the IFS text file, I could not access the file directly using WRKLNK command.
When I used WRKLNK on the /home/user/TMP20200531.TXT. I am getting Object not found error.
I wanted to use this file as an attachment in SNDSMTPEMM command to send it via email. I am getting the below error.
After giving all access to the file using the MODE flags, I am not sure like what to do. Can anyone please suggest me a solution for my issue?
Hope all are staying safe!!!
I have a requirement to create a text file in IFS and write log data into it.
I used SCOTT's IFSIO and IFSTEXT code to do this. To open the file, I used the below command.
Code:
unlink(AucFileName) ; aucfd = open(AucFileName: O_RDWR + O_CREAT + O_TEXTDATA : S_IRUSR + S_IWUSR + S_IXUSR + S_IRGRP + S_IWGRP + S_IXGRP + S_IROTH + S_IWOTH + S_IXOTH);
Code:
linelen = %len(%trimr(line)); writeLine(aucfd:%addr(Line):linelen);
To view, the below text file, I had to do WRKLNK '/home/user', press ENTER, scroll down till I find TMP20200531.TXT and press 5 to open the file.
PHP Code:
Browse : /home/user/TMP20200531.TXT
Record : 1 of 92 by 18 Column : 1 200 by 131
Control :
....+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8....+....9.
************Beginning of data**************
Test Log for the servers
Date: 05/31/20 Time: 18.40.22
-------- Auction IBMi -------
SUCCESS : Ping Result for Server1
SUCCESS : Ping Result for Server2
SUCCESS : Ping Result for Server3
FAILURE : Ping Result for Server4
SUCCESS : Ping Result for Server5
SUMMARY : 4/5 server responses are SUCCESS
When I used WRKLNK on the /home/user/TMP20200531.TXT. I am getting Object not found error.
I wanted to use this file as an attachment in SNDSMTPEMM command to send it via email. I am getting the below error.
PHP Code:
Integrated File System File Not Found.
Comment