Sponsored Content
Top Forums Shell Programming and Scripting convert fixed length file to CSV Post 302222251 by tbtbs on Wednesday 6th of August 2008 11:25:45 AM
Old 08-06-2008
Yes, that is correct the rules will be different. How do you set the delimiter(,) if there is nothing in the field(ie field 11 of record 2,3 and 4?

1230-1630 is a field. Basically REC1 is the master record format.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

creating a fixed length output from a variable length input

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

Convert delimited to fixed length

Hi, I have to change a tab delimited file to a fixed length file. For text fields I need to left justify and NULL fill to the right and for number fields I need to right justify and zero fill to the left. If there are spaces between words in a text field I need to keep them as spaces. I am using... (14 Replies)
Discussion started by: nelson553011
14 Replies

3. Shell Programming and Scripting

convert XML file into Text file(fixed length)

If someone out there could help me out with this problem. I would really appreciate it. I am trying to convert xml into text file(fixed length) using Unix Borne shell scripts. My xml file: <root> <header_rec recordtype="00"> <record_id>00</record_id> ... (0 Replies)
Discussion started by: ram2s2001
0 Replies

4. Shell Programming and Scripting

how to convert Fixed length file to delimited file.

I have below fixed lenth file . I have to convert this to delimitted file. File1.txtE116005/29/19930E001E000 E12201/23/19940E001E003 E10406/4/19940E001E003 I want to convert this to : E116,0,05/29/1993,0,E001,E000 E122,0,1/23/1994,0,E001,E003 E104,0,6/4/1994,0,E001,E003 I have a... (7 Replies)
Discussion started by: satyam_sat
7 Replies

5. UNIX for Dummies Questions & Answers

What the command to find out the record length of a fixed length file?

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

6. UNIX for Dummies Questions & Answers

Convert a tab delimited/variable length file to fixed length file

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

7. Shell Programming and Scripting

Need a sort solution for fixed length file

I have a 1250 byte record that I need to sort in column 10-19 and in column 301. I have tried the sort command, but it looks like it needs delimiters to work. The record can have spaces in a lot of its 1250 columns, but 10-19, and 301 are guaranteed. These columns are numeric too. A sample... (1 Reply)
Discussion started by: mb1201
1 Replies

8. Shell Programming and Scripting

how to read fixed length flat file....

Hi Gurus, Thanks in advance... I am new to writing shell scripting and help me out reading a flat file with fixed length. I have a fixed length flat file with storename(lenth 6) , emailaddress(lenth 15), location(10). There is NO delimiters in that file. Like the following str00001.txt... (2 Replies)
Discussion started by: willywilly
2 Replies

9. UNIX for Dummies Questions & Answers

Length of a fixed width file

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

10. Shell Programming and Scripting

Convert variable length record to fixed length

Hi Team, I have an issue to split the file which is having special chracter(German Char) using awk command. I have a different length records in a file. I am separating the files based on the length using awk command. The command is working fine if the record is not having any... (7 Replies)
Discussion started by: Anthuvan
7 Replies
invcutter(1)						      General Commands Manual						      invcutter(1)

NAME
invcutter - Generates a subset inventory file SYNOPSIS
/usr/lbin/invcutter [-d] [-f root-path] [-v version-code] OPTIONS
Enables debugging. No useful diagnostics are printed. Specifies an alternate root path for finding file attribute information. Specifies a 3-digit version code for use in the version field of the output records. The default version code is 010. DESCRIPTION
The contents of a software product kit for the setld(8) command are specified by a master inventory file whose format is described in the stl_mi(4) reference page. The invcutter command processes a master inventory file by reading inventory records from standard input and writing one record to standard output for each record read. The information contained in the output record is derived from the input record and from the file attribute information in the file hierar- chy rooted in the current directory. RESTRICTIONS
Input records must be sorted in ascending ASCII order on the pathname field. The invcutter command cannot process input-specified files which exist as sockets in the file hierarchy. If an input-specified file has a link count greater than 1, all other links to the file must be represented in the input. RETURN VALUES
An exit status of 0 indicates success. An exit status of 1 indicates an error. See ERRORS. ERRORS
The program cannot set its working directory to the pathname directory specified with the -f option. The error-message provides additional information. The nth input record is not in the correct sort order. All input records must be in ascending ASCII collating sequence on the pathname field. An error has occurred attempting to read the attributes of filename. The error-message explains exactly what happened. The file named by pathname is a socket. Sockets are not supported as valid file types for distribution. File pathname in the master inventory is linked to n files which do not appear in the master inventory. Check the inventory for validity with the newinv program. This informational message states how many files with unresolved links were detected in the input inventory. EXAMPLES
The following command generates inventory records for the master inventory entries in PDS020.mi. Output records contain version fields set to 020: invcutter -v 020 < PDS020.mi SEE ALSO
Commands: kits(1), newinv(1) Files: stl_inv(4), stl_mi(4) Guide to Preparing Product Kits invcutter(1)
All times are GMT -4. The time now is 03:19 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy