Search Results

Search: Posts Made By: pchang
566
Posted By pchang
Thank you to Nezabudka and Rudi C for your...
Thank you to Nezabudka and Rudi C for your inputs.

After doing some additional testing, here's the final code after some tweaking:


awk '
NR==FNR {pat[$1] = $2
next
...
566
Posted By pchang
Hi nezabudka. This is an external file that...
Hi nezabudka.

This is an external file that we receive from a third party vendor and there's no guarantee that we will always have a space in between the fields (so NF-4 might not always work...
566
Posted By pchang
Thanks nezabudka for your response. Your code...
Thanks nezabudka for your response. Your code yielded a very close results - only thing is that the update column value is not 12 bytes long (like the original).

Also, if I read your code...
566
Posted By pchang
Replace one column from fixed width file with another column from another file
Hi Forum.

I tried to search online for the solution but most of the examples I found the data that I'm trying to manipulate doesn't quite match (col pos#134, 12 bytes) and my code is not working...
314
Posted By pchang
Search and replace value based on certain conditions in a fixed width file
Hi Forum.

I tried searching for a solution using the internet search but I haven't been able to find any solution for what I'm trying to accomplish.

I have a fixed width column file where I...
882
Posted By pchang
Awesome!!
Thanks to both Stomp and vgersh99 for spending your time and helping me out. This latest awk code works magically great and the results obtained are as expected:


awk '
/<accountHolderName/...
882
Posted By pchang
Thank you very much vgersh99. Your code...
Thank you very much vgersh99.

Your code works great for all scenarios.

------ Post updated at 05:19 PM ------

Hi vgersh99.

Sorry to bother you again - My data requirement has changed...
882
Posted By pchang
Sorry vgersh99 - the above awk code did not...
Sorry vgersh99 - the above awk code did not return any records - Please have a look.

myXMLfile contains the following good representative data:

<?xml version="1.0" encoding="UTF-8"...
882
Posted By pchang
Hi Stomp. I realize that the order of tags...
Hi Stomp.

I realize that the order of tags does not matter but unfortunately we are building the XML file for an external client and they are requesting that the <AdditionalAccountHolders> info...
882
Posted By pchang
My XML file will contain many records - some...
My XML file will contain many records - some records will have no holder records and some records may have 1 to 3 holder records.
882
Posted By pchang
Hi vgersh99. Thank you for the awk code...
Hi vgersh99.

Thank you for the awk code suggestions. I tried both of your codes with 2 records in my XML file:

1) code#1 doesn't return any records
2) code#2 does return records but it's...
882
Posted By pchang
Moving XML tag/contents after specific XML tag within same file
Hi Forum.

I have an XML file with the following requirement to move the <AdditionalAccountHolders> tag and its content right after the <accountHolderName> tag within the same file but I'm not sure...
893
Posted By pchang
I'm guessing it's between informatica and...
I'm guessing it's between informatica and Windows.

We are not using cygwin (or running any type of scripts) against the file once it has been generated.
893
Posted By pchang
Hi RudiC. We are running our informatica...
Hi RudiC.

We are running our informatica application using Windows Server 2012 R2 OS.

The windows locale is defined as the following:

Current language for non-Unicode programs:

English...
893
Posted By pchang
Thanks for all of your replies. We are using...
Thanks for all of your replies.

We are using an ETL tool (informatica) to generate the file. Codepage is currently MS Windows Latin 1 and there are other codepages we can select from.

Not sure...
893
Posted By pchang
Hope this helps - Thanks.
0000000 3830 3036 4e4c 4d41 3130 6f54 2a6d 7242
0000020 776f 206e 2020 2020 2020 2020 2020 2020
0000040 2020 2020 2020 2020 2020 2020 2020 3920
0000060 3939 3939 3939 3939 2020 2020 2020 2020...
893
Posted By pchang
Shifting of data because of special characters
Hi Forum.

I have a unique problem that I'm hoping someone can assist me.

I'm generating a fixed width file and one of the output column (person_name at col. pos.#483 defined as string(36)...
4,038
Posted By pchang
awk gsub command to replace multiple spaces
Hi Forum.

I'm trying to cleanup the following data elements (To remove any occurences of commas and any extra spaces) while preserving the <TAB> delimiter using awk gsub but I have not been...
1,263
Posted By pchang
Hi Scrutinizer. Thank you for the code...
Hi Scrutinizer.

Thank you for the code suggestion. I tried your code above with the input_file.txt attached but I didn't get any data in the output file.

This is what I executed:


awk -v...
1,263
Posted By pchang
Hi RudiC. If you look at position 33, there...
Hi RudiC.

If you look at position 33, there are 3 different types of segments (UK, UX, CU).

That's why we cannot process the source file as is since each segment can have different data...
1,263
Posted By pchang
Data Sample
Sure can. Thanks.

LF is on the 2nd record (After bolded red text)


00003061895700000000208001X...
1,263
Posted By pchang
awk issue splitting a fixed-width file containing line feed in data
Hi Forum.

I have the following script that splits a large fixed-width file into smaller multiple fixed-width files based on input segment type.

The main command in the script is:

awk -v...
Forum: Linux 02-14-2017
1,985
Posted By pchang
How to change ODBC Driver Manager?
Hi Forum.

I have been searching this information for a while but to no avail.

I'm running the following command odbcinst -j on a Linux box and get the following:


unixODBC 2.3.0...
848
Posted By pchang
Hi Ravinder. it looks like this code works...
Hi Ravinder.

it looks like this code works too.

Thanks for providing additional code option.
848
Posted By pchang
Thank you guys - I will try your suggested code.
Thank you guys - I will try your suggested code.
Showing results 1 to 25 of 128

 

Featured Tech Videos

All times are GMT -4. The time now is 06:14 AM.
Unix & Linux Forums Content Copyright 1993-2020. All Rights Reserved.
Privacy Policy