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



> In a message dated 00-01-05 18:24:06 EST, you write:
> 
>> 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 the
>>  40 bytes of my DDS to another field.  The DDS is externally described,
> >>  so is not in my program itself.  I am dealing with a small number of
>>  fields,
>>  7 in each of the header and details.
>
>If this is rpg4, you can define data structures using the external file 
>descriptions, populate the data structure subfields in the program, move
the 
>whole structure to a long enough character field and write that out to the 
>banks file.  For our ACH files, I create a file with a single 90 char field

>and contcatinate the data into it.  HTH, Lance

You can do the same thing in RPG/400.  Here's an antique sample of S/38
code:

     FCADTELF O   F     900            DISK
      *                                                            
      * Connect customer record                                    
      * Force length to match file recl to avoid compile time error
      *                                                            
     ICONCC     EIDSCADTCCFDS                   900                
      *                                                            
      * Transaction header record                                  
      * Force length to match file recl to avoid compile time error
      *                                                            
     IHDR       EIDSCADHD#FDS                   900                
      *                                                            
      * Load output DB fields from input and write out DS
      * This emulates DDS for a flat file
      * Header                                  
     C                     MOVEL'HEADER'  CHTYPE
     C                     Z-ADDCYMD      CHCYMD
     C                     Z-ADD1         CHCNT 
     C                     MOVELM,1       CHDESC
     C                     WRITECADTELF   HDR   
      * Detail                                  
     C                     MOVELM,1       CDESC 
     C                     WRITECADTELF   CONCC 

Buck Calabro
Aptis; Albany, NY
+---
| 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.