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



I do this on the prototypes (not in the program):


/IF NOT DEFINED (Arvdates_DaysDiffCYMDN7_DONT_COPY)

/DEFINE Arvdates_DaysDiffCYMDN7_DONT_COPY


/////////////////////////////////////////////////////////////////////////

// Procedure: DaysDiffCYMD //

// Description: Calculates the number of days between //

// Startdate7 and Enddate7. Returns days as 7P0. //


/////////////////////////////////////////////////////////////////////////

DArvdates_...

D Daysdiffcymdn7 PR 7P 0

D Startdate7 7P 0 Const

D Enddate7 7P 0 Const

/ENDIF



On 8/1/07, Robert Munday <rwmunday@xxxxxxxxxxxxx> wrote:

I have taken over development of some programs which were designed to use
copybook members to define a data structure and allow me to segment a flat
file into fields to be written to a database file. I have a multi-member
copybook with the following:

/If Defined(Include_dsFileFormat)
D dsFileFormat DS 300

D field names go here

/EndIf

There are a smattering of program examples which include code such as:

/If Not Defined(Prototype)
H NoMain Option(*NoDebugIo:*SrcStmt)
/EndIf

/Include COPYBOOK

/If Defined(Prototype)
/EOF
/EndIf


The author is not available to me at the moment and other programmers in
the area have not seen this type of process. If I remove the /If Defined()
statements from the copybook, the program compiles properly, but if I leave
them in, I get a compile listing showing that each of the member elements
was excluded.

What would be the proper method of coding my RPG main program so that the
copybook would pull in only the element described?


Robert Munday
Munday Software Consultants
Montgomery, AL
on assignment in Nashville, TN


--
This is the RPG programming on the AS400 / 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 ...

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.