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



Sounds like a hell of a good idea. All of the variable length issues are all
handled automatically and you just build a string with VARYING length to
write. 

Doing just that today. Creating a download for users directly from the RPG
ILE

We just keep finding more and more ways to use the UNIX API's and by using a
service program to encapsulate the complexity, we don't even have to get
into how it works!

I love ILE RPG. 

-----Original Message-----
From: Scott Klement [mailto:infosys@klements.com]
Sent: Wednesday, January 05, 2000 4:51 PM
To: RPG400-L@midrange.com
Subject: Re: Dual Format


Hi Jim,

As luck would have it, I am beginning an almost identical project
to yours, this week!  We are working with our bank to create an
account reconciliation system, and likewise the file layout info
that they send us is also COBOL :)

The method that I had planned to use was to write our file in the
IFS rather than try to use a database-type file in the native
file system, but I haven't gotten that far, yet :)

Anyway, I was going to create data structures for the various
record types and put them in a member that I can /COPY into my
RPG programs, to create an "external definition" of sorts.

Then use the Unix-type APIs to write the file into another file
system (probably the "root" file system) This will make it easier
to transfer to a PC or Unix machine if we decide to use them for
file transfer, rather than doing it directly from the AS/400.
(Tho we can still do it from the AS/400 if we like)  And I can have
the system convert it to ASCII if that ever becomes an issue...

What do you think of that idea?



Jim Langston <jlangston@conexfreight.com> wrote:
>
> Our bank wants us to send them a file with all our check
> information.  Their file layout is a dual file layout, with a
> control record and a detail record (their program that
> reads this is obviously a COBOL program since they
> describe the length and such as PICTURE like 9(08)V99).
>
> I am trying to decide the best way to do this.  I was hoping
> to be able to get away with creating two files, one for the
> header and one for the detail, then just copy them to one
> file before I transmitted it, but now I see I am going to have
> to create many header records.
>
> I don't like the thought of back stepping and doing it S36 style
> with file described files either.  I was thinking about a multi-form
> logical, but there are not unique fields in the files to be able to
> key them on.
>
> I think I am going to have to open up the 2 files I created with DDS
> just for the record layouts, then do some type of overlay to get the
> record layout into the fixed length field of the un-DDSed file (the
>  one
> I will be writing too).
>
> Can anyone think of a better way?  If not, could someone give me
> an example of how to do what I am trying to do?  That is, over lay t
> 40 bytes of my DDS to another field.  The DDS is externally describe
> so is not in my program itself.  I am dealing with a small number of
> fields,
> 7 in each of the header and details.
>
> Regards,
>
> Jim Langston
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator:
david@midrange.com
+---
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-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.