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

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

#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                                            */
 QUSCRTUS(name,extatr,initsize, initval, aut,text, replace, &error);

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

 /* Retieve Pointer to User Space                                */

 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++) {
  printf("Object Type: %s\n", xobjects310[i].Path_Name); };

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


This thread ...


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

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