× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



What do you mean by 'easiest way to internally define a file'.
Anyone who has coded RPGII knows how to do the following.
Please I do not need comments on archaic code or why whould
I do it like that when with the modern RPG we can do it so
much better.  This is simply an example of OLD OBSOLETE CODE.
It is easy to forget that someone new to RPG has not been
exposed to internally described files, and very occasionally
they have a use.

HTH

Frank Kolmann

FORECAST is a file that is being fixed.
In another lib is a restored version of FORECAST.
FIXFORCA is a LGL on the restored version.

Overrides are used to redirect the program file names to
the real files.
eg  OVRDBF  FORECAST   lib/FCFCP100
    OVRDBF  FIXFORCA   lib/FCFCL101


*************** Beginning of data **************************************
 *
FFORECAST  UP   F 2418        DISK
 *
FFIXFORCA  IF   F 2418    15AIDISK    KEYLOC(2)
 *
FQSYSPRT   O    F  132        PRINTER OFLIND(*INOF)
 *
D                SDS
D  PROGM                  1     10
 *
IFORECAST  NS  01
I                                  1    1  RCD
I                                  2   16  PROD
I                                 17   18  FRAN
I                                 19   20  MAJOR
I                                 21   22  PRDLN
I                                 23   24  MINPRG
I                               2386 2388  SBFRN
I                               2389 2391  CATEG
I                               2392 2394  SBCAT
I                               2395 2397  BRAND
I                               2398 2400  SBBRN
I                               2401 2403  PRLIN
I                               2404 2418  PRODC
I*
 *
IFIXFORCA  NS  02
I                                  1    1  RCD04
 *
 *
 *
C                   SETOFF                                       1019
C     PROD          CABEQ     '99999'       ENDPGM                   19
 *
C     PROD          CHAIN     FIXFORCA                           90
C   90              GOTO      ENDPGM
 *
C     RCD           IFNE      RCD04
C                   MOVE      RCD04         XXRCD             1
C                   SETON                                        10
C                   EXCEPT    FIX
C                   END
 *
 *
 *
C     ENDPGM        TAG
 *
OQSYSPRT   H    1P                       02
O         OR    OF
O                       PROGM
O                                           76 'RECORD CD FIX  SF2012'
O                       UDATE         Y     90
O                                          125 'PAGE'
O                       PAGE          Z    132
 *
O          EF           FIX         2
O                       PROD
O                       RCD               +  1
 *
O          EF           FIX         2
O                       RCD04             + 16
 *
OFORECAST  D    01 10
O                       XXRCD                1





>Behalf Of Frank W. Kany IV
>============================================
>When you open the file in your program open it like this:
>
>FARFILE    UF   F  222        DISK
>
>D FileNM_DS     E DS                  ExtName(ARFileNM)
>D                                     Based(FileNM_DS@)
>D                                     Prefix(NM_)
>D FileNM_DS@      S               *
>
>IARFile    NS
>I                                  1  222  ARBuffer
>
>C     *InzSR        BegSR
>C
>C                   Eval      FileNM_DS@ = %Addr(ARBuffer)
>C
>C                   EndSr
>
>
>Where:
>ARFILE = Your existing file with data
>ARFileNM = Your new empty file with correct DDS
>===============================================
>
>Is the above code the easiest way to internally define a file.  If so what
>would the READ or SETLL operation look like.
>
>TIA,
>
>Frank




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.