Sponsored Content
Operating Systems Linux Red Hat Parsing a linux file and formatting it. Post 302492823 by charithainfadev on Tuesday 1st of February 2011 04:47:31 PM
Old 02-01-2011
Hi, Now I got a new problem. If the file is small this is working fine. But If I get all the data from production, its not working.
There are just 1300 records that get loaded into this flat file from production with 2 fields, one is varchar2(15 byte) and the other is CLOB field. But this awk command is truncating the file to contain only 140- 150 records instead of 1300 records in it. Please let me know what could be done for this?

---------- Post updated at 04:16 PM ---------- Previous update was at 04:11 PM ----------

Sorry! small correction.
I get 40,000 records into this file from production out of which I just have to capture only those records that contain data in the CLOB field. I can filter out the records for which CLOB field is null. So that would be 1300 records out of 40,000. I tried to filter like this.
HTML Code:
awk 'length > 16' <in-file> out-file
But any kind of awk command is truncating the table to just contain 140 records. I need to push this to production today. But unfortunately I got stuck here. I need help real quick please! Smilie

---------- Post updated at 04:47 PM ---------- Previous update was at 04:16 PM ----------

Hey I solved this problem for now. I gave a sql override in informatica to fetch only those records from the database for which the CLOB field is not null. But, in the future, if I have to fetch thousands and thousands of records, then I will be facing this problem again. So, I would appreciate any kinds of suggestions on this situation. Thanks in advance. Smilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Parsing of file for Report Generation (String parsing and splitting)

Hey guys, I have this file generated by me... i want to create some HTML output from it. The problem is that i am really confused about how do I go about reading the file. The file is in the following format: TID1 Name1 ATime=xx AResult=yyy AExpected=yyy BTime=xx BResult=yyy... (8 Replies)
Discussion started by: umar.shaikh
8 Replies

2. Solaris

Linux partitioned disk mounted on OSOL without formatting

Hello and Merry Christmas... Quick question after tireless search around the web. Description: I have a WD My book world edition II that met an untimely death. However the 2 SATA disks inside seem to be working just fine. Want to add either one of them to my Solaris Desktop. Since I... (5 Replies)
Discussion started by: michnmi
5 Replies

3. UNIX for Dummies Questions & Answers

Parsing linux commands through FTP

Hi Techies, I have made a shell script which stores the output of it in a text file. then i wanted to fetch that text file using windows scheduler in my windows xp desktop which i did successfully using the below mentioned ftp .bat file : @echo off @echo ftp_user>ftp_test.scr @echo... (0 Replies)
Discussion started by: gemnian.g
0 Replies

4. Shell Programming and Scripting

Formatting file data to another file (control character related)

I have to write a program to read data from files and then format into another file. However, I face a strange problem related to control character that I can't understand and solve. The source file is compose of many lines with such format: T_NAME|P_NAME|P_CODE|DOCUMENT_PATH|REG_DATE ... (3 Replies)
Discussion started by: hk6279
3 Replies

5. Shell Programming and Scripting

Help - Parsing data in XML in Linux

Hi, I have an XML file in Linux and it contains a long string of characters. The last part of the file is like ....... ....... ....... CAD</MarketDescription></InvestorTransaction></AdvisorAccount></DivisionAdvisor></Division>... (3 Replies)
Discussion started by: naveed
3 Replies

6. Shell Programming and Scripting

Formatting a file

Hi Experts I have a file which looks as follows acttest /report/fieldsinf/acttest/LIVE/acttest Chris New teatin1 /report/fieldsinf/eatin1/TEST/teatin1 Chris New eatin1 /report/fieldsinf/eatin1/LIVE/eatin1 Chris New tbectest ... (7 Replies)
Discussion started by: maverick_here
7 Replies

7. UNIX for Dummies Questions & Answers

Formatting data in a raw file by using another mapping file

Hi All, i have a requirement where i need to format the input RAW file ( which is CSV) by using another mapping file(also CSV file). basically i am getting feed file with dynamic headers by using mapping file (in that target field is mapped with source filed) i have to convert the raw file into... (6 Replies)
Discussion started by: ravi4informatic
6 Replies

8. Shell Programming and Scripting

Specific string parsing in Linux/UNIX

Hi, I have a string which can be completely unstructred. I am looking to parse out values within that String. Here is an example <Random Strings> String1=<some number a> String2=<some number b> String3=<some number c> Satish=<some number d> String4=<some number e> I only want to parse out... (1 Reply)
Discussion started by: satishrao
1 Replies

9. Shell Programming and Scripting

Table like formatting in Linux

Dear experts, I need bit help in formatting .. I have csv file file , i will read that file by passing one column value as input parameter and display header row and corresponding row for that parameter. I have shell script like this: #!/bin/bash #key_word_I_am_looking_for=$1 #awk... (16 Replies)
Discussion started by: onenessboy
16 Replies

10. Shell Programming and Scripting

Parsing syslog from Linux

Hello, I'm facing problem to extract fields from below syslog : logver=56 idseq=63256900099118326 itime=1563205190 devid=FG-5KDTB18800138 devname=LAL-C1-FGT-03 vd=USER date=2019-07-15 time=18:39:49 logid="0000000013" type="traffic" subtype="forward" level="notice" eventtime=1563205189... (17 Replies)
Discussion started by: arm
17 Replies
FBSQL_CREATE_CLOB(3)							 1						      FBSQL_CREATE_CLOB(3)

fbsql_create_clob - Create a CLOB

SYNOPSIS
string fbsql_create_clob (string $clob_data, [resource $link_identifier]) DESCRIPTION
Creates a CLOB from the given data. PARAMETERS
o $clob_data - The CLOB data. o $ link_identifier -A FrontBase link identifier returned by fbsql_connect(3) or fbsql_pconnect(3).If optional and not specified, the function will try to find an open link to the FrontBase server and if no such link is found it will try to create one as if fbsql_connect(3) was called with no arguments. RETURN VALUES
Returns a resource handle to the newly created CLOB, which can be used with insert and update commands to store the CLOB in the database. EXAMPLES
Example #1 fbsql_create_clob(3) example <?php $link = fbsql_pconnect("localhost", "_SYSTEM", "secret") or die("Could not connect"); $filename = "clob_file.txt"; $fp = fopen($filename, "rb"); $clobdata = fread($fp, filesize($filename)); fclose($fp); $clobHandle = fbsql_create_clob($clobdata, $link); $sql = "INSERT INTO CLOB_TABLE (CLOB_COLUMN) VALUES ($clobHandle);"; $rs = fbsql_query($sql, $link); ?> SEE ALSO
fbsql_create_blob(3), fbsql_read_blob(3), fbsql_read_clob(3), fbsql_set_lob_mode(3). PHP Documentation Group FBSQL_CREATE_CLOB(3)
All times are GMT -4. The time now is 02:09 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy