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



ExtDesc is only used at compile time, not at run time. ExtFile is used at Run Time.
Have you tried writing to the File name instead of the Format name?

Kurt Anderson
Sr. Programmer/Analyst - Application Development, Service Delivery Platform

-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of James H. H. Lampert
Sent: Monday, June 16, 2014 4:32 PM
To: RPG programming on the IBM i / System i
Subject: Weirdness with EXTDESC, EXTFILE, EXTMBR, and a CPF5152

I have a situation that's producing CPF5152s (but NOT consistently) when preparing a source member to pass to the EMLMSG command in Giovanni Perotti's MimeMail (MMAIL).

Here's a simplified source:
FMIMEBODY O E DISK USROPN EXTDESC('MERCURY/QCLSRC')
F EXTFILE('QTEMP/MIMEBODY')
F EXTMBR('DFT')
D CRTMIMEBODY S 32A INZ('CRTSRCPF QTEMP/MIMEBODY +
D MBR(DFT)')
C CALL 'QCMDEXC'
C PARM CRTMIMEBODY
C PARM 32 CMDLEN 15 5
C OPEN MIMEBODY
C EVAL SRCDTA = 'Scheduled Activity Information'
C WRITE QCLSRC
C SETON LR

It seems that in the real program, a WRITE QCLSRC will, for no apparent reason, and after several successful WRITE QCLSRC statements were already executed (otherwise it wouldn't have gotten that far), it will throw a CPF5152.

Message . . . . : Record format QCLSRC not in member DFT.
Cause . . . . . : The record format name, QCLSRC, that was specified on the
get interface is not in member DFT file MIMEBODY in library QTEMP.
Recovery . . . : Specify the name of a record format that is used by member
DFT and try your request again.

And it does NOT do it consistently. Most of the time, it works just
fine: it builds the message in a source member, passes it to MMAIL/EMLMSG, and sends off the email.

Clearly, the record format name to use on the WRITE statement is the one from the file named on the EXTDESC; were I to use the actual format name, it wouldn't compile (probably in part because for some reason, IBM decided that source PFs would have the same name for both filename and record format name).

Anybody have any ideas what could be happening?

--
JHHL
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
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 thread ...

Follow-Ups:
Replies:

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.