Doubt about when condition ?



Software AG's platform-independent programming language with full support for open-source and Internet applications

Doubt about when condition ?

Postby diptisaini » Thu Jul 01, 2010 5:55 pm

WHEN ( #KCTGMAPP-OUT-GRP-NAME( #I ) = 'REDEM PRCT') AND
( ( #KCTGMAPP-IN-SCOPE = 'CACONF' ) OR ( #KCTGMAPP-IN-SCOPE = 'CAOPTN' ) )

MOVE #KCTGMAPP-OUT-GRP-VALUE( #I ) TO #REDEM-PRCT
#KCSAMTP0-IN-NUMBER :=
#S-DIV-RATE-N * 100 * 10000000000 / #S-DIV-UNIT-N
#KCSAMTP0-IN-DECIMAL-PLACE := 10
CALLNAT 'KCSAMTN0' #KCSAMTP0-PARMS
COMPRESS ':90A::'
#S-DIV-QUAL '//'
#S-DIV-CODEWORD '/'
#KCSAMTP0-OUT-SWIFT-FORMAT
#HEX-0D25
INTO #KCSBUFP0-IN-STRING LEAVING NO SPACE


Hi, I just need to know that if i am modifying the above when condtion as given below :-

WHEN ( #KCTGMAPP-OUT-GRP-NAME( #I ) = 'REDEM PRCT')
WHEN ( ( #KCTGMAPP-IN-SCOPE = 'CACONF' )
WHEN ( #KCTGMAPP-IN-SCOPE = 'CAOPTN' ) )

MOVE #KCTGMAPP-OUT-GRP-VALUE( #I ) TO #REDEM-PRCT
#KCSAMTP0-IN-NUMBER :=
#S-DIV-RATE-N * 100 * 10000000000 / #S-DIV-UNIT-N
#KCSAMTP0-IN-DECIMAL-PLACE := 10
CALLNAT 'KCSAMTN0' #KCSAMTP0-PARMS
COMPRESS ':90A::'
#S-DIV-QUAL '//'
#S-DIV-CODEWORD '/'
#KCSAMTP0-OUT-SWIFT-FORMAT
#HEX-0D25
INTO #KCSBUFP0-IN-STRING LEAVING NO SPACE

then is it the correct way of coding?
diptisaini
 
Posts: 90
Joined: Sun Mar 14, 2010 5:12 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Doubt about when condition ?

Postby RGZbrog » Thu Jul 01, 2010 8:10 pm

I don't see how all the parentheses are helping.
WHEN #KCTGMAPP-OUT-GRP-NAME( #I ) = 'REDEM PRCT'
  AND #KCTGMAPP-IN-SCOPE = 'CACONF'
                     OR = 'CAOPTN'
User avatar
RGZbrog
 
Posts: 101
Joined: Mon Nov 23, 2009 1:34 pm
Location: California, USA
Has thanked: 0 time
Been thanked: 0 time


Return to Natural

 


  • Related topics
    Replies
    Views
    Last post