The structure reads data correctly until SDQ segment is reached, then reads correctly the first column (ST_number) but does not recognize the next column (Quantity) within the segment. Moreover, next locations (ST_number) within the same SDQ segment are not recognized by this structure. Any ideas are appreciated.
Thanks!
WebFOCUS 7.7, iWay Data Migrator, Windows Excel, PDF, HTML, XML
August 09, 2012, 05:38 PM
Waz
I didn't think you could use OCCURS with CSV.
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
August 13, 2012, 12:35 PM
Dan Satchell
Though you defined your STORE_DATA field with length 100, it "sees" only the first value in the string because it stops at the first field delimiter (i.e., comma). The following variation does work for reading all of the SDQ values. And it works if you PRINT SEG.TPID or PRINT SEG.LINE_ID or PRINT SEG.ST_NUMBER. But if you try to print fields from more than one segment at a time, the first HDR values and first DTL values are assigned to all records. So something is still not working correctly. Perhaps as Waz says, this type of synonym cannot be used with flat files. (FYI: you seem to have one too many commas at the end of your SDQ data lines.)
As you can see, I'm using MAXNUM in the parent to count the number of OCCURS instances.
I see that Dan has the child segment identified as an S0, while I (and Anna) have it as an S1. Dan - if there are multiple children how do you identify them with S0 ?This message has been edited. Last edited by: George Patton,
Thank you all for suggestions and comments. Based on your responses, I gather that OCCURS cannot be used with csv in variable format. I used option to define each of the columns individually. It takes a bit more processing as I need to transpose the data later on, so Location is one column and not 11.
WebFOCUS 7.7, iWay Data Migrator, Windows Excel, PDF, HTML, XML