× 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.




On Wed, 10 Dec 2003, Tom Daly wrote:
> one to a file.  It seems to me that back in S/36 days there was a way to do
> this.  I'm kind of hazy about it but I think it went something like this:
[SNIP]

I'm thinking that you mean something like this?

     // LOAD $MAINT
     // RUN
     // COPY FROM-READER,LIBRARY-P,NAME-PROC1,TO-MYLIB,RETAIN-R
     data for record one
     data for record two
     data for record three
     // CEND
     // END

And you want to do something similar with an RPG program?   I suppose you
could do something like this:

             CMD        PROMPT('Write a source record')
             PARM       KWD(SRCDTA) TYPE(*CHAR) LEN(100) MIN(1) +
                          PROMPT('Source Record') CASE(*MIXED)

    FMYFILE    O    F  112        DISK
    D peSrcDta        s            100A
    c     *entry        plist
    c                   parm                    peSrcDta
    c                   except
    c                   return
    OMYFILE    E
    O                                           12 '000000000000'
    O                       peSrcDta           112

then you could run it as:

     ADDPFM FILE(MYLIB/MYFILE) MBR(MYMBR) SRCTYP(WHATEVER)
     OVRDBF FILE(MYFILE) TOFILE(MYLIB/MYFILE) MBR(MYMBR)
     WRITESRC SRCDTA('Data for line one')
     WRITESRC SRCDTA('Data for line two')
     WRITESRC SRCDTA('Data for line three')
     DLTOVR FILE(MYFILE)

> With the result that your file then contained those records.  I only need to
> enter a half dozen records or so and I don't want to use DFU or EDTF.  Is
> there a similar function on the 400?  Any ideas on some other method?  Then
> again maybe my memory is but a dream and you could never do this!

The only reason I'm giving you an RPG solution is because this is the RPG
list.

QShell, for example, would be able to do this quite easily.  Another way
would be to simply use $MAINT from the S/36 environment.   But, I'm not
going to discuss those here.  This is the RPG list, so you get an RPG
solution.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.