Validate input files and update


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Validate input files and update
# 1  
Old 04-01-2013
Validate input files and update

We have a job which we need to run on daily bases, before loading data in a table we need to validate whether the input file is received or not.Inputfile formatsrc_sps_d_Call_Center_Reporting_yyyymmdd_01.dat SPS-Service nameYYYY-yearMM-MonthDD-dayLike above we will get n number of files for different services.SS_list.txt File contains data like below1)SPS2)OCWEN3)XYZ Ss_load_proc_day tableS_servicer_code Load_Date File_Recv_D1 File_Recv_D2SPS TUE MON FRISPS Wed Tue SPS Thu Wed SPS Fri Thu SS_Calendar tableS_Servicer_code Date No_File_Receive_Day ( etc) Month_EndSPS 3/29/20013 N YSPS 4/1/2003 Y NOCWEN 4/1/2003 N NXYZ 3/30/20013 N N1. Take one sub servicer vendor name from SS_List.txt and perform #2  #6Check ../SrcFiles , if file for this vendor available today  src_sps_d_Call_Center_Reporting_yyyymmdd_01.dat 2. If Yes, start from #13. Else , Check if load date(currentday) for this vendor is No_File_Receive_Day in SS_Calendar table4. If Yes, start from #15. If Not, Send File missing ALERT with file name.1. Take one sub servicer vendor name from SS_List.txt and perform #2  #42. append VendorName-Day ( viz ‘SPS-TUE'). Check SS_Procday.txt for any entry. If Not* start #13. If Yes, Get the days ( MON, FRI ); Check all the received files' Proc_Dates (embedded in file name) They should match. 4. If missing any, Send ALERT with file names. If the source file exist then it should update output file name as Yes else No

Last edited by katakamvivek; 04-01-2013 at 06:37 AM..
# 2  
Old 04-01-2013
Please make you post legible or this thread will be closed...
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Input form to update configuration files

Hi I'd like to know in which direction I should go for this. Background: We have a Raspberry PI terminal which connects via XTerm to a telnet session. Openbox is the window manager(default). We have stripped down most of the unwanted apps that come with Rasparian except for browser which we... (2 Replies)
Discussion started by: majikins
2 Replies

2. Shell Programming and Scripting

Validate input files daily

We have a job which we need to run on daily bases, before loading data in a table we need to validate whether the input file is received or not. Daily client will place the files in a particular path.Below files which I need to process for 04/01/2013(Load date).... (2 Replies)
Discussion started by: katakamvivek
2 Replies

3. Shell Programming and Scripting

How to validate user's input..?

$Input_filename=$ARGV; if (!-d $Input_filename && ! -e $Input_filename) { print "USAGE: Please enter '$ABCD/def/dsed.txt' as an arguement \n"; exit; } 1. Input Is suppose to be something like "$ABCD/def/dsed.txt". if the input is wrong the script should throw an ERROR message.... (2 Replies)
Discussion started by: Rashid Khan
2 Replies

4. Shell Programming and Scripting

Epic - Validate input size

Is there an easy way to validate an input field size. Let us say a script is asking to enter 10 digits mobile number, how do I write a script to validate it is numeric and is 10 digits in length? I just need an easy way w/o using looks ...etc. Is there such a away ? Here is what I have so far... (6 Replies)
Discussion started by: mrn6430
6 Replies

5. Shell Programming and Scripting

Another validate input Question.

I'm writing a bash shell script to 'help' me post to susepaste (I can NEVER remember the time options). Here's the code: #!/bin/bash ########## # # Project : personal script. # Started : Wed Aug 03, 2011 # Author : Habitual # Description : susepaste c-li script with user... (5 Replies)
Discussion started by: Habitual
5 Replies

6. Shell Programming and Scripting

How to validate input parameters?

Hi, I wonder how I can know if the input parameters to the script are numbers or text Thanks (11 Replies)
Discussion started by: Gengis-Kahn
11 Replies

7. Shell Programming and Scripting

Validate and sort input

Hi, This will most likely be a simple answer. Currently I have a situation where my script will be sent various options: -o1 -o2 -oe3@somthing.com Now, if I want to run a certain command based on the option I am sent, I am doing the following. for o in $(echo $options) do if ... (3 Replies)
Discussion started by: stuaz
3 Replies

8. UNIX for Dummies Questions & Answers

BASH validate user input

Hey, im trying to validate a user input and need some help. The input needs to be just a single letter. Im using a case to so this eg: read answer case $answer in *) echo "OK" ;; *) echo "This is a number" read answer ;; *) echo... (2 Replies)
Discussion started by: 602chrislys
2 Replies

9. Shell Programming and Scripting

validate input

the user inputs names that have to be inside square brackets I want to check if the user puts the brackets and if not ask him to re-enter the names (9 Replies)
Discussion started by: DDoS
9 Replies

10. Shell Programming and Scripting

How to validate input values

Hi How would i validate value of a variable whether it is number,date or string Thanks in advance Sas (5 Replies)
Discussion started by: SasDutta
5 Replies
Login or Register to Ask a Question