Modifying your C++ program would be a LOT faster, but the following seems to work for small a sample data file I created:
Since it invokes dd twice for each record found in your input file, it will be SLOW, but it seems to get the job done. (Of course, you'll have to add the missing record types and assign the correct lengths for the other record types; you only given us the sizes for record types 01 and 02. The code above assumes that you want to include the record type and the data (but not the padding from the end of the input records) in the output files.
-Hi, I have a problem with parcing/spliting a file record into two parts and assigning the split parts to two viriables. The record is as follows:
ftrn facc ttrd feed xref fsdb fcp ruldb csdb omom fordr ftxn fodb fsdc texc oxox reng ttrn ttxn fqdb ... (5 Replies)
Hi
I receive a mainframe file which has very long records (1100 chars) with no field delimiters. I need to parse each record and output a comma delimited (csv) file. The record layout is fixed. If there weren't so many fields and records I would read the file into Excel, as a "fixed width"... (10 Replies)
Hi ,
I have a requirement to split the record based on particular match using UNIX.
Case1:
Input Record :
10.44.48.63;"Personals/Dating;sports";1441
Output Records :
10.44.48.63;Personals/Dating;1441;Original
10.44.48.63;sports;1441;Dummy
Case2:
Input Record : ... (5 Replies)
Hi,
My inputfile contains field separaer is ^.
12^inms^
13^fakdks^ssk^s3
23^avsd^
13^fakdks^ssk^a4
I wanted to print only 2 delimiter occurence i.e
12^inms^
23^avsd^ (4 Replies)
Hello,
I have the following example data file:
Rv.Global_Sk,1077.160523,D,16/09/2011
Rv.Global_Sk,1077.08098,D,17/09/2011
Rv.Global_Sk,1077.001445,D,18/09/2011
Rv.Global_Sk,1072.660733,D,19/09/2011
Rv.Global_Sk,1070.381557,D,20/09/2011
Rv.Global_Sk,1071.971747,D,21/09/2011... (4 Replies)
Hi i want to fetch 100k record from a file which is looking like as below.
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
... (17 Replies)
Hello All,
I have a large file, more than 50,000 lines, and I want to split it in even 5000 records. Which I can do using
sed '1d;$d;' <filename> | awk 'NR%5000==1{x="F"++i;}{print > x}'Now I need to add one more condition that is not to break the file at 5000th record if the 5000th record... (20 Replies)
I have a EBCDIC multi layout file which has a header record which is 21 bytes, The Detail records are 2427 bytes long and the trailer record is 9 bytes long.
Is there a command to remove the header as well as trailer record and read only the detail records while at the same time not altering... (1 Reply)
Hi,
I have received a file which is 20 GB. We would like to split the file into 4 equal parts and process it to avoid memory issues.
If the record delimiter is unix new line, I could use split command either with option l or b.
The problem is that the line terminator is |##|
How to use... (5 Replies)
Discussion started by: Ravi.K
5 Replies
LEARN ABOUT OSF1
invcutter
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)