Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to: Override external format in RPGLE

594 views
Skip to first unread message

Hammie

unread,
Oct 22, 2010, 1:37:53 AM10/22/10
to
I have several source files with different names in one library.
All that files have the recordformat name = File name.
so: QRPGLESRC has format QRPGLESRC, QCLLESRC format QCLLESRC

Now I have a program that has to read all the members in all the
source files.
I compiled the program with: QRPGLESRC

In CLLE I do the override to: QRPGLESRC to MYLIB/SRCFILE member
*ALL.

In RPGLE source I have this filestatement:

Fqrpglesrc ip e DISK infds(fileds)
rename(qrpglesrc:rpgrec)

The problem now is that when I do an override to: QDDSSRC the
formatname is QDDSSRC
and that gives a conflict when I call the program.

The only solution I can think off is: recompile the program in CLLE
after the correct override is set.

Is there a better solution to override the external formatname?

thx
Jaap

highvalue.fr

unread,
Oct 22, 2010, 5:29:56 AM10/22/10
to

Hi,

You can try to create source file MYSRCF and rename it QRPGLESRC
you create now MYSRCF again and you rename it QCLSRC
etc.

All your files would have MYSRCF record name ?

best regards,

FF
http://www.i-cr.fr


Peter Zich

unread,
Oct 22, 2010, 5:58:29 AM10/22/10
to

"Hammie" <jaapvanh...@gmail.com> schrieb im Newsbeitrag
news:353a42fe-4da6-40e6...@t8g2000yqk.googlegroups.com...

Hi,

I think there is no way to do this, but a very simple work-around:

Make a copy of your rpgle-program with a new name, change the file and
record-format to qddssrc, and compile the new program.
From CLLE then call the new program in case of QDDSSRC ...

Good luck !
-- Peter


Peter H. Coffin

unread,
Oct 22, 2010, 8:25:03 AM10/22/10
to

It might be worth a try creating a logical file over the source file by
pretending that the source file is an ordinary physical file with three
fields in it.

--
Don't even get me started on the MCSEs I know. It's a miracle of
modern technology that some of these fsckwits still draw breath,
much less a paycheck.
-- Marc Bowden

Ian

unread,
Oct 23, 2010, 3:38:13 AM10/23/10
to

Must admit multiformatted logical was first thought, but no access to
check if feasible I'm afraid.

Ian

CRPence

unread,
Oct 23, 2010, 12:21:25 PM10/23/10
to
On 22-Oct-2010 04:29, highvalue.fr wrote:
>
> You can try to create source file MYSRCF and rename it QRPGLESRC
> you create now MYSRCF again and you rename it QCLSRC
> etc.
>
> All your files would have MYSRCF record name ?
>

FWiW there is no need to CRTSRCPF and then RNMOBJ to effect a
common record format [name]. Just create each source physical file
from the same DDS source; e.g. using CRTPF FILE(TheLib/TheSrcPF)
SRCFILE(SrcLib/DDSsrcPF) SRCMBR(MySrcPFDDS) FILETYPE(*SRC) MBR(*NONE).

A sample DDS source for a PF-SRC with RcdFmt name MYSRCF:

R MYSRCF
SRCSEQ 00006S02
SRCDAT 00006S00
SRCDTA 80A

Regards, Chuck

CRPence

unread,
Oct 23, 2010, 12:52:43 PM10/23/10
to
On 22-Oct-2010 00:37, Hammie wrote:
> I have several source files with different names in one library.
> All that files have the record format name = File name. so:

> QRPGLESRC has format QRPGLESRC, QCLLESRC format QCLLESRC
>
> Now I have a program that has to read all the members in all the
> source files. I compiled the program with: QRPGLESRC
>
> In CLLE I do the override to QRPGLESRC to MYLIB/SRCFILE member
> *ALL.
>
> In RPGLE source I have this file statement:
>
> Fqrpglesrc ip e DISK infds(fileds)
> rename(qrpglesrc:rpgrec)
>
> The problem now is that when I do an override to: QDDSSRC the
> format name is QDDSSRC and that gives a conflict when I call the

> program.
>
> The only solution I can think off is: recompile the program in
> CLLE after the correct override is set.
>
> Is there a better solution to override the external format name?
>

There is no function of common data management to override the
external format name, because the different name suggests a
different [possibly incompatible] format. The format name is part
of the hash that defines the format level identifier :-( If the
capability existed to perform as what was alluded to be desirable
[i.e. the program functions the same against each file irrespective
of format name], then the SRCDTA field would have to be the same for
all of the named TOFILE() on the OVRDBF request. As such, ignoring
the level checking establishes the assumption that all of the fields
are the same order and attributes [e.g. length, type, etc.]. Since
that seems to be the assumption for the described situation and
desired effect, why not just use LVLCHK(*NO) on the override to
database file request?

Regards, Chuck

daarn

unread,
Oct 24, 2010, 10:12:34 PM10/24/10
to
If you are using rpgIII or prior and cannot change to the lastest
version then good luck.. If you can use the modern tools provide by
rpgIV, free format, or ILE that it is a no brainer... Change from
input primary,(ip) to IF, user open

execute the override dababase file to point to the source file and
member 'ovrdbf libname/filename(member)' and then open the file.

highvalue.fr

unread,
Oct 25, 2010, 5:31:49 AM10/25/10
to

hi,

an other way..

you can use internal definition for QRPGLESRC file (only 3 fields..)

0 new messages