|
Hi larry, Can you just add two tests : If %found after the chain and if rang < 10000 and > 0 ? ----- Original Message ----- From: "Larry Ducie" <larry_ducie@xxxxxxxxxxx> To: <rpg400-l@xxxxxxxxxxxx> Sent: Thursday, November 03, 2005 11:15 AM Subject: Re: Problem with field selection subfile on V5R3M0 > Hi Tommy, > > Below is the entire subprocedure which updates the subfile: > > -- standard disclaimer: not my code :-) > > p fillSubfile b > d fillSubfile pi > *..................................................................... > /free > > monitor; > > error = *off; > > // Read subfile records to ensure an entry has been made... > for idx = 1 to max; > chain idx sfl1; > position = *off; > rev_Image = *off; > highlight = highField; > > // Workflow generics... > if indAppln; > s@Appln = wkfAppln; > appln_RRN = #RRN1; > endif; > > if indEvtID; > s@EvtID = identifier; > evtID_RRN = #RRN1; > endif; > > if indEvent; > s@Event = event; > evtID_RRN = #RRN1; > endif; > > if indLevel; > s@Level = escLevel; > level_RRN = #RRN1; > endif; > > if indPriority; > s@Priority = priority; > prty_RRN = #RRN1; > endif; > > if indKey1; > s@Key1 = wkfKey1; > key1_RRN = #RRN1; > endif; > > if indKey2; > s@Key2 = wkfKey2; > key2_RRN = #RRN1; > endif; > > if indKey3; > s@Key3 = wkfKey3; > key3_RRN = #RRN1; > endif; > > if indKey4; > s@Key4 = wkfKey4; > key4_RRN = #RRN1; > endif; > > if indKey5; > s@Key5 = wkfKey5; > key5_RRN = #RRN1; > endif; > // Application specifics... > if indCtry; > select; > when wkfAppln = 'IN'; > s@Ctry = %subst(applicationLayer:38:3); > > when wkfAppln = 'OF'; > s@Ctry = %subst(applicationLayer:11:3); > endsl; > ctry_RRN = #RRN1; > endif; > > if indIloc; > select; > when wkfAppln = 'IN'; > s@Iloc = %subst(applicationLayer:41:4); > when wkfAppln = 'OF'; > s@Iloc = %subst(applicationLayer:38:4); > endsl; > iloc_RRN = #RRN1; > endif; > > if indCust; > select; > when wkfAppln = 'IN'; > s@Cust = %subst(applicationLayer:272:8); > > when wkfAppln = 'OF'; > s@Cust = %subst(applicationLayer:28:10); > endsl; > cust_RRN = #RRN1; > endif; > if indOrdr; > select; > when wkfAppln = 'IN'; > s@Ordr = %subst(applicationLayer:280:9); > s@Subo = %subst(applicationLayer:289:3); > > when wkfAppln = 'OF'; > s@Ordr = %subst(applicationLayer:14:10); > s@Subo = %subst(applicationLayer:24:10); > endsl; > ordr_RRN = #RRN1; > endif; > > update sfl1; > endfor; > > on-error; > return; > endmon; > > return; > /end-free > > *..................................................................... > p fillSubfile e > *..................................................................... > > > An important point to note is that, before the program was called, the > display file object had the following attributes: > > Size . . . . . . . . . . . . . . . : 12288 > Associated space size . . . . . . : 12032 > > After the program was ended the display file object had the following > attributes: > Size . . . . . . . . . . . . . . . : 4096 > Associated space size . . . . . . : 3840 > > Very strange - 4mb. Is this the object header segment? Have I lost the data > segment? > > Cheers > > Larry > > > -- > This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list > To post a message email: RPG400-L@xxxxxxxxxxxx > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/mailman/listinfo/rpg400-l > or email: RPG400-L-request@xxxxxxxxxxxx > Before posting, please take a moment to review the archives > at http://archive.midrange.com/rpg400-l. > >
As an Amazon Associate we earn from qualifying purchases.
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.