Sponsored Content
Full Discussion: File and Data Validation.
Top Forums Shell Programming and Scripting File and Data Validation. Post 302463278 by Savio_Saldanha on Saturday 16th of October 2010 06:22:14 PM
Old 10-16-2010
File and Data Validation.

Hello,
I am working on an interface between a legacy system and an ERP system.The format of the data extracted into the staging folder from the legacy system is a follows.

One control file named ExtractDataControl.txt
Multiple entity files eg R1001.txt, R1002.txt, R1020.txt

The control file has the following information.
a)Entity Name (same as the filename for that entity but without the dot and extension)
b)Number of lines in the Entity extract file.
Pipe is the seperator between a) and b)

Eg of the control file is given below.
R1001|589
R1002|345
R1020|456

I need to validate the following
a) Correct number of entity files are received as mention in the control file.
b) The number of lines receiced in each entity file matches the number of lines mentioned in the control file.

I am having difficulty in reading the control file and then looping through the entity files. Would appreciate any help in this matter.

Forgive my ignorance. I am new to Shell Scripting word.Smilie
Thanks in advance,
Warm Regards,
Savio Saldanha.
 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

awk data validation

Hi , This is a general doubt.... Is there any way to do data validation inside an awk script.. Let me make it more clear.... I have a string variable inside awk script .. Is there any way to check whether it is number or string etc... Thanks in advance. Shihab (1 Reply)
Discussion started by: shihabvk
1 Replies

2. UNIX for Dummies Questions & Answers

Data Validation

Hello, I am trying to use data validation with a program. I have everything else working fine. I just can't figure out what I am doing wrong with the data validation in one of my files. Here is the code: # data validation loop while : do # get input from keyboard ... (2 Replies)
Discussion started by: ericelysia
2 Replies

3. Shell Programming and Scripting

validation of data using filter (awk or other that works...) in csv files

Hello People I have the following file.csv: date,string,float,number,boolean 20080303,abc,1.5,123,Y 20080304,abc,1.2,345,N 20080229,nvh,1.4,098,Y 20080319,ugy,1.9,586,N 20080315,gyh,2.4,345,Y 20080316,erf,3.1,932,N I need to filter the date field where I have a data bigger than I... (1 Reply)
Discussion started by: Rafael.Buria
1 Replies

4. Shell Programming and Scripting

shell script data & time validation

How to validate a date and optionly a time in shell scripting when i get the date and time as pararmeters that sent out with the call of the file? (in my case sh union.sh `first parameter ,second parameter...` (4 Replies)
Discussion started by: tal
4 Replies

5. Shell Programming and Scripting

Data Validation

I have a comma delimited file that I need to validate the data in one two columns in. Sample File: 1234,1234,1234,DESCRIPTION,1,1,2 1234,1234,1234,DESCRIPTION,1,1,2 1234,1234,1234,DESCRIPTION,1,1,2 1234,1234,1234,DESCRIPTION,1,1,2 I need to make sure that the second column's entries are... (3 Replies)
Discussion started by: hmnetonline
3 Replies

6. Shell Programming and Scripting

basic data validation

hpux. older version. don't have alot of the newer features in some utilities. How do I verify that a variable starts with the letter A. I would like to make it case insensitive. Also, if I have a variable that has letters and numbers. I want to change all the lower case letters to upper case.... (2 Replies)
Discussion started by: guessingo
2 Replies

7. Shell Programming and Scripting

Data validation engine

Generic Data validator Data file: Name,Sal,Dept ABC,1234,D1 AYX,12356,D2 DHF,345,ED3 123,4565,FGJG Config File: Delimiter-"," Rule1-Name- Rule2-Sal- Rule3-Dept-* Can be used to match any regex including date different format and numbers. (3 Replies)
Discussion started by: dikesm
3 Replies

8. Shell Programming and Scripting

Help With UNIX Shell Scripting For Data Validation

Hi All, I am completely new to Unix Shell Scripting. I m validating(Basic File Validation) an .HHT file in TIBCO. After that i need to do Data Validation through UNIX Shell scripting. Rules in DataValidation: 1.) Need to Check Every field wheather it is a Char or Number?(Fields are... (1 Reply)
Discussion started by: Chaitanya K
1 Replies

9. Shell Programming and Scripting

Source data validation

I am using below logic to validate whether i am expecting the correct data from source,if not logic should give which column has error.i am running below logic in linux awk -F, ' NR==1{next} {f=" "} $1!~/^{0,5}$|^$/{f=f?f" emp_id-error":"emp_id-error"} $4!~/^{0,6}$|^$/{f=f?f"... (4 Replies)
Discussion started by: katakamvivek
4 Replies
OSPENT(1)							      ospent								 OSPENT(1)

NAME
ospent - Concatenate entities SYNOPSIS
ospent [-Cnrv] [-bbctf] [-Ddirectory] [sysid...] DESCRIPTION
ospent (OpenJade SGML print entity) prints the concatenation of the entities with system identifiers [sysid...] on the standard output. The following options are available: -bbctf Use the BCTF with name bctf for output. -C This has the same effect as in onsgmls(1). -Ddirectory Search directory for files specified in system identifiers. This has the same effect as in onsgmls(1). -n The entity is a non-SGML data entity. This option forces the octets in the storage objects comprising the entity to be copied exactly without any of the conversions that are done for text entities. Implies -r. -r Raw output. Don't perform any conversion on RSs and REs when printing the entity. The entity would typically have the storage man- ager attribute records=asis. -v Print the version number. SEE ALSO
onsgmls(1), openjade(1) AUTHORS
James Clark, Ian Castle <ian.castle@looksystems.co.uk>. OpenJade January 2002 OSPENT(1)
All times are GMT -4. The time now is 08:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy