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



In that case, how about something like this?  

D                 DS
D FXQS                          70A  Dim(36)
D  FXQS01                            Overlay(FXQS:1)
D  FXQS02                            Overlay(FXQS:*next)
    .
    .
    .
D   FXQS36                           Overlay(FXQS:*next)

D                 DS
D SSQS                          15S 0Dim(12)
D  SSQS01                           Overlay(SSQS:1)
D  SSQS02                           Overlay(SSQS:*next)
    .
    .
    .
D  SSQS36                           Overlay(SSQS:*next)


D                 DS
D  WQTY                   1     15A
D  WQTYN                  1     15S 0


D  x              S              5U 0

              Eval      x = 0
              DoW       x < 12 
              Eval      x = x + 1
              Clear                   WQTY
              EvalR     WQTY = %trimr(FXQS(x))
' ':'0'       Xlate     WQTY          WQTY
              Eval      WQTYN = WQTYN + SSQS(X)
              Eval      FXQS(x) = %triml(%editc(WQTYN:'4'))
              EndDo
     
or something along those lines.  I don't remember if you can now do a For -
EndFor in normal RPG.  If so, that would probably be more appropriate than
the DoW that I have here.

Duane


> -----Original Message-----
> From: Bill Hopkins [SMTP:BHopkins@xxxxxxxxxxxxxxxxxxx]
> Sent: Thursday, August 14, 2003 1:06 PM
> To:   RPG programming on the AS400 / iSeries
> Subject:      Re: Character to Numeric can it be cleaned up
> 
> Thanks Duane and Buck,
> 
> I have Char FXQS?? 70 A buckets 1 thru 36  the SSQS?? 1 thru 12  is 15s 0
> 
> Char field starts left justified and  has to end left justified 
> 
> So I build "sorry to say" subroutine not procedure to 
> 
> exsr and do this:
> 
> Eval      WQTY   = FXQS01
> Eval      NQTY2  = SSQS01
> Exsr      CalBucket 
> Eval      FXQS01 = WQTY 
> 
> Eval      WQTY   = FXQS02
> Eval      NQTY2  = SSQS02
> Exsr      CalBucket 
> Eval      FXQS02 = WQTY 
> 
> etc.
> 
> CalBucket  Begsr
> 
> Evalr     WQTY  = %trimr(WQTY) 
> MOVE   WQTY          NQTY1 
> Eval      WQTY = %triml(%editc((NQTY1 + NQTY2):'4'))
> 
> Endsr
> 
> Thanks 
> 
> Bill Hopkins
> _______________________________________________
> 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.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.