|
Dam fat fingered the PDA. Should have been "So THEN a record with the field
name can be added to file thus be added to
EVAL".
Thanks again,
Bill H
"Bill Hopkins" <BHopkins@xxxxxxxxxxxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
07/31/2003 01:40 PM
Please respond to RPG programming on the AS400 / iSeries
To: RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
cc:
Subject: Re: Field Names in File Field
Thanks Jim I'm try to avoid having to check the field Z for it's field
name value. So thought a record with field name can be added to file thus
be added to EVAL. I think Hans hit it on the head. I should use SQLRPGLE.
Next question I have if I fetch loop into
D DS_XYZFile E DS EXTNAME(XYZFILE)
Will the Z field of the Data Stucture have the "CUST" field name value and
if so can I use it to
do an EVAL OUTFILE = OUTFILE + %TRIM(Z) + X'05' + etc. within loop to
build OUTFILE without
IF Z='CUST'
EVAL OUTFILE = OUTFILE + %TRIM(CUST) + X'05' + etc.
ENDIF
Thanks for the "Example links" Buck on SQL but not where I can go look
with any speed at present. But will explore tonight.
Thanks
Bill H
"Jim Franz" <jfranz@xxxxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
07/31/2003 12:55 PM
Please respond to RPG programming on the AS400 / iSeries
To: "RPG programming on the AS400 / iSeries"
<rpg400-l@xxxxxxxxxxxx>
cc:
Subject: Re: Field Names in File Field
it will be "CUST"
try if z = 'CUST'
EVAL OUTFILE = OUTFILE + %TRIM(CUST) + X'05' + etc
jim
----- Original Message -----
From: "Bill Hopkins" <BHopkins@xxxxxxxxxxxxxxxxxxx>
To: <rpg400-l@xxxxxxxxxxxx>
Sent: Thursday, July 31, 2003 12:14 PM
Subject: Field Names in File Field
> I have a file that holds the field names from multiple files. I was
> wanting to use these field names to control what is going into a flat
> file. So that if one was delete from file or added to file it would
> control what fields went into flat file.
>
>
> File holding values has three fields X , Y , and Z. with X and Y as
> Keys and Z holding my field name from other files
> Example Z=CUST with CUST being field name from other file.
>
> I get all fields populated with values from their files. CUST = 123
>
> If I do an EVAL OUTFILE = OUTFILE + %TRIM(Z) + X'05' + etc.
>
> Will my value of %TRIM(Z) be CUST or 123. For some reason I think CUST.
>
> And if so has anyone done something like this or have examples.
>
> My mind is blank and
> I have no way to test on iSeries right now.
>
> Thanks
> Bill H
>
> Any thoughts, comments, or thumps on the Head excepted?!....
> _______________________________________________
> 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.
>
>
_______________________________________________
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.
_______________________________________________
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-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.