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



Hello Pro's,

I have coded an SQLRPGLE program which takes a parameter and creates a
report. I want this parameter to be supplied using a Display File. Is this
possible? I am still learning RPG so this might be an extremely easy
question so please be gentle. Here is my program.

=============================================================================================

     H ActGrp(*CALLER)
     H DftActGrp(*NO)

     Fqsysprt   o    f  132        printer

     D whchoice        PR                  EXTPGM('WMSPRNT_06')
     D  warehouse                     2

     D whchoice        PI
     D  warehouse                     2



     d myDS            ds
     D   wrhouse                      2a
     D   icwmsn                       6a
     D   icwmbl                      14a
     D   icwmbt                       5a
     D   icwmas                       5a
     D   icwmdb                       1a
     D   icwmal                       1a
     D   icwmps                       9s 0
     D   icwmbs                       1a



     C/EXEC SQL
     C+ Set Option
     C+     Naming    = *Sys,
     C+     Commit    = *None,
     C+     UsrPrf    = *User,
     C+     DynUsrPrf = *User,
     C+     Datfmt    = *iso,
     C+     CloSqlCsr = *EndMod,
     C+     Commit    = *NONE
     C/END-EXEC


     C/exec sql
     C+ declare mainCursor Cursor
     C+   for
     C+ select icwmwh, icwmsn, icwmbl, icwmbt,
     C+ icwmas, icwmdb, icwmal, icwmps, icwmbs
     C+   from mylib/icwmap where icwmwh =:warehouse
     C/end-exec
     C/exec sql
     C+ open mainCursor
     C/end-exec
     C/exec sql
     C+ fetch next
     C+  from mainCursor
     C+  into :myDS
     C/end-exec

      /FREE
         except heading;
       dow SQLSTT = '00000';
         except detail;
      /END-FREE
     C/exec sql
     C+ fetch next
     C+  from mainCursor
     C+  into :myDS
     C/end-exec
      /FREE
       enddo;

       *inlr = *on;
      /END-FREE


     Oqsysprt   e            heading     1
     O                                        +   1 'WH'
     O                                        +   1 'SEC'
     O                                        +   3 'BIN'
     O                                        +   1 'TYP'
     O                                        +   1 'AVAIL'
     O                                        +   1 'DEDBIN'
     O                                        +  10 'AVAL4LETDOWN'
     O                                        +  12 'SEQ'
     O                                        +  18 'STATUS'


     Oqsysprt   e            detail      3
     O                       wrhouse          +   1
     O                       icwmsn           +   1
     O                       icwmbl           +   1
     O                       icwmbt           +   1
     O                       icwmas           +   1
     O                       icwmdb           +   1
     O                       icwmal           +   1
     O                       icwmps           +  12
     O                       icwmbs           +  12

=================================================================================================

Thanks in advance,

Jake.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.