• Subject: RE: file Has same field names
  • From: "Torres, Wanda" <WTorres@xxxxxxxxxxxx>
  • Date: Wed, 10 Feb 1999 20:40:46 -0500


Thanks Brian, Wayne & Jon,

I converted to RPG IV and program works  like a charm. 

Wanda
> -----Original Message-----
> From: WCORK@groendyke.com [SMTP:WCORK@groendyke.com]
> Sent: Wednesday, February 10, 1999 5:57 PM
> To:   MIDRANGE-L@midrange.com
> Subject:      RE: file Has same field names
> 
> Wanda,
> 
> There is a way to do this in RPGIV.  From the code below I would assume
> that
> you are not using RPGIV.  If you have access to RPGIV you can do the
> following:
> 
> On your F Spec use the keyword PREFIX(???)
> The prefix keyword will place what every you define as your prefix in
> front
> of all the fields from that file
> 
> FFILE UF   E           K DISK    PREFIX(PRO) RENAME(BAREC:PROBAREC) 
> 
> D INPUT            E  DS                  EXTNAME("File Name")      
>                                                                         
> D OUTPUT        E  DS                  EXTNAME(FILE) PREFIX(PRO) 
> 
> 
> Then all you have to do is move the "INPUT"  to the "OUTPUT"       
> 
> Wayne
>                                                                       
> 
> 
> > -----Original Message-----
> > From:       Torres, Wanda [SMTP:WTorres@dresdner.com]
> > Sent:       Wednesday, February 10, 1999 3:19 PM
> > To: 'Midrange-L@midrange.com'
> > Subject:    file Has same field names
> > 
> > Hi Everyone:
> > 
> > I have to fix a program the never updated its data because the field
> names
> > in both files were the same. Ok, you say no big deal,  save fields, read
> > file , move fields back update file. There are 256 fields in the file. I
> > do
> > not wants to have all those moves.  Is there a way I can have one move
> > without internally  describing the file?  The original code is below:
> (Not
> > written by me) . I will appreciate any suggestions.  I am brian dead
> today
> > after fixing many bugs in different systems.
> > 
> > Thanks,
> > 
> > Wanda 
> > 
> > FMT FX
> > .....FFilenameIPEAF........L..I........Device+......KExit++Entry+A....U
> > 0019.00      FBECFILEPIF  E           K        DISK
> > 
> > 0020.00      F            BECRECP                           KRENAMEINPUT
> > 
> > 0021.00      FBECFIL00IF  E           K        DISK
> A
> > 
> > 0022.00      F            BECRECP
> KRENAMEOUTPUT
> > 
> > 0023.00       *
> > 
> > 0024.00      C           BECKEY    KLIST
> > 
> > 0025.00      C                     KFLD           BKMKT
> > 
> > 0026.00      C                     KFLD           BKTIN
> > 
> > 0027.00      C                     KFLD           BKICC
> > 
> > 0028.00      C                     KFLD           BKIC2
> > 
> > 0029.00      C                     KFLD           BKIC3
> > 
> > 0030.00      C                     KFLD           BKMDT
> > 
> > 0031.00      C                     KFLD           BKCSP
> > 
> > 0032.00      C                     KFLD           BKSFX
> > 
> > 0033.00       *
> > 
> > 0035.00      C           *IN99     DOUEQ'1'
> > 
> > 0036.00      C                     READ INPUT                    99
> > 
> > 0037.00      C           *IN99     IFEQ '0'
> > 
> > 0038.00       *
> > 
> > 0039.00      C           BECKEY    CHAINOUTPUT               97
> > 
> > 0040.00      C           *IN97     IFEQ '0'
> > 
> > 0041.00      C                     UPDATOUTPUT
> > 
> > 0042.00      C                     ELSE
> > 
> > 0043.00      C                     WRITEOUTPUT
> > 
> > 0044.00      C                     ENDIF
> > 
> > 0045.00      C                     ENDIF
> > 
> > 0046.00      C                     ENDDO
> > 
> > 0047.00       *
> > 
> > 0048.00      C                     MOVE '1'       *INLR
> > 
> > 0049.00       *
> > 
> >         ****************** End of data
> > ****************************************
> > +---
> > | This is the Midrange System Mailing List!
> > | To submit a new message, send your mail to MIDRANGE-L@midrange.com.
> > | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
> > | To unsubscribe from this list send email to
> > MIDRANGE-L-UNSUB@midrange.com.
> > | Questions should be directed to the list owner/operator:
> > david@midrange.com
> > +---
> +---
> | This is the Midrange System Mailing List!
> | To submit a new message, send your mail to MIDRANGE-L@midrange.com.
> | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
> | To unsubscribe from this list send email to
> MIDRANGE-L-UNSUB@midrange.com.
> | Questions should be directed to the list owner/operator:
> david@midrange.com
> +---
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.