|
<P> Ok try this. I know this works because I use this method all the time.</P><P> </P><P>Create a ds with the same fields as your file. </P><P>This will ensure the data is kept in contiguous memory</P><P><FONT FACE="Courier">D MPSDs e ds extname(MPSSum)</FONT></P><P> </P><P>then for your arrays use pointers to overlay the fields in the data structure</P><P>D mpsch s like(mpsch1) dim(12) based(schPtr)</P><P>D schPtr s * inz(%addr(mpsch1))</P><P>to replace this:</P><P><FONT FACE="Courier">>D ScheduleDS ds inz<BR>>D mpsch1 1 11 2<BR>>D mpsch2 12 22 2<BR>>D mpsch3 23 33 2<BR>>D mpsch4 34 44 2<BR>>D mpsch5 45 55 2<BR>>D mpsch6 56 66 2<BR>>D mpsch7 67 77 2<BR>>D mpsch8 78 88 2<BR>>D mpsch9 89 99 2<BR>>D mpsch10 100 110 2<BR>>D mpsch11 111 121 2<BR>>D mpsch12 122 132 2<BR>>D mpsch 1 132 2 dim(12)</FONT><BR><BR><FONT SIZE=2><B>"Carel Teijgeler" <coteijgeler@xxxxxxxxx></B></FONT><BR><FONT SIZE=2>Sent by: rpg400-l-bounces@xxxxxxxxxxxx</FONT><BR><FONT SIZE=2>01/31/2004 12:04 AM CET</FONT><BR><FONT SIZE=2>Please respond to RPG programming on the AS400 / iSeries</FONT><BR><BR> <FONT SIZE=2>To:</FONT> <FONT SIZE=2>rpg400-l@xxxxxxxxxxxx</FONT><BR> <FONT SIZE=2>cc:</FONT> <BR> <FONT SIZE=2>bcc:</FONT> <BR> <FONT SIZE=2>Subject:</FONT> <FONT SIZE=2>RE: Load a record into a data structure for DEBUGGING purposes.</FONT><BR> <BR><BR></P><P><FONT FACE="Monospace,Courier">Peter,<BR></FONT><BR><FONT FACE="Monospace,Courier">you can rename the sufields in MPSDs with EXTFLD.something like:<BR></FONT><BR><FONT FACE="Monospace,Courier">>D MPSDs e ds extname(MPSSum)<BR>>D mpsch1a e extfld(mpsch1)<BR></FONT><BR><FONT FACE="Monospace,Courier">Regards,<BR>Carel Teijgeler<BR></FONT><BR><FONT FACE="Monospace,Courier">*********** REPLY SEPARATOR ***********<BR></FONT><BR><FONT FACE="Monospace,Courier">On 30-1-04 at 10:21 Peter Vidal wrote:<BR></FONT><BR><FONT FACE="Monospace,Courier">>"...could you just not use the fields in other data structures? Give a couple<BR>>of samples of these other data structures."<BR>><BR>>Yes, I need them there to be able to effectively process the data. Here are<BR>>more details of the program:<BR>><BR>>FMPSSum uf a e k disk<BR>>.<BR>>D MPSDs e ds extname(MPSSum) Prefix(#)<BR>>.<BR>> * Schedule Data Structure<BR>>D ScheduleDS ds inz<BR>>D mpsch1 1 11 2<BR>>D mpsch2 12 22 2<BR>>D mpsch3 23 33 2<BR>>D mpsch4 34 44 2<BR>>D mpsch5 45 55 2<BR>>D mpsch6 56 66 2<BR>>D mpsch7 67 77 2<BR>>D mpsch8 78 88 2<BR>>D mpsch9 89 99 2<BR>>D mpsch10 100 110 2<BR>>D mpsch11 111 121 2<BR>>D mpsch12 122 132 2<BR>>D mpsch 1 132 2 dim(12)<BR>><BR>>If I do not rename the MPSDS to have a PREFIX(let's say "#"), then it will say<BR>>that MPSCH1,MPSCH2,MPSCH3, etc. are already defined:<BR>><BR>>*RNF3315 20 a 009300 The Name entry is already defined on a<BR>>Definition<BR>> Specification; defaults to blanks.<BR></FONT><BR><BR><BR><FONT FACE="Monospace,Courier">_______________________________________________<BR>This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list<BR>To post a message email: RPG400-L@xxxxxxxxxxxx<BR>To subscribe, unsubscribe, or change list options,<BR>visit: <A HREF=http://lists.midrange.com/mailman/listinfo/rpg400-l>http://lists.midrange.com/mailman/listinfo/rpg400-l</A><BR>or email: RPG400-L-request@xxxxxxxxxxxx<BR>Before posting, please take a moment to review the archives<BR>at <A HREF=http://archive.midrange.com/rpg400-l>http://archive.midrange.com/rpg400-l</A>.</FONT></P>
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.