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



So glad to see others using commands. It's a great and, I think, very underutilized feature.

Roger Harman
COMMON Certified Application Developer - ILE RPG on IBM i on Power

 
 





From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxx> on behalf of Robert Rogerson <rogersonra@xxxxxxxxx>
Sent: Thursday, October 5, 2017 6:31 AM
To: Midrange Systems Technical Discussion
Subject: Re: User command help
 
Thanks Glenn, I fixed the error you mentioned and finally came up with
this which is exactly what I was trying to accomplish.

              PARM       KWD(STRRCV ) TYPE(Q4) MIN(0) +
                         PROMPT('Starting Receiver..')

.

.

.

Q4:         QUAL       TYPE(*NAME) LEN(10) SPCVAL((*CURRENT)) +
                           EXPR(*YES) DFT(*CURRENT)
              QUAL       TYPE(*NAME) LEN(10) DFT(*LIBL) +
                         SPCVAL((*LIBL) (*CURLIB)) EXPR(*YES) +
                         PROMPT('Library')

Thanks,

Rob


On 10/5/2017 8:27 AM, Glenn Gundermann wrote:
Hi Rob,

Looks like you have the default value specified twice.  Remove it from the
QUAL statement, i.e.
   Q4:  QUAL       TYPE(*NAME) LEN(10) MIN(1) EXPR(*YES)


Yours truly,

Glenn Gundermann
Email: glenn.gundermann@xxxxxxxxx
Work: (905) 486-1162 x 239
Cell: (416) 317-3144


On 5 October 2017 at 08:09, Robert Rogerson <rogersonra@xxxxxxxxx> wrote:

     Hi All,

     I'm trying to create a user command

                  CMD        PROMPT('Display Journal Extract')
                  PARM       KWD(JRNFILE) TYPE(Q1) MIN(1) +
                             PROMPT('Journaled File')
                  PARM       KWD(EXTFILE) TYPE(Q2) MIN(1) +
                             PROMPT('Extract to File')
                  PARM       KWD(JOURNL ) TYPE(Q3) MIN(1) +
                             PROMPT('Journal')
                  PARM       KWD(STRRCV ) TYPE(Q4) MIN(1) +
                             DFT(*CURRENT) +
                             PROMPT('Starting Receiver..')

             Q1:  QUAL       TYPE(*NAME) LEN(10) MIN(1)
                  QUAL       TYPE(*NAME) LEN(10) DFT(*LIBL) +
                             SPCVAL((*LIBL) (*CURLIB)) EXPR(*YES) +
                             PROMPT('Library')
             Q2:  QUAL       TYPE(*NAME) LEN(10) MIN(1)
                  QUAL       TYPE(*NAME) LEN(10) DFT(*CURLIB) +
                             SPCVAL((*LIBL) (*CURLIB)) EXPR(*YES) +
                             PROMPT('Library')
             Q3:  QUAL       TYPE(*NAME) LEN(10) MIN(1)
                  QUAL       TYPE(*NAME) LEN(10) DFT(*LIBL) +
                             SPCVAL((*LIBL) (*CURLIB)) EXPR(*YES) +
                             PROMPT('Library')
             Q4:  QUAL       TYPE(*NAME) LEN(10) DFT(*CURRENT) +
                             SPCVAL((*CURRENT)) EXPR(*YES)
                  QUAL       TYPE(*NAME) LEN(10) DFT(*LIBL) +
                             SPCVAL((*LIBL) (*CURLIB)) EXPR(*YES) +
                             PROMPT('Library')

     The problem I'm having is specifying or rather displaying the value
     *CURRENT in Q4.

     I'm thinking I want it similar to member - *FIRST in the CPYF command

                                    Copy File (CPYF)

     Type choices, press Enter.

     From file  . . . . . . . . . . . Name
       Library  . . . . . . . . . . .     *LIBL       Name, *LIBL, *CURLIB
     To file  . . . . . . . . . . . .                 Name, *PRINT
       Library  . . . . . . . . . . .     *LIBL       Name, *LIBL, *CURLIB
     From member  . . . . . . . . . .   *FIRST        Name, generic*, *FIRST,
     *ALL
     To member or label . . . . . . .   *FIRST        Name, *FIRST, *FROMMBR,
     *ALL
     Replace or add records . . . . .   *NONE         *NONE, *ADD,
*REPLACE...
     Create file  . . . . . . . . . .   *NO           *NO, *YES
     Print format . . . . . . . . . .   *CHAR         *CHAR, *HEX

     Actually, I'm thinking maybe I can't do this with QUAL.or TYPE(*NAME).

     Does anyone know how to do it or is it even possible?

     Thanks,

     Rob
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.


MIDRANGE-L mailing list archive (midrange.com)
archive.midrange.com
midrange.com MIDRANGE-L mailing list archive


Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD



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.