07-22-2014
A few questions:-
- Can you extract the data you need running this from a shell script?
- How long are the lines and how long should they be?
- Why do you get pipes and quotes in the output? Is it in the source data?
- Does your query language support commands such these
- SET LINESIZE 4000
- COLUMN x FORMAT A20
I'm still a little unclear as to what output you want.
RudiC did ask, but you didn't answer. Do you want a fixed line length file, fixed width columns or are you planning to FTP this to a mainframe where you can define data as fixed record?
If you could help us to understand your need, then perhaps we will be better placed to help you with a solution.
What variations have you tried so far?
Robin
Last edited by rbatte1; 07-22-2014 at 11:57 AM..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Is there a command that sets a variable length?
I have a input of a variable length field but my output for that field needs to be set to 32 char.
Is there such a command?
I am on a sun box running ksh
Thanks (2 Replies)
Discussion started by: r1500
2 Replies
2. Shell Programming and Scripting
consider a fixed length file
12345abcd8901
12345abcd7777
12345njdu8888
12345hdku8388
i would like to dump it in to oracle DB using sql loader
12345 in to first coloumn
abcd in to second coloumn
8901 in to 3rd coloumn (2 Replies)
Discussion started by: anumkoshy
2 Replies
3. UNIX for Dummies Questions & Answers
I want to find out the record length of a fixed length file? I forgot the command. Any body know? (9 Replies)
Discussion started by: tranq01
9 Replies
4. UNIX for Dummies Questions & Answers
Hi, all.
I need to convert a file tab delimited/variable length file in AIX to a fixed lenght file delimited by spaces. This is the input file:
10200002<tab>US$ COM<tab>16/12/2008<tab>2,3775<tab>2,3783
19300978<tab>EURO<tab>16/12/2008<tab>3,28523<tab>3,28657
And this is the expected... (2 Replies)
Discussion started by: Everton_Silveir
2 Replies
5. Shell Programming and Scripting
Need a script that manipulates a fixed length file that will compare 2 fields in that file and if they are equal write that line to a new file.
i.e. If fields 87-93 = fields 119-125, then write the entire line to a new file. Do this for every line in the file. After we get only the fields... (1 Reply)
Discussion started by: Muga801
1 Replies
6. Shell Programming and Scripting
Hi,
I have a file which have set of rows and has to create separate files based on the id.
Eg:
001_AHaris020
001_ATony030
002_AChris090
002_ASmit060
003_AJhon001
Output: I want three files like 001_A.txt, 002_A.txt and 003_A.txt.
001_A.txt should have
... (4 Replies)
Discussion started by: techmoris
4 Replies
7. Shell Programming and Scripting
I have a peculiar file with record format like given below. Each line is wrapped to next lines after certain number of characters. I want to concatenate all wrapped lines into 1.
Input:(wrapped after 10 columns)
This is li
ne1
This is li
ne2 and
this line
is too lo
ng
Shortline
... (8 Replies)
Discussion started by: kmanyam
8 Replies
8. UNIX for Dummies Questions & Answers
I have a fixed width file of length 53. when is try to get the lengh of the record of that file i get 2 different answers.
awk '{print length;exit}' <File_name>
The above code gives me length 50.
wc -L <File_name>
The above code gives me length 53.
Please clarify on... (2 Replies)
Discussion started by: Amrutha24
2 Replies
9. Shell Programming and Scripting
Hi Everyone,
I need to increment a value in the fixed length file. The file has almost a million rows. Is there any easy way to accomplish this.
Ex
input file
ASDSD ADSD 00000 X
AAASD ADSD 00000 X
SDDDD ADSD 00000 X
Ouput
ASDSD ADSD 00001 X
AAASD ADSD 00002 X
SDDDD ADSD 00003 X
... (7 Replies)
Discussion started by: saratha14
7 Replies
10. Shell Programming and Scripting
Hi All,
I need to convert a fixed length file to a delimited file with , (comma). But not all columns, some of the columns in the fixed files are used as fillers and I do not need that in the output file.
test_fixed_len.txt
I 0515 MR 394
I 0618 MR & MRS 942
I 0618 MR & MRS... (7 Replies)
Discussion started by: member2014
7 Replies