Export Ascii Problem (AREV Specific)
At 27 APR 2000 12:21:45PM Jim Dierking wrote:
I am working with UPS in creating a shipping data "PLD" text file
containing our shipping information. The export file is fixed length
strings 770 digits long. Arev's export template is perfect for
setting the field positions and length. My problem is that UPS requires the creation of two string types "100" and "200" that must
be included in one export file. However, these files do not have
identical field location and length preferences. I know that when
you pdisk you can append to a file from several routines with different criteria, but I can't see how this can be done with the export routine, as it only allows overwrite or quit! We are writing
our shipping data to a holding file called UPS_LOG. So I have no
problem in getting the data records to the holding file. Again,
the problem is in reading all the records in the holding file and
then applying a different export definition for the respective type of record. Can an export routine be written that can vary the export
definition from one record to the next and maintain output to one file? TIA for the help, Jim Dierking
At 27 APR 2000 01:35PM Frank S. Adamo wrote:
Have you saved a RLIST program?
That is LIST INVOICES CUST_ID INVOICE_NO (X)
The (X) will force a window to popup so you can save the list to a file and a record.
If so, great. If not, then I would suggest that you do just that. List the program with all the fields you want to export. Then modify the program to enable all the parameters you need. You would need to add OSOPEN
At 27 APR 2000 01:36PM Frank S. Adamo wrote:
Have you saved a RLIST program?
That is LIST INVOICES CUST_ID INVOICE_NO (X)
The (X) will force a window to popup so you can save the list to a file and a record.
If so, great. If not, then I would suggest that you do just that. List the program with all the fields you want to export. Then modify the program to enable all the parameters you need. If you need assistance, feel free to contact me here or at frank@aims-global.com.
At 27 APR 2000 02:25PM Warren wrote:
Just do the two exports and create a bat file that does:
COPY a.txt + b.txt c.txt
del a.txt
del b.txt
You might have to use the /b switch right after COPY (e.g. COPY /b …) to do a binary copy on all files. Play with it.
At 27 APR 2000 03:47PM Don Bakke wrote:
Jim,
I'm not sure what these string types refer to but if you require custom process in your export, especially the ability to add to an existing export file, then you will need to code this process. Warren's suggestion might be good enough if you can run one type of export as a batch and then another one, thereby minimizing the number of export processes you will need to run in a single session.
dbakke@srpcs.com
At 28 APR 2000 12:42AM Jim Dierking wrote:
How can I get a look at the rbasic code that is run from the
export definition window? I am hoping I could maybe run both
definitions from on rbasic routine. TIA, Jim
PS: The copy command may work, but I have to see if the way it
appends works for UPS's parsing…
At 28 APR 2000 08:24AM Don Bakke wrote:
Jim,
I don't know if it is possible to see that code. We wrote a utility for one of our clients to export their order information into the RPS MultiShip format (which has now been purchased by FedEx.) It does file appending using the OSBWrite command. You are more than welcome to a copy if you send me an email address.
dbakke@srpcs.com