|
This is a multipart message in MIME format. -- [ Picked text/plain from multipart/alternative ] OVRDBF is a valid option. However, with V5R1, you can put the following keyword on your F spec: EXTMBR(membername) The EXTMBR keyword specifies which member of the file is opened. You can specify a member name, '*ALL', or '*FIRST'. Note that '*ALL' and '*FIRST' must be specified in quotes, since they are member "names", not RPG special words. The value can be a literal or a variable. The default is '*FIRST'. The name must be in the correct case. For example, if you specify EXTMBR(mbrname) and variable mbrname has the value 'mbr1', the member will not be found. Instead, it should have the value 'MBR1'. If a variable name is used, it must be set before the file is opened. For files that are opened automatically during the initialization part of the cycle, the variable must be set in one of the following ways: Using the INZ keyword on the D specification Passing the value in as an entry parameter Using a program-global variable that is set by another module. This way you can avoid having a CL program. Rob Berendt -- "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." Benjamin Franklin "Karl Brookover" <karl.brookover@ormet.com> Sent by: rpg400-l-admin@midrange.com 07/24/2002 12:34 PM Please respond to rpg400-l To: <rpg400-l@midrange.com> cc: Fax to: Subject: RPG/IV writing to a table with multiple members This is a multi-part message in MIME format. -- [ Picked text/plain from multipart/alternative ] I am trying to write, using an interactive program, to a table which contains multiple members. I understand that the 'WRITE' opcode allows you to specify the member name you need to write. My problem is that I can not determine the member name until the program is being executed. The table is named INC950U with four members, INC950U, INC95001, INC95011 and INC95013. The rightmost characters represent the company number which is derived through the *LDA. When using batch processing, I can use the OVRDBF command to access the member needed. Any suggestions / help is appreciated.Thanks in advance for your consideration. -- _______________________________________________ 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 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.