Skip to Content mrc logo mrc logo
  • What is m-Power?
    Overview Demos Build Process Case Studies Specs Pricing Trial
    m-Power Resources
    Overview How-To Videos Webinars & Podcasts White Papers Fact Sheets
  • What does m-Power build?
    Solutions by Industry
    Overview Database Front-Ends AI Reporting CRM Systems Business Intelligence Dashboards Inventory Management Mobile Apps ERP Enhancements Modernization
    Spreadsheets to the Web MS Access to the Web B2B/Web Portals Scheduling Embedded Analytics Web Forms Workflow Data Exploration Budgeting & Forecasting APIs & Web Services Db2 Web Query Alternative
    Solutions by Industry
    Overview Manufacturing Government Foodservice Software Vendors Logistics & Supply Chain Software Consultants Healthcare
  • Development Services Training Mentoring
  • Overview Partners Press Releases Careers Events Contact Blog
  • Support Home FAQ Documentation Customer Portal Enhancements Updates Roadmap Techblog
Try m-Power

m-Power Manual

Browse:

  • Home
  • Form Validation
  • Validating via an RPG External Object Source Code
Back to Manual

 

Validating via an RPG External Object Source Code

 

5761WDS V7R1M0  100416       SEU SOURCE LISTING
SOURCE FILE . . . . . . .  MRCWORKLIB/QRPGLESRC
MEMBER  . . . . . . . . .  VALIDDATES
SEQNBR*...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7
1       *Author Rick Hurckes
2       *Date: 2011-09-19
10      *This example is designed to illustrate how to call external objects
11      *at the *FLDVALID    09/19/11
20      *location of m-Power applications.
21      *This example will verify that an end user has entered a beginning
22      *and end date and that 09/19/11
29      *the beginning date occurs prior to the end date.
30     C     *entry        plist
100    C                   parm                    @error           99
200    C                   parm                    @startdate        8 0
300    C                   parm                    @enddate          8 0
400    C
500    C                   eval      @error = *blanks
600    C                   if        @startdate = 0 and @enddate = 0
700    C                   eval      @error = 'Please enter some dates.'
800    C                   GOTO      END
801    C                   endif
900    C
902    C                   if        @startdate = 0
903    C                   eval      @error = 'You must enter a start date.'
904    C                   GOTO      END
905    C                   endif
1000   C
1001   C                   if        @enddate = 0
1002   C                   eval      @error = 'You must enter an end date.'
1003   C                   GOTO      END
1005   C                   endif
1100   C
1101   C                   if        @startdate > @enddate
1102   C                   eval      @error = 'Start date is after end date.'
1103   C                   GOTO      END
1104   C                   endif
2500   C
2501   C     END           TAG
2600   C                   eval      *inlr =*on
* * * *  E N D  O F  S O U R C E  * * * *

 

Created: May 27, 2008 | Modified: December 22, 2011

Search


Browse By Category

Build Process (13)
Starting with m-Power (8)
Retrievals (10)
Reports (15)
Summaries (4)
Maintainers (17)
Graphs (8)
m-Power Data Explorer (4)
General (24)
Calculations (5)
Utilities (9)
m-Power Administration (23)
Security (11)
Freemarker (6)
m-Painter (29)
Form Validation (5)
External Objects & UDFs (12)
Deprecated Documentation (23)
Bootstrap Templates (7)

Popular Tags

Dates Advanced External Objects SQL Report Email Bootstrap Templates Production RPG Summaries Data Dictionary Application Properties Java Calculations Getting Started Security Excel Freemarker Prompt Screens mrc-Productivity Series Video Dropdowns Record Selections Graph Properties Graphs Retrievals Administration Retrieval Form Validation Bar Graphs Admin Maintainer DB2 Database Parameters Reports Popular Build Process Maintainers Performance Compiling Graphing Tomcat App Properties m-Painter

See all tags »

mrc

Build the custom apps and AI tools your business needs with m-Power, or have our Chicago-based team build them with you. One platform, one team that makes sure you succeed.

Since 1981 · 1,500+ customers · 4.7/5 on G2

m-Power
Overview Demos Build Process Licensing Specs Get a Demo
Solutions
Database Front-Ends Reporting AI Tools Dashboards ERP Enhancements Modernization See all solutions
Company
Case Studies Services About Blog Careers Contact Support

Privacy Policy Cookie Policy Cookie Settings

michaels, ross & cole, ltd. (mrc)
US: 2001 Midwest Road, Suite 310, Oak Brook, IL 60523 · 630-916-0662
UK: Mortlake Business Centre, 20 Mortlake High Street, London, SW14 8JN · +44-20-335-59566
© mrc. All rights reserved.