I believe the following will work as long as the file Wrktxt is defined in
the dictionary or globally.
In the parent procedure:
map
builddetailrecord procedure(*Wtxt:Record),string
end
passRec GROUP(Wtxt:Record)
rtnString STRING(1000)
CODE
passRec = Wtxt:Record
rtnString = builddetailrecord(passRec)
...
HTH,
Brad Kunkel
Integrated Business, Inc.
"Stanguru" <stanguru@[EMAIL PROTECTED]
> wrote in message
news:8e1b6955-8826-4c1d-a8db-1363b54d70ac@[EMAIL PROTECTED]
> trying to make a CSV string out of a record
> yeah i know there are templates and such, but i need to do it myself
> going cross-eyed searching and using help, and have tried every which
> way
> i dont t-totally understand how to references
>
> map
> builddetailrecord procedure(*group),string
> end
>
> Wrktxt
> FILE,DRIVER('ASCII'),PRE(Wtxt),CREATE,BINDABLE,THREAD
> Record record
> BigField string(2000)
> end
> END
>
>
> ....
> Set(wrkfile)
> Loop
> Next(wrkfile)
> If Errorcode() Then Break.
> stop(wrkc:record)
> wtxt:bigfield = BuildDetailRecord(wrkc:record)
> ADD(Wrktxt)
> end !end loop
>
> ...
> BuildDetailRecord procedure(*group inrec)
>
> Outstring cstring(2000)
> InRecord &inrec
>
>
> code
> clear(Outstring)
> stop('here in BDR - ' & InRecord{prop:fields})
> Loop i# = 1 To InRecord{prop:fields}
> case InRecord{PROP:Type, i#}
> of 'STRING'
> OutString = Clip(OutString) & '"' & clip(What(InRecord, i#))
> & '",'
> of 'DATE'
> OutString = Clip(OutString) & '"' &
> clip(format(What(InRecord, i#),@[EMAIL PROTECTED]
)) & '",'
> Else
> OutString = Clip(OutString) & clip(What(Inrecord, i#)) & ','
> End
> End
> return(OutString)


|