Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I get absolute field lengths 3

Status
Not open for further replies.

willybgw

Programmer
May 30, 2003
55
US
I need to concatenate several fields (all text) with a total length of 94 bytes to a single field of 94 bytes.

The output field needs to be spaced correctly, for example if the first of the concatenated fields is 20 bytes but only has 10 characters I want the second field to start in position 21 of the output field. Some fields work as expected others don't. Even if the field is blank I need it to put the defined number of blanks in the output field.

Any help will be greatly appreciated.

willybgw
 
on second thought it wont even be good for reading
a function returns a value
you cant assign a value to a function
 
you cant assign a value to a function
But Mid is a function AND an instruction ...

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
a star for pvh today is my learning day
i had tested and it did not work
but it should be
Mid(strOutput,1, 20) = [myfirstfield] ' field 1
Mid(strOutput,21, 10) = [mysecondfield] ' field 2
not

Mid(strOutput(1, 20) = [myfirstfield] ' field 1
Mid(strOutput(21, 10) = [mysecondfield] ' field 2

 
Thanks to all.

I have figured a workaround to accomplish what I was trying do.
I exported each of the 5 files as fixed width records,
then imported each one into a one field 94 byte file, then exported that file. This gave me the format that I needed.

Again thank you all for your help.

willybgw
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top