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



Oooh, thanks.  Not the answer I was looking for, but that is the answer I
wanted to hear :)

Now I can make source UsrOpen and open my DSPFDCMNT file as IF and do an
OVRDBF inside the RPG program...  I like it!

Regards,

Jim Langston

-----Original Message-----
From: Buck Calabro [mailto:Buck.Calabro@commsoft.net]
Sent: Friday, March 22, 2002 1:16 PM
To: rpg400-l@midrange.com
Subject: RE: Variable length record in different files


Jim Langston wrote:

>Some of these files have record lengths
>of 92, some 112, etc..  I'm 99% sure
>that if I just specified the longest
>record length of 112 and internally
>described the file it wouldn't not work
>the way I wanted to at all.

It would work just the way you want it to.  Declare a large record length,
program describe the input and  off you go.  I would use the INFDS to get
the *actual* record length and do a substring of it like so:

     h dftactgrp(*no) actgrp('QILE')
     h option(*srcstmt: *nodebugio) debug
      * dbgview(*list)

     fsource    ip   f  512        disk    infds(sourceDS)

     dsourceDS         ds
     d rcdLen                125    126I 0
     d mbrName               129    138
     d fileType              147    148I 0

     isource    aa  01
     i                                  1    6 0srcSeq
     i                                  7   12 0srcDate
     i                                 13  512  srcData
  --buck
ps - you can use OVRDBF file mbr(*ALL) to process all the members in a
single source file in one pass.
_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
or email: RPG400-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.


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.