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



wouldn't you rather elim the CL?  ;-)


On Wed, 10 Nov 2004 15:09:25 -0600, Steve Morrison
<smorrison@xxxxxxxxxxxxx> wrote:
> Muralidhar,
> 
> In this case the RPG program can be eliminated. In the DDS specifications,
> specify Y and N as the only valid values. Use the DCLF statement to declare
> the file in the CL program, and SNDRCVF to display/read the screen. Then in
> the CL program, test the values and execute whatever call you need to for a
> valid response.
> 
> It's also possible test for a valid response in the CL program, and
> redisplay the screen if the response is invalid, if you choose not the
> restrict responses in the DDS specifications.
> 
> 
> Steve Morrison
> Beacon Insurance
> 940-720-4672 
> 
> 
> 
> -----Original Message-----
> From: Muralidhar Narayana [mailto:Muralidhar_Narayana@xxxxxxxxxxx]
> Sent: Wednesday, November 10, 2004 2:58 PM
> To: rpg400-l@xxxxxxxxxxxx
> Subject: want to eliminate indicators&suppress code further
> 
> Hi
> I have written  programs CLP&RPGLE to give an option to User to select
> Yes/No options.
> Yes option will give him print and No option will send an email to him.
> Can some one try to advise me on how can I eliminate indicators and replace
> with builtin functions in my code, is there anyway still i can reduce my
> code...if possible pls answer..this code what I ve written is working for me
> but nt looking beautiful..
> =======================
> YYESNOC:CLP
> ------------------
> PGM        PARM(&YESORNO)
> 0004.04              DCL        VAR(&YESORNO) TYPE(*CHAR) LEN(1) VALUE(N)
> 
> 0005.00              DCL        VAR(&REPLY) TYPE(*CHAR) LEN(1)
> 
> 0007.00              CALL       PGM(YYESNOR) PARM(&REPLY)
> 
> 0008.00              IF         (&REPLY *EQ 'Y') THEN(DO)
> 
> 0009.00              CHGVAR     VAR(&YESORNO) VALUE('Y')
> 
> 0010.00              ENDDO
> 
> 0011.00              IF         (&REPLY *EQ 'N') THEN(DO)
> 
> 0011.01              CHGVAR     VAR(&YESORNO) VALUE('N')
> 
> 0013.00              ENDDO
> 
> 0014.00
> 
> 0015.00 ENDPGM
> ----------------------
> YYESNOR:RPGLE :
>               FYYESNO  CF   E             WORKSTN
> 
> 0005.00 C                   MOVE      'N'           REPLY
> 
> 0006.00 C     AG1           TAG
> 
> 0007.00 C     *ENTRY        PLIST
> 
> 0008.00 C                   PARM                    RPLY              1
> 
> 0009.00 C                   EXFMT     DSPLY
> 
> 0010.00 C                   SETOFF                                       99
> 
> 0011.00 C     *IN03         IFEQ      '1'
> 
> 0012.00 C                   GOTO      BOTTOM
> 
> 0013.00 C                   ELSE
> 
> 0014.00 C                   EXSR      VALID
> 
> 0015.00 C  N99              MOVE      REPLY         RPLY
> 
> 0016.00 C   99              GOTO      AG1
> 
> 0017.00 C                   END
> 
> 0018.00 C     BOTTOM        TAG
> 
> 0019.00 C**
> 
> 0020.00 C                   MOVE      '1'           *INLR
> 
> 0021.00 C**
> 
> 0022.00 C*****************************************************************
> 
> 0023.00 C* SUBROUTINE TO VALIDATE REPLY ENTERED ON SCREEN               **
> 
> 0024.00 C*****************************************************************
> 
> 0025.00 CSR   VALID         BEGSR
> 
> 0025.01 C     REPLY         IFEQ      ' '
> 
> 0025.02 C                   MOVE      'N'           REPLY
> 
> 0025.03 C                   ENDIF
> 
> 0026.00 C     REPLY         IFNE      'Y'
> 
> 0027.00 C     REPLY         ANDNE     'N'
> 
> 0028.00 C     REPLY         ANDNE     'y'
> 
> 0029.00 C     REPLY         ANDNE     'n'
> 
> 0030.00 C     *IN03         ANDNE     '1'
> 
> 0031.00 C                   SETON                                        99
> 
> 0032.00 C                   END
> 
> 0033.00 CSR                 ENDSR
> 
> --
> 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.
> 
> --
> 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.
> 
> 


-- 
"Enter any 11-digit prime number to continue..."

As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.