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


  • Subject: RE: Move an entire record format as a whole
  • From: Ragnar Torfi Geirsson <Rato@xxxxxxx>
  • Date: Wed, 7 Jul 1999 21:29:24 -0000

For instance with External Data Structures      

Create an EDS refering to the file name.
Create a field long enaugh for the whole record format (I usually do this
with data structure)
After file input move the EDS to the save field.

In reference to prior LOCK record discussion I have seen this used in
on-line update programs.

1. Chain to record without lock.
2. Move EDS to SVFLD1
3. Allow user change on display
4. Move EDS  (changed) to SVFLD2 
5. Chain to record with lock and compare EDS to SVFLD1.
6. If EDS and SVFLD1 match then SVFLD2 is moved into EDS before update.
7. If not, alert user and allow him to repeat process from 1 or quit.


An example in RPG/400:

 *external structure STRUCT for FILE1
ISTRUCT    E DS FILE1                           

 *Save field 1 defined as a structure without subfields 1000 long
ISVFLD1        DS                        1000

 *Save field 2 defined as a structure without subfields 1000 long
ISVFLD2        DS                         1000


C          KEY      CHAIN   FILE1                      N01
C                       MOVEL STRUCT  SVFLD1
C                       EXFMT  DISPLY
C                       MOVEL STRUCT  SVFLD2
C          KEY      CHAIN   FILE1                       01
 
C          SVFLD1 IFNE     STRUCT
C                       UNLCK  FILE1
C                       EXSR    ERROR
C                       ELSE
C                       MOVEL SVFLD2   STRUCT
C                       UPDAT  FILE1R
C                       ENDIF

 



> -----Original Message-----
> From: Brian Stapleton [SMTP:brianstapleton@yahoo.com]
> Sent: 7. júlí 1999 20:30
> To:   RPG List" Midrange
> Subject:      Move an entire record format as a whole 
> 
> Greetings;
> 
> Does anyone know if it is possible to move an entire record format to a
> holding field, or DS so that I can move my file pointer (another chain)
> but still access the old data?
> 
> Sware that I have done this before, but I seem to having an Amnesia
> attach.
> 
> 
> 
> ===
> Brian Stapleton
> BrianStapleton@yahoo.com
> 
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
> 
> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
> * This is the RPG/400 Discussion Mailing List!  To submit a new         *
> * message, send your mail to "RPG400-L@midrange.com".  To unsubscribe   *
> * from this list send email to MAJORDOMO@midrange.com and specify       *
> * 'unsubscribe RPG400-L' in the body of your message.  Questions should *
> * be directed to the list owner / operator: david@midrange.com          *
> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This is the RPG/400 Discussion Mailing List!  To submit a new         *
* message, send your mail to "RPG400-L@midrange.com".  To unsubscribe   *
* from this list send email to MAJORDOMO@midrange.com and specify       *
* 'unsubscribe RPG400-L' in the body of your message.  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.