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




> Assume two record format A and B with RTNDTA.  EXFMT A and then EXFMT
>B.  Now after this can you do READ A.  This thing gives me a session
>error.  I know after EXFMT A, you can READ umpteen times with RTNDTA.
>Remember I am not trying to READ B, but trying to READ A.  I suspect the
>buffer is cleared before displaying B.

>Dave Mahadevan.. mailto:mahadevan@fuse.net 


Dave
It's like with a data base file.   When you read a data base file,  OS/400
move the fields from your 
ODP buffer field by field into your RPG buffer.     RTNDTA is like being
able to do that step over again.

If you read a record,  then read another one,  And then  If you refilled
your RPG buffer from the ODP buffer,  guess which record you would get?? 
The last one you read.

If you have a display file and Read a record(EXFMT FormatA) then read
another record from that
display file (EXFMT FormatB),   (ala  RTNDTA)  which format's information
would be in the buffer??
FormatB.    It's just that the system gives you an error when it sees you
making that type of mistake. 

RTNDTA is great.      I have myself, and have watched others debugging
programs where the 
programmer did the "Move to Display Fields" thing and had to move 50 fields
or so.  Or devised 
numerous Data Structures that contained the screen fields to be used to
clear, or reset those DB
fields.     Many errors have resulted in forgetting a move,  (one way or
another),  or moving the 
wrong field name to another one, or etc.   I seen many where the display
file had a field on it, and 
the programmer forgot to do the move from the data base file at all.   

 I understand the perspective of "Separation"  of data, however I still
subscribe to using the Data Base Entity's Column name every where I can.  
Less defining of variables,  less moves, intitializations,  moving back, 
editing one field, updating another,  etc.   Soon we will finially get the
ability to 
define a Externally Defined Data Structure and have the fields initialized
to the DDS DFT value.

This means that you can have an Externally defined D/S of the file you will
be maintaining and 
have the "Record Format"  for all intents and purposes be initialized to
default values,   
After updating a record you can do a RESET to the D/S and have the fields
back to DFT values.
Ready to display the display file(With same field names as DB File)  all
ready to add a new record.


John Carr
EdgeTech
Have Classes,  Will Travel
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-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.