Software development, photography, jokes, ....

Sites by me

tas-logoTransportation Administration System
snoezelkussen-logo-kleinstSnoezelen Pillows for Dementia
ikzoekeenbegeleider-logoBegeleiders voor gehandicapten
Laat uw hond het jaarlijkse vuurwerk overwinnen
Betuweroute en Kunst
logo 50x50Hey Vos! Je eigen emailadres?
Kunst in huis? Nicole Karrèr maakt echt bijzonder mooie dingen
nettylogo2Kunst in huis? Netty Franssen maakt ook bijzonder mooie dingen
Professionele opvang bij Gastouderbureau
Salarisadministratie en belastingadvies bij
De Zaak Loont
Zutphense Bomenstichting

Hosting Favorites

ANU Internet Services
XelMedia .internet services


Google Translate
jQuery UI
YourHead Stacks API
Favicon Generator. For real.
Check HTTPS problems

Marc's Place


E$EXP - Expand and Compile Source Member

e$exp [F4]

Call Parameters

srcmbr (a10)
Source file member name to expand.
srcfil (a10/a10)
Source file name and Library name where member srcmbr can be found.
comp (a4)
Value: *YES [default]
Prompt for compilation when source member is expanded.
Value: *NO
Do not prompt for compilation.
objlib (a10) [only with COMP(*YES)]
Library where the compiled object should be placed.
Value: ' ' [default]
The default value is a single space. You can permanently change this value to something else with the CHGCMDDFT command. Better still, create an option in PDM instead of changing this parameter.

Return Parameters


What it does

The processing program reads the source file and searches for /COPY or $COPY keywords. When found, the program creates a copy the source file in a new source file. This source file is named as follows:

'E$XP' + <source member type>

and is created in the library you So the source file for expanded sources would be:

'E$XPRPG'      Source file for expanded RPG sources
'E$XPPF'       Source file for expanded PF sources
'E$XPQRYDFN'   Source file for expanded QRYDFN sources

If you need to recompile programs, do not forget to use the expanded source instead of the original! You can also ALWAYS use E$EXP to recompile programs.

To include source lines, specify the $COPY keyword in a comment line ith the following syntax:

$COPY <library>/<source file>,<member>

You can put $COPY anywhere in the comment line. So, here are some examples of how to specify the $COPY statement in the major source types:

  • In RPG
    /COPY <library>/<source file>,<member> or
    *  $COPY <library>/<source file>,<member>
  • In CLP
    /*  $COPY <library>/<source file>,<member>   */
  • In DDS
    A*  $COPY <library>/<source file>,<member>

Special Options

RPG Source Members
For RPG source members E$EXP acts as CRTRPTPGM. That means you can code all the RPG Specifications you need (F-specs, E-specs, I-specs, etc.) in one source member and include that member in your RPG program using $COPY.
E$EXP takes care of the correct placement of these RPG Specifications in the expanded source member.
DSPF Source Members
If you code $COPY by hand, make sure you code it directly above an existing record format specification. Otherwise you will lose your comment line when you use SDA to edit the display file. Placing the $COPY keyword above a record format specification is like using option 2 in SDA: Edit Record Format Comments.
With SDA, use option 2 to edit a comment line and insert the $COPY statement.


Here's a member which has standard coding for a SFLMSG in DSPF sources in QDSPSRC:

This member is then included in all Display Files like this:

And here is the expanded result:

Go to download page
© 1997- Marc Vos (and others) Contact Me