Hi Mark,

You are right. I realized that the code I wrote crashes.
But because it was not used actually until now, no one complained.
I need small ILE C example to see how it worked correctly (V5R3 or
higher).
I am sure that the following code that I used is not good, but it is
better if you have a working example.

#include <stdio.h>
#include <string.h>
#include <qjosjrne.h>
#include <qusec.h>

typedef struct {
int fillerx;
int num_rec;
int object_type; /* = 7 */
int object_len; /* = 100 - path name length */
char *ppath;
} JE_INFO ;
union rec
{
JE_INFO je_info;
char rbuf[256];
};
union rec urec;
typedef struct {
int ccsid; /* = 0 */
char country_id[2]; /* = x'0000' */
char language_id[3]; /* = x'000000' */
char reserved3[3];
int path_type_indicator; /* = 0 */
int path_len; /* = 19 */
char path_delimiter[2]; /* = '/' */
char reserved10[10]; /* = x'0000...00' */
char path_name[19];
} PATH_NAME;
PATH_NAME path_st;
jr_write(char *entryData)
{
Qus_EC_t errCode;
int rc;
int size;
char objName[10] = "MYJRN " ;
char objLibrary[10] = "QGPL ";
char qualName[20];
short int entryDataLen = 0;
char *pErrCode = (char *) &errCode;
sprintf(qualName, "%10.10s%10.10s", objName, objLibrary);
/* entryDataLen = sprintf(entryData, "%s", "Good Luck"); */
entryDataLen = strlen (entryData);
urec.je_info.ppath = (char *) &path_st.ccsid;
urec.je_info.fillerx = 0; /* to avoid file name */
urec.je_info.num_rec = 1;
urec.je_info.object_type = 7;
urec.je_info.object_len = 51;
path_st.ccsid = 0;
memset (path_st.country_id, 0, 2);
memset (path_st.language_id, 0, 3);
memset (path_st.reserved3, 0, 3);
path_st.path_type_indicator = 0;
path_st.path_len = 19;
memcpy (path_st.path_delimiter, "/ ", 2);
memset (path_st.reserved10, 0, 10);
memcpy (path_st.path_name,
"/SMZVDTA/log/av.log",
path_st.path_len);
errCode.Bytes_Provided = 0;
errCode.Bytes_Available = 0;
QJOSJRNE(qualName, urec.rbuf, entryData, entryDataLen, pErrCode);
}

Thanks,

Zvi

On 08/10/2017 18:59, Mark S Waterbury wrote:

Zvi:

You asked exactly the same question almost 12 years ago, on 17-Nov-2005,
on this very list ... :-o

What kind of "difficulties" are you having? Error messages? At
compile-time or at run-time? What version/release of OS/400 or IBM i?

Perhaps if you posted a small snippet or example of source code to
show what you are trying to do, then someone might be able to assist?

Mark S. Waterbury

> On 10/8/2017 11:05 AM, Zvi Kave wrote:

I have dificulties to use QJOSJRNE API key 7 (with IFS path name)
in
ILE/C.
If someone can send me an example, I shall appreciate it very
much.

Regards,

Zvi

This thread ...

Follow-Ups:
Replies:

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

This mailing list archive is Copyright 1997-2020 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].