× 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 always use the following:

     H BNDDIR('QC2LE':'XTOOLS') OPTION(*SRCSTMT:*NODEBUGIO)
      /IF DEFINED(*CRTBNDRPG)
     H DFTACTGRP(*NO) ACTGRP('MYCOMPANY')
     H/ENDIF
      /INCLUDE qcpysrc,copyright

This way the source compiles even if you use CRTBNDRPG or CRTRPGMOD.
Also, by /COPYing the COPYRIGHT member, you can change it in one place
should the company ever get sold.

Using DATFMT(*USA) is a typical mistake (my view) that people make when
moving to RPG IV. Eventually you will learn to always use DATFMT(*ISO) for
everything and then move it to an output field (PRTF or DSPF) that is in the
alternate format (such as *USA) as needed.  The format of date literals,
such as initial values MUST be in the DATFMT syntax, regardless of the
individual date field's DATFMT keyword. This is a big issue for most people.
For example:
  H  DATFMT(*USA)
  D  myDAte         S           D  DATFMT(*YMD) Inz(D'04/07/23')

You'll get a compiler error here, because the D'04/07/23' is not in *USA
format. Even though myDate is in *YMD format, its initial value (if
specified) must be in *USA format. 
I always recommend using DATFMT(*ISO) on the header spec (which is the
language default) and for date work fields unless you specifically need one
in a specific format. 
-Bob Cozzi



-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of rob@xxxxxxxxx
Sent: Tuesday, October 12, 2004 12:00 PM
To: RPG programming on the AS400 / iSeries
Subject: RE: Converting to ILE

Would putting in the following on each converted program be a good idea?
      /COPY ROUTINES/QRPGLESRC,HSPEC
Then you would be able to modify the member HSPEC to put anything in there 
that you later find is a good idea.  Possibilities include:
     H Bnddir('ROUTINES/SRVPGM':'QC2LE')
     H ActGrp(*CALLER)
     H DftActGrp(*NO)
     H Datfmt(*USA)
     H Copyright('(C) Copyright Group Dekko Services, LLC')
     H ExprOpts(*RESDECPOS)
     H* EXTBININT will change (B)inary to (I)nteger.
     H EXTBININT(*YES)
Some of these will change based on whether you are doing a service program 
versus a standard program.  Some of these will change if you want to set 
up different activation groups.  But, in general, beats the snot out of 
having to remember options on the compile command.  We break ours down 
because of the service program vs standard program thingy.

HSPEC contains
      /DEFINE HSpec
      /COPY ROUTINES/QRPGLESRC,HSPEC2
      /COPY ROUTINES/QRPGLESRC,HSPEC1
      /UNDEFINE HSpec
HSPEC1 contains
      /DEFINE HSpec
     H Bnddir('ROUTINES/SRVPGM':'QC2LE')
     H ActGrp(*CALLER)
     H DftActGrp(*NO)
      /UNDEFINE HSpec
HSPEC2 contains
     H Datfmt(*USA)
     H Copyright('(C) Copyright Group Dekko Services, LLC')
     H ExprOpts(*RESDECPOS)
     H* EXTBININT will change (B)inary to (I)nteger.
     H EXTBININT(*YES)

Rob Berendt
-- 
Group Dekko Services, LLC
Dept 01.073
PO Box 2000
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com

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

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.