Sponsored Content
Full Discussion: Datatype file validation
Top Forums Shell Programming and Scripting Datatype file validation Post 302818975 by katakamvivek on Monday 10th of June 2013 03:07:46 AM
Old 06-10-2013
Datatype file validation

Code:
 
I have a sourcefile which contains data as below.I want to check whether datatype,structure and date format looks good as mentioned. 
Data is delemited by cydila  .
 
Source file-Emp.txt
sno name   phoneno  dept joineddate
1   vivek  0861     CSE  2013-05-29 00:00:00
2   dinesh 123456   ECE  2013-05-29 00:00:00
3   sai    78945    EEE  2013-05-29 00:00:00
4   sridar 45612    IT   2013-05-29 00:00:00
 
Defination of emp.txt file.
column name datatype format
sno number(2)
name varchar(20)
phoneno number(10)
dept varchar(20)
joineddate date yyyy-mm-dd hh:mm:ss
 
Please suggest me which command should use to check whether datatype,structure and date format is correct.

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

File Validation

Hi All, I am new to UNIX scripting. I need to validate a file. I need to check whether the file has a header , detail records and footer. If all the file is good I need to create a status file with the status 'Y' else 'N'. I have pasted the an example of the file below: ... (5 Replies)
Discussion started by: kumar66
5 Replies

2. Programming

How to get the size of the datatype passed as the command line argumet?

#include <stdio.h> int main(int argc, char *argv) { printf("%d\n", sizeof(argv)); return 0; } when I run the executable a.out after compiling the above program as: a.out short (or) a.out "long double", I expected to get the output as 2 and 12, but I am always getting the size of... (2 Replies)
Discussion started by: royalibrahim
2 Replies

3. Shell Programming and Scripting

File Name Validation

Hi All, I am trying to validate the file name against the naming convention mentioned in configuration file. In the configuration file, the file name convention is mentioned as: Myfile_SQ<NN>_<NN>_YYYYMMDD_HHMMSS.xml The actual file received is Myfile_SQ10_30_20110423_073002.xml How do... (1 Reply)
Discussion started by: angshuman
1 Replies

4. Shell Programming and Scripting

File validation

Hello, File contains 1,3 and 5 are required columns. it's working use this command. awk -F\| '$1 && $3 && $5' test1.txt > test2.txt How can use this unix programming.while using runnign this scirpt,it's raising the error. awk: ^ syntax error #!/usr/bin/ksh `awk -F\| '$1 &&... (3 Replies)
Discussion started by: bammidi
3 Replies

5. Shell Programming and Scripting

XML file validation

Hi, i am new to unix script. i have two xml files. one is orderinfo.xml and another one is xsd file(EmailMessage.xml). we need to compare the both file for poper nodes exists are not. for example: <xsd:element name="EmailMessage"> tag in the EmailMessage.xml file(xsd sheet),this tag... (2 Replies)
Discussion started by: bmk
2 Replies

6. Shell Programming and Scripting

Help with separating datatype, column name

Hi All, I am new to unix but have a requirement wherein I need to separate datatype,length, and column name from input file which is of below format -- record integer(10) empid; string(25) name; date("YYYY-MM-DD") dob; decimal(10) salary; end now after getting datatype,its length and... (4 Replies)
Discussion started by: phoenix09
4 Replies

7. Shell Programming and Scripting

File validation

Hi there, As a part of file validation, I needed to check for delimiter count in the file. My aim is to find, how many records have failed to have predefined numbers of delimiters in the file. My code looks like below i=`awk -F '|' 'NF != 2 {print NR, $0} ' ${pinb_fldr}/${pfile}DAT |... (3 Replies)
Discussion started by: anandapani
3 Replies

8. Programming

Understanding C++ template partial specialization with pointer datatype arguments

When I compile the below code, I am getting error as template<typename T> T AddFun(T i, T j) { return i + j; } template<> T* AddFun<T*>(T* i, T* j) { return new T(*i + *j); } int main() { int n = AddFun<int>(10, 20); int i = 10, j = 20; int* p = AddFun<int*>(&i,... (1 Reply)
Discussion started by: royalibrahim
1 Replies

9. Shell Programming and Scripting

Datatype and length validation

I have sourcefile and structure of source file,i want to check whether datatype and length mention in emp.txt is same as source file. Example: in emp.txt first row contains sno number so in source file also first column should contain only number if data is other than number then that... (1 Reply)
Discussion started by: katakamvivek
1 Replies

10. Shell Programming and Scripting

Datatype,structure and dateformat checking.

I have a sourcefile which contains data as below.I want to check whether datatype,structure and date format looks good as mentioned. Data is delemited by cydila Ç. Source file-Emp.txt snoÇnameÇphonenoÇdeptÇjoineddate 1ÇvivekÇ0861ÇCSEÇ2013-05-29 00:00:00 2ÇdineshÇ123456ÇECEÇ2013-05-29 00:00:00... (8 Replies)
Discussion started by: katakamvivek
8 Replies
Callback Functions(3)						globus gsi callback					     Callback Functions(3)

NAME
Callback Functions - Typedefs typedef int(* globus_gsi_extension_callback_t )(globus_gsi_callback_data_t callback_data, X509_EXTENSION *extension) Get callback data index from X509_STORE globus_result_t globus_gsi_callback_get_X509_STORE_callback_data_index (int *index) Get callback data index from SSL structure globus_result_t globus_gsi_callback_get_SSL_callback_data_index (int *index) Certificate verify wrapper int globus_gsi_callback_X509_verify_cert (X509_STORE_CTX *context, void *arg) Independent path validation callback. int globus_gsi_callback_create_proxy_callback (int preverify_ok, X509_STORE_CTX *x509_context) SSL path validation callback. int globus_gsi_callback_handshake_callback (int preverify_ok, X509_STORE_CTX *x509_context) OpenSSL X509_check_issued() wrapper int globus_gsi_callback_check_issued (X509_STORE_CTX *context, X509 *cert, X509 *issuer) Detailed Description Functions that plug into various plug points in the OpenSSL path validation mechanism. These functions add CRL checking, X509 Extension handling and proxy validation. Typedef Documentation typedef int(* globus_gsi_extension_callback_t)(globus_gsi_callback_data_t callback_data, X509_EXTENSION *extension) Typedef for a callback that may be registered for dealing with unhandled X.509 extension. Function Documentation globus_result_t globus_gsi_callback_get_X509_STORE_callback_data_index (int *index) Retrieve or create the index for our callback data structure in the X509_STORE. Parameters: index Will contain the index upon return Returns: GLOBUS_SUCCESS unless an error occurred, in which case, a globus error object ID is returned globus_result_t globus_gsi_callback_get_SSL_callback_data_index (int *index) Retrieve or create the index for our callback data structure in the SSL structure. Parameters: index Will contain the index upon return Returns: GLOBUS_SUCCESS unless an error occurred, in which case, a globus error object ID is returned int globus_gsi_callback_X509_verify_cert (X509_STORE_CTX *context, void *arg) This function wraps the OpenSSL certificate verification callback for the purpose of a replacing the standard issuer check with one that deals with proxy certificates. Should be used with SSL_CTX_set_cert_verify_callback() Parameters: context The X509_STORE_CTX for which to register the callback. arg Arguments to the callback. Currently ignored. Returns: 1 on success 0 on failure int globus_gsi_callback_create_proxy_callback (intpreverify_ok, X509_STORE_CTX *x509_context) This function provides a path validation callback for validation outside of a SSL session. It should be used in X509_STORE_set_verify_cb_func(). Parameters: preverify_ok Communicates the result of default validation steps performed by OpenSSL x509_context The validation state object Returns: 1 on success 0 on failure int globus_gsi_callback_handshake_callback (intpreverify_ok, X509_STORE_CTX *x509_context) This function provides a path validation callback for the validation part of establishing a SSL session. It handles proxy certificates, X509 Extensions and CRL checking. It should be used in SSL_CTX_set_verify(). Parameters: preverify_ok Communicates the result of default validation steps performed by OpenSSL x509_context The validation state object. Returns: 1 on success 0 on failure int globus_gsi_callback_check_issued (X509_STORE_CTX *context, X509 *cert, X509 *issuer) This function wraps the OpenSSL X509_check_issued() call and catches the error caused by the fact that a proxy certificate issuer may not have to have the correct KeyUsage fields set. Parameters: context The validation state object. cert The certificate to check issuer The issuer certificate to check Returns: 1 on success 0 on failure Author Generated automatically by Doxygen for globus gsi callback from the source code. Version 4.2 Mon Apr 30 2012 Callback Functions(3)
All times are GMT -4. The time now is 04:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy