[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

RE: [sqr-users] Trouble with an array



I personally would need to see all your code - additionally, put some show 
statements inside debugs so you can see what is happening.

peace,
clark 'the dragon' willis



PSA: Salary <> Slavery. If you earn a salary, your employer is renting your 
services for 40 hours a week, not purchasing your soul. Your time is the 
only real finite asset that you have, and once used it can never be 
recovered, so don't waste it by giving it away.

I work to live; I don't live to work.

"Time is the coin of your life. It is the only coin you have, and only you 
can determine how it will be spent. Be careful lest you let other people 
spend it for you."

Carl Sandburg
(1878 - 1967)

----Original Message Follows----

Afternoon,

I have an array that I am having a problem with. I only want to see the it 
once for each person, what's happening is if the person has two roommates it 
repeats the iteration again so each person with two roommates gets listed 
twice.

I've posted the if statement that drives it below if someone could offer 
some insight on how to fix this that would be great. Thanks in advance.

Laura

Do Print_Data

if $Type <> 'No Roomate'
Let $PriEMPLID = &MA.UMH_PREF_ROOMMATE1
let $InputIdRM1=&MA.UMH_PREF_ROOMMATE1
Do Get_Name_OfPerson
if $Period <> $parm_proc_cd
  let $printPeriod='('|| $Period || ')'
else
  let $printPeriod=' '
end-if
let $RoommateName1=$Name || ' ' || $printPeriod
if isBlank(&MA.UMH_PREF_ROOMMATE2) or isnull(&MA.UMH_PREF_ROOMMATE2)
  let $InputIdRM2=&MA.UMH_PREF_ROOMMATE2
Let $InputIdRM2 = ''
Let $RoommateName2 = ''
Do Print_Roommate_Name
else
Let $PriEMPLID = ''
Let $InputIdRM2 = ''
Let $RoommateName2 = ''
Let $PriEMPLID = &MA.UMH_PREF_ROOMMATE2
let $InputIdRM2=&MA.UMH_PREF_ROOMMATE2
Do Get_Name_OfPerson
let $RoommateName2=$Name || ' ' || $printPeriod
Do Print_Roommate_Name
end-if
else
Print 'No Roommate'  (+1,1) Bold
Print '=' (+1,1,140) fill
end-if

_________________________________________________________________
Don’t just search. Find. Check out the new MSN Search! 
http://search.msn.click-url.com/go/onm00200636ave/direct/01/


_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users