Welcome, Guest. Please login or register.

Login with username, password and session length
Pages: [1]   Go Down
Print
Author Topic: Exporting flat ascii file  (Read 2554 times)
0 Members and 1 Guest are viewing this topic.
hjkelsheimer
Member

Posts: 28


View Profile WWW
« on: October 28, 2006, 09:47:21 PM »

i use an old version of filepro on a unix sco system. i am trying to export a file for the credit bureau that they want with a carriage return and line feed. the problem is that the way my prc is written it doesnt recognize each record to put a ^m or ^j  and if i use the \n with the export command with out the -x it loses the blank characters in the fields.

can anyone suggest a way to imbed the ^m or ^j or both in the line processing so that i can tell it where to have a line feed etc.

i can redefine each field (with variable fields) to have all the blank characters then send it out with export \n  but that seems like a lot of trouble.

can anyone make a suggestion?

thanks,
hubert
Logged
ernieb
Member

Posts: 52


View Profile WWW
« Reply #1 on: October 30, 2006, 08:53:53 AM »

Quote from: "hjkelsheimer"
i use an old version of filepro on a unix sco system. i am trying to export a file for the credit bureau that they want with a carriage return and line feed. the problem is that the way my prc is written it doesnt recognize each record to put a ^m or ^j  and if i use the \n with the export command with out the -x it loses the blank characters in the fields.

can anyone suggest a way to imbed the ^m or ^j or both in the line processing so that i can tell it where to have a line feed etc.

i can redefine each field (with variable fields) to have all the blank characters then send it out with export \n  but that seems like a lot of trouble.

can anyone make a suggestion?

thanks,
hubert


aa=chr("10") will give you a line feed - but you may have to use chr("10") and chr("13") for a carriage return and line feed.
Logged

Never increase, beyond what is necessary, the number of entities required to explain anything.
hjkelsheimer
Member

Posts: 28


View Profile WWW
« Reply #2 on: October 30, 2006, 06:13:06 PM »

thank you i will give it a try.

hubert
Logged
hjkelsheimer
Member

Posts: 28


View Profile WWW
« Reply #3 on: October 30, 2006, 06:24:14 PM »

do you think this would work?

export ascii=aa mki.txt -x

aa(37)=""{chr("10"){chr("13")

or this maybe

aa(37)=chr("10");aa(38)=chr("13")

what do you think?

did i get the right idea?

hubert
Logged
hjkelsheimer
Member

Posts: 28


View Profile WWW
« Reply #4 on: November 02, 2006, 10:58:15 PM »

Thanks to Ernie!

this was his suggested setup and is posted just in case someone else may need it in the future.

aa=chr("13"); ab = chr("10"); ac=aa=ab

export ascii tes = /filename.txt

tes(1)=1; tes(2)=2 tes(3)=ac (CR & LF in the last field exported)

my last post might have left everyone / including myself confused but ernie straightened me out on the set up.

hubert
Logged
Pages: [1]   Go Up
Print
Jump to:  

Valid XHTML 1.0! Powered by SMF 1.1.15 | SMF © 2011, Simple Machines | Massive Blue Theme By Cadosoas Valid CSS!