Discussion:
Does using rxqueue always UPPERCASE all of the text?
(too old to reply)
Michael Lueck
2023-09-20 10:27:19 UTC
Permalink
Greetings,

Using ooRexx v5.0 I was reminded that in my use of rxqueue, always the text ends up UPPERCASE. Example:

CheckEXIF: procedure expose LDSLogging
THISPhotoFile = arg(1)

THISPhotoDate = ''
THISCameraBrand = ''

EXIFqueue = RXqueue('create')
OLDqueue = RXqueue('set', EXIFqueue)
'exif "'THISPhotoFile'" | /usr/local/bin/rxqueue ' EXIFqueue

do queued()
pull THISline
if THISline~left(20) = 'DATE AND TIME (ORIGI' then
do
THISPhotoDate = THISline~substr(22, 10)~changeStr(':', '')
end
if THISline~left(20) = 'MANUFACTURER' then
do
THISCameraBrand = THISline~substr(22, 1)~upper()
end
end
rc = RXqueue('delete', EXIFqueue)
trash = RXqueue('set', OLDqueue)

THISreturn = THISPhotoDate || THISCameraBrand
.output~lineout(THISreturn)
return THISreturn


I must seek for 'DATE AND TIME (ORIGI' and MANUFACTURER' instead of the exact case I see the program output. I would think passing the data through rxqueue is responsible for the UPPERCASE transformation. Or is the do queued(), pull THISline responsible and the data really is within rxqueue CasePreserved?

I am thankful,
Michael Lueck
Rick McGuire
2023-09-20 13:37:01 UTC
Permalink
Post by Michael Lueck
Greetings,
CheckEXIF: procedure expose LDSLogging
THISPhotoFile = arg(1)
THISPhotoDate = ''
THISCameraBrand = ''
EXIFqueue = RXqueue('create')
OLDqueue = RXqueue('set', EXIFqueue)
'exif "'THISPhotoFile'" | /usr/local/bin/rxqueue ' EXIFqueue
do queued()
pull THISline
rxqueue doesn't uppercase, but PULL does. Use PARSE PULL instead.
Post by Michael Lueck
if THISline~left(20) = 'DATE AND TIME (ORIGI' then
do
THISPhotoDate = THISline~substr(22, 10)~changeStr(':', '')
end
if THISline~left(20) = 'MANUFACTURER' then
do
THISCameraBrand = THISline~substr(22, 1)~upper()
end
end
rc = RXqueue('delete', EXIFqueue)
trash = RXqueue('set', OLDqueue)
THISreturn = THISPhotoDate || THISCameraBrand
.output~lineout(THISreturn)
return THISreturn
I must seek for 'DATE AND TIME (ORIGI' and MANUFACTURER' instead of the exact case I see the program output. I would think passing the data through rxqueue is responsible for the UPPERCASE transformation. Or is the do queued(), pull THISline responsible and the data really is within rxqueue CasePreserved?
I am thankful,
Michael Lueck
Michael Lueck
2023-09-20 15:58:18 UTC
Permalink
Post by Rick McGuire
Post by Michael Lueck
do queued()
pull THISline
rxqueue doesn't uppercase, but PULL does. Use PARSE PULL instead.
Excellent! Indeed using PARSE PULL preserves the caseness of the data. Thank you, Rick!
Loading...