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



This is a multipart message in MIME format.
--
[ Picked text/plain from multipart/alternative ]
Hi,

i'm a newbie in C on iSeries. I tryed to do program wich will list all
User owned objects on IFS ... Now i've something, what don't want to show
me all data ... It show me somthing but there are not only the files but
some another information wich i don't need and by end of the programm i
got this message in my Job Log:  Space offset X'00008E00' or teraspace
offset X'0000000000000000' is  outside current limit for object QLIST310.
                      Please tell me someone what do i wrong ?!

Best regards
Peter



#include <string.h>
#include <qusec.h>
#include <qusgen.h>
#include <qsnapi.h>
#include <quscrtus.h>    //Create User Space
#include <qusdltus.h>    //Delete User Space
#include <qusrtvus.h>    //Retrieve User Space
#include <qusptrus.h>    //Retrieve Pointer to User Space
#include <qsylobja.h>    //List Owned Objects

Qus_EC_t error;
Qus_Generic_Header_0100_t *space;
// Qsy_OBJA0310_List_T *objects310;

typedef struct {
                 Qsy_OBJA0310_List_T  obja0310;
                                char  Path_Name[100];
                } IFS_Struct;

IFS_Struct  *xobjects310;
char        *list_section;

char name[20]   ="QLIST310  QTEMP     ";
char extatr[20] ="                    ";
char initval[1] =" ";
char aut[10]    ="*CHANGE   ";
char text[50]   ="List all Owned Objects";
char replace[10]="*YES      ";
int initsize    = 1024;

char usrprf[10];
char format[8]   ="OBJA0310";
char objtype[10] ="*ALL      ";
char retobj[10]  ="*OBJOWN   ";
char cnnhandle[20];
char request;

void main(int argc, char *argv[])
{
 int i;
 char temp[10];
 QsnClrScl(_C_Get_Ssn_Handle(), '0', NULL);
 if (argc < 1) printf("Parameter 1 ist hier ... ");
 memset(cnnhandle,' ',20);
 strcpy(usrprf, argv[1]);

 /* Create User Space                                            */
 error.Bytes_Provided=0;
 QUSCRTUS(name,extatr,initsize, initval, aut,text, replace, &error);

 /* List all owned Objects                                       */
 error.Bytes_Provided=0;
 QSYLOBJA(name,format,usrprf,objtype,retobj, cnnhandle, &error);

 /* Retieve Pointer to User Space                                */
 error.Bytes_Provided=0;
 QUSPTRUS(name,&space,&error);

 list_section = (char *) space;
 list_section = list_section + space->Offset_List_Data;
 xobjects310 = (IFS_Struct *) list_section;

 for(i=1;i<=space->Number_List_Entries;i++) {
  &xobjects310[i];
  printf("Object Type: %s\n", xobjects310[i].Path_Name); };

 printf("%d\n", space->Number_List_Entries);


 QUSDLTUS(name,&error);
}


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.