Sponsored Content
Full Discussion: calculate 13 months ago
Top Forums Shell Programming and Scripting calculate 13 months ago Post 302146569 by andrea_mussap on Wednesday 21st of November 2007 07:34:12 AM
Old 11-21-2007
re.: calculate 13 months ago

hi, thanks 4 the answers, but I could resolve in a better simple way :

in my main program I did :
.
.
.
hoje=`date +%Y%m%d`
data_13m=`expr ${hoje} - 10200`

export PAR_SCL3=${data_13m}

EXECUTA "sortcl /sp=${DIR_PROG_SCL}/saida_13meses.scl" \


and in the saida_13meses.scl I did :

/EXECUTE "$PAR_SCL3"
/INFILE=$PAR_SCL1
/FIELD=(CONTA_CORRENTE, POSITION=1, SIZE=13)
/FIELD=(NUMERO_FATURA, POSITION=14, SIZE=14)
/FIELD=(DATA_VENCIMENTO, POSITION=50, SIZE=10)
/CONDITION=(cond1, TEST=(DATA_VENCIMENTO > $PAR_SCL3 ))
/INCLUDE=(CONDITION=cond1)

bye
Smilie
 

6 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

deleting files with dates 3 months ago

please help me with this????? :confused: :confused: i need to create a program that will run in unix that will delete all files in a given directory that is at least 3 months old. first the program will need to automatically know what date it is right now to determine the files it will... (3 Replies)
Discussion started by: godalle
3 Replies

2. Shell Programming and Scripting

Cron to run first day of month to calculate date 3 months ago

Hi, I would like to find out how can i calculate a date which is 3 months ago. I intend to run a cron job on the 1st of every month, and calculate the month 4 months earlier from the date. For example, if today's date is 1st May 2007, i would like to return 012007( January 2007). i can get... (1 Reply)
Discussion started by: new2ss
1 Replies

3. Shell Programming and Scripting

calculate 13 months ago

hi, I have a big file that contains datas since 4 years ago. I need re-create this file but just lines that are 13 months ago from today. see what I have: ( I have a file.ksh that calls this file.scl ok !!) ======== file.scl ================ /STATISTICS=stderr /STABLE /NODUPLICATES... (3 Replies)
Discussion started by: andrea_mussap
3 Replies

4. Shell Programming and Scripting

how to calculate the time 10 mins ago?? unix

Hi guys, Im trying to subtract time in ksh script. i.e. basically im querying a database and i want to get the time 10mins before hand..(from) in ksh CurrMin=$(date "+%M") from=`expr $CurrMin - 10` to=$CurrMin however if i run this i say at 2 or 3 mins past the hour, i.e.... (7 Replies)
Discussion started by: k00061804
7 Replies

5. Shell Programming and Scripting

How to calculate months and display in shell scripting

I just want to know, how do we calculate the months in shell scripting. If i give the input as 20-01-2011, the output should be 20-02-2011, 20-03-2011 or 20-04-2011........ How do i get this ? Cheers. (6 Replies)
Discussion started by: sachin24
6 Replies

6. UNIX for Beginners Questions & Answers

How to find a file that's modified more than 2 days ago but less than 5 days ago?

How to find a file that's modified more than 2 days ago but was modified less than 5 days ago by use of any Linux utility ? (4 Replies)
Discussion started by: abdulbadii
4 Replies
zlassq.f(3)							      LAPACK							       zlassq.f(3)

NAME
zlassq.f - SYNOPSIS
Functions/Subroutines subroutine zlassq (N, X, INCX, SCALE, SUMSQ) ZLASSQ Function/Subroutine Documentation subroutine zlassq (integerN, complex*16, dimension( * )X, integerINCX, double precisionSCALE, double precisionSUMSQ) ZLASSQ Purpose: ZLASSQ returns the values scl and ssq such that ( scl**2 )*ssq = x( 1 )**2 +...+ x( n )**2 + ( scale**2 )*sumsq, where x( i ) = abs( X( 1 + ( i - 1 )*INCX ) ). The value of sumsq is assumed to be at least unity and the value of ssq will then satisfy 1.0 .le. ssq .le. ( sumsq + 2*n ). scale is assumed to be non-negative and scl returns the value scl = max( scale, abs( real( x( i ) ) ), abs( aimag( x( i ) ) ) ), i scale and sumsq must be supplied in SCALE and SUMSQ respectively. SCALE and SUMSQ are overwritten by scl and ssq respectively. The routine makes only one pass through the vector X. Parameters: N N is INTEGER The number of elements to be used from the vector X. X X is COMPLEX*16 array, dimension (N) The vector x as described above. x( i ) = X( 1 + ( i - 1 )*INCX ), 1 <= i <= n. INCX INCX is INTEGER The increment between successive values of the vector X. INCX > 0. SCALE SCALE is DOUBLE PRECISION On entry, the value scale in the equation above. On exit, SCALE is overwritten with the value scl . SUMSQ SUMSQ is DOUBLE PRECISION On entry, the value sumsq in the equation above. On exit, SUMSQ is overwritten with the value ssq . Author: Univ. of Tennessee Univ. of California Berkeley Univ. of Colorado Denver NAG Ltd. Date: November 2011 Definition at line 107 of file zlassq.f. Author Generated automatically by Doxygen for LAPACK from the source code. Version 3.4.1 Sun May 26 2013 zlassq.f(3)
All times are GMT -4. The time now is 09:04 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy