I forgot to specify the length of the substring that I was comparing. Beginners mistake.
Sorry for the interruption.
Kim
________________________________
From: rpg400-l-bounces@xxxxxxxxxxxx on behalf of Kim Spears
Sent: Thu 6/12/2008 1:40 PM
To: RPG programming on the AS400 / iSeries
Subject: Data structure issue
Hi All,
I am trying to check some numbers in a data structure and am getting some strange results.
D hours DS
D zHour1 1 0 INZ(1)
D zHour2 1 0 INZ(1)
D zHour3 1 0 INZ(1)
D zHour4 1 0 INZ(1)
D zHour5 1 0 INZ(1)
D zHour6 1 0 INZ(1)
D zHour7 1 0 INZ(1)
D zHour8 1 0 INZ(1)
C SELECT
C WHEN %SUBST(hours:1) = '1'
C 'oneFound' dsply
C WHEN %SUBST(hours:8) = '1'
C 'eightFound' dsply
C ENDSL
C EVAL *INLR = *ON
The program finds the eighth element, but misses the first element. Any ideas?
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2026 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.