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


  • Subject: RE: Examples
  • From: "Bob Crothers" <bob@xxxxxxxxxxxxxx>
  • Date: Tue, 13 Jun 2000 15:23:22 -0500
  • Importance: Normal

Greg,

First, I'd recommend you use the following declaration for your space
pointer:

unsigned char *mySpacePtr;

By using an unsigned char, the compilor will not play mind/sign games with
you when doing compares.  It might not mater for what you are doing today,
but someday it will.

After you have the pointer to the user space, it is simple...just use it.

Eg: in your code, usrspc now points to the actual data in the space.  If you
do a strcpy(usrspc, "My Space"); and then dump the space, the first 8
characters will be "My Space" and character 9 will be a hex 0 (end of the
string).

And reading is the same concept.  Spaces are very easy to work with in C.
Almost like a very large in memory field, except they have persistence.

Bob

-----Original Message-----
From: owner-c400-l@midrange.com [mailto:owner-c400-l@midrange.com]On Behalf
Of Greg Leibfried
Sent: Tuesday, June 13, 2000 2:40 PM
To: C400-L@midrange.com
Subject: Examples

Phil,

Thanks for those examples..they will be good to refer to (at least for
me ;-)
I'm looking for additional examples on retrieving info from user spaces.
I have program that calls the QMHLJOBL api to load a list of messages
into a user space.
My problem is that I'm having hard time getting the retrieval of the
list down.

Declarations...

  Qmh_Ljobl_JSLT0100        jslt100;
  Qus_EC                    error;
  char                      *usrspc,*usrspcptr;

Here is my call to QMHLJOBL...

  QMHLJOBL("TEST      TESTLIB   ",       //name of USER SPACE
            "LJOB0100",                  //format of message returned
            &jslt100,                    //message selection information
            sizeof(jslt100),             //size of message selection
info
            "JSLT0100",                  //format of message selection
info
            &error);                     //error structure


Here is my call to QUSPTRUS to retrieve a pointer to the space....

  QUSPTRUS("TEST      TESTLIB   ",&usrspc,&error);


I'm a little confusted by the next step, now that I have a pointer the
space.  I've used another tool to display the user space, so I know that
the data I want is in there.  What do I do next?

If anyone has some good examples or pointers on what to do next, I'd
appreciate it!

Thanks!

....gregl
+---
| This is the C/400 Mailing List!
| To submit a new message, send your mail to C400-L@midrange.com.
| To subscribe to this list send email to C400-L-SUB@midrange.com.
| To unsubscribe from this list send email to C400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator:
bob@cstoneindy.com
+---

+---
| This is the C/400 Mailing List!
| To submit a new message, send your mail to C400-L@midrange.com.
| To subscribe to this list send email to C400-L-SUB@midrange.com.
| To unsubscribe from this list send email to C400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: bob@cstoneindy.com
+---


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.