
Extra blank line in download text file (.txt)
Started by
Guest_space_*
, Sep 30 2005 03:50 AM
18 replies to this topic
#6
Guest_space_*
Posted 30 September 2005 - 08:27 AM
i am using the ALIAS('seq file name', physical file name) in the Logic In of my update function.
In \US\, i write the data in the seq file using Add mode and mark the Clear File = 'Y'.
I am NOT using LF or CR in my function.
Anyway what is LF and CR?
In \US\, i write the data in the seq file using Add mode and mark the Clear File = 'Y'.
I am NOT using LF or CR in my function.
Anyway what is LF and CR?
#9
Guest_space_*
Posted 30 September 2005 - 09:09 AM
The program is very straight forward.
At the Logic In of my update function, i used
ALIAS('seq filename', physical filename)
Then at the update start, i just read some files to get the data i want and write into the seq file.
The seq file is Add Mode and the logic to write the data into this file is placed in the Before Write.
Then i got mark Clear File.
So, anyone can help in this matter as soon as possible?
Need to take out the blank line to allow my functions to work properly when send to user.
At the Logic In of my update function, i used
ALIAS('seq filename', physical filename)
Then at the update start, i just read some files to get the data i want and write into the seq file.
The seq file is Add Mode and the logic to write the data into this file is placed in the Before Write.
Then i got mark Clear File.
So, anyone can help in this matter as soon as possible?
Need to take out the blank line to allow my functions to work properly when send to user.
#10
Posted 30 September 2005 - 09:40 AM
Most programs are straight forward
You aren't using Superlayer by any weird chance ? Update start is something that I've never heard of.
So pretty much what you saying :
at Function Entry/LS Entry Logic you have ALIAS('SEQFILE','FILEPATH')
you then have
LS1
File 1
File 2
SEQFILE Y for clear with logic on BW to setup your fields ?
Is your seqfile defined as having a single field ie DATA etc or have you defined them as separate fields.
To me it sounds like you have a data problem ie the record doesn't exist on one of the files and your SEQFILE isn't getting set up correctly. Can you try your extract for a different dataset and see if you get the same results ?

You aren't using Superlayer by any weird chance ? Update start is something that I've never heard of.
So pretty much what you saying :
at Function Entry/LS Entry Logic you have ALIAS('SEQFILE','FILEPATH')
you then have
LS1
File 1
File 2
SEQFILE Y for clear with logic on BW to setup your fields ?
Is your seqfile defined as having a single field ie DATA etc or have you defined them as separate fields.
To me it sounds like you have a data problem ie the record doesn't exist on one of the files and your SEQFILE isn't getting set up correctly. Can you try your extract for a different dataset and see if you get the same results ?
#13
Posted 30 September 2005 - 10:06 AM
For my case,
I'm using superlayer...
it is an update function
Logic in of the function,
I had Alias(File2,'abc.txt')
at default logic,
I had my SQL query to select from a file,
the file design as below:
File1 (Lookup mode)
File2 (Write Mode)
so when i open the abc.txt,
there is always a blank line appear at the last line!!!
**the data is no problem ...
3 records in file1
but when i open abc.txt, there is always 4 lines, with the last line is a blank line!!!
I think my problem is quite similar to the poster "space"
I'm using superlayer...
it is an update function
Logic in of the function,
I had Alias(File2,'abc.txt')
at default logic,
I had my SQL query to select from a file,
the file design as below:
File1 (Lookup mode)
File2 (Write Mode)
so when i open the abc.txt,
there is always a blank line appear at the last line!!!
**the data is no problem ...
3 records in file1
but when i open abc.txt, there is always 4 lines, with the last line is a blank line!!!
I think my problem is quite similar to the poster "space"
#14
Posted 30 September 2005 - 11:16 AM
I have the same problem when creating a txt file and importing the txt file as a mail merge in word the last record read always sends an error message.
record xxx no data
looking at my txt file with notepad there is a little square at the end of the last record which I think is an end of file marker and word seems to treat this as the last record.
Space, when you look the the txt file with notepad do you have a square at end of your file?
record xxx no data
looking at my txt file with notepad there is a little square at the end of the last record which I think is an end of file marker and word seems to treat this as the last record.
Space, when you look the the txt file with notepad do you have a square at end of your file?
#15
Posted 30 September 2005 - 11:57 AM
I havn't tried it myself, but if you change the file type of the text file in pro-iv from SEQ to BIN, pro-iv won't send a CR/LF anymore.
you would have to add the CHAR(13) and CHAR(10) codes yourself to the end of each line when you write them to the file, but very likely, pro-iv won't add something at the end of the file.
I can't remember if you have to send a CR/LF or a LF/CR. Just try and see what happens.
you would have to add the CHAR(13) and CHAR(10) codes yourself to the end of each line when you write them to the file, but very likely, pro-iv won't add something at the end of the file.
I can't remember if you have to send a CR/LF or a LF/CR. Just try and see what happens.
Reply to this topic

0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users