The mystery of the missing (compound) variables.
- From: phillips_js@xxxxxxxxxxx
- Date: Sat, 3 May 2008 06:41:32 -0700 (PDT)
It's a mystery. What happened to the missing compound variable "array"
members in the last record ?
So I use a text file with a max 50 records as a number all alone on
its line (so I can recover it as a number) and a following space-
separated text string line which can be PARSEd. Code snippet:
IF STREAM(file,"C","QUERY EXISTS")\="" THEN DO
CALL STREAM file,"C","OPEN READ"
rec_num = 0
DO FILELN = 1 TO 50
IF STREAM(file,"S")\="READY" THEN
LEAVE
ln = LINEIN(file)
IF LEFT(ln,1) > 0 THEN DO
rec_num = rec_num + 1
array1.rec_num = ln
SAY "Rec Num "rec_num array1.rec_num
END
ELSE DO
PARSE VALUE ln WITH " "array2.rec_num" "array3.rec_num"
"array4.rec_num
/* displays records correctly */
SAY array2.rec_num array3.rec_num array4.rec_num
END
END
CALL STREAM file, "C", "CLOSE"
END
/* displays all records correctly EXCEPT FOR THE LAST RECORD (I.E.
WHEN THEY =.REC_NUM) */
SAY array2.rec_num array3.rec_num array4.rec_num
What happened to the last record which displayed correctly inside the
DO loop, but is missing outside it ?
This runs in ZOC with its Enterprise Alternatives Inc flavor of REXX.
Anyone with any clues to this dastardly outcome ?
.
- Follow-Ups:
- Re: The mystery of the missing (compound) variables.
- From: Pit Zyclade
- Re: The mystery of the missing (compound) variables.
- From: Gordon Snider
- Re: The mystery of the missing (compound) variables.
- From: Pit Zyclade
- Re: The mystery of the missing (compound) variables.
- From: Arthur T .
- Re: The mystery of the missing (compound) variables.
- Prev by Date: Re: how to process thousands of files?
- Next by Date: Re: The mystery of the missing (compound) variables.
- Previous by thread: how to process thousands of files?
- Next by thread: Re: The mystery of the missing (compound) variables.
- Index(es):
Relevant Pages
|
Loading