I'm a rookie in RPG and I really need to know how can we use a file name as
a variable. I mean, in a loop or subroutine. I want to work with several
physical file and be able to move their name in a variable. (Something like
%% in DOS).
Thanks !
Jeff
regards
guido
Jean-Francois Drapeau schrieb in Nachricht
<01bceb1a$15fcd720$2167fdcf@default>...
bader luck for you, it IS (!!!) possible to overwrite files in a rpg pgm,
because the OVRDBF will be done with QCMDEXC and AFTER this you open the
file with OPEN filename. I have done this in n+ pgms.
Gretings
Helmut Salzer
Webmaster
Lauda's CARFOX
webm...@laudas-carfox.co.at
http://www.laudas-carfox.co.at/carfox/
Privat: http://members.eunet.at/salzer.h/as400.htm
Nobody schrieb in Nachricht <34630...@news1.ibm.net>...
You will need to specify that the file is to be a user controlled open
on the F spec. Then before opening the file, you will need to execute
a OVRDBF using a call to QCMDEXEC.
----------
Bryan Hipp
D.P. Requisite, Inc.
Tulsa, OK
dp...@ibm.net
2) use the QCMDEXC pgm, which can be called within the RPG-pgm.
The QCMDEXC can perform the Overwrite. You should define the file 'UC' (user
controlled open) and perform the OPEN of the file after the QCMDEXC-call.
Further details can be found in the CL-manuals.
Jean-Francois Drapeau heeft geschreven in bericht
<01bceb1a$15fcd720$2167fdcf@default>...
Define the file in the F spec with USROPN
f.e. FFILE1 E DISK USROPN
Then make an OVRDBF (QCMDEXC) with the filename you get as parm in your pgm
and open the file with the OPEN statement. When you want to work with
another file: Close the fiel with CLOSE and remove the override with DLTOVR
and begin with the first step above.
Greetings
Helmut Salzer
Webmaster
Lauda's CARFOX
webm...@laudas-carfox.co.at
http://www.laudas-carfox.co.at/carfox/
Privat: http://members.eunet.at/salzer.h/as400.htm
Jean-Francois Drapeau schrieb in Nachricht
----If you have SQL, why not try not using F-Specs at all, and
create a variable where you could SUBSTRING-in the
FILE NAME variable, and use an SQL DYNAMIC SELECT
statement???
...paul j. sgroi
But the wooden ships, were just a hippie dream
Cap-sized in excess, if you know what I mean...Neil Young
God Luck.
Jean-Francois Drapeau <jef...@videotron.ca> schreef in artikel
ETAPES informatique
F 77470 TRILPORT