× 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 tried the same thing and everything I tried crashed also. What I did find
was that I was able to do a SNDJRNE to an object path without an issue.
Worked fine.

May I suggest you just use ILE. Create an CL module and put your SNDJRNE in
the CL module and bind to a C module. Lot simpler than trying to get API to
work.

On Mon, Oct 9, 2017 at 11:15 PM, Zvi Kave <zvi.kave@xxxxxxxxxx> wrote:

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 is the Bare Metal Programming IBM i (AS/400 and iSeries) (C400-L)
mailing list
To post a message email: C400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/c400-l
or email: C400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/c400-l.



As an Amazon Associate we earn from qualifying purchases.

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-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.