Unix Technical Forum

Need Explanation

This is a discussion on Need Explanation within the Informix forums, part of the Database Server Software category; --> These are informix/4GL lines. I am writing equivalent perl code Can anyone explain me what this code performs sdate ...


Go Back   Unix Technical Forum > Database Server Software > Informix

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-19-2008, 07:22 PM
Kaladhaur Palaniappa
 
Posts: n/a
Default Need Explanation

These are informix/4GL lines. I am writing equivalent perl code

Can anyone explain me what this code performs

sdate be any date
------------------

let mnth = month(sdate)
let yr = year(sdate)
# let edatec = mnth using "&&", "/01/", yr using "&&&&"
let edate = edatec
# let edate = extend(edate) + 1 units month - 1 units day

I have problems on how to translate to Perl on # marked lines

Kaladhaur
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-19-2008, 07:22 PM
Paul Watson
 
Posts: n/a
Default Re: Need Explanation

Kaladhaur Palaniappa wrote:
>
> These are informix/4GL lines. I am writing equivalent perl code
>
> Can anyone explain me what this code performs
>
> sdate be any date
> ------------------
>
> let mnth = month(sdate)
> let yr = year(sdate)
> # let edatec = mnth using "&&", "/01/", yr using "&&&&"


Give me a full first of the month date based on mnth and yr

> let edate = edatec
> # let edate = extend(edate) + 1 units month - 1 units day


Set edate to the end of the next month

>
> I have problems on how to translate to Perl on # marked lines
>
> Kaladhaur


--
Paul Watson #
Oninit Ltd # Growing old is mandatory
Tel: +44 1436 672201 # Growing up is optional
Fax: +44 1436 678693 #
Mob: +44 7818 003457 #
www.oninit.com #
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-19-2008, 07:22 PM
Art S. Kagel
 
Posts: n/a
Default Re: Need Explanation

On Thu, 07 Aug 2003 05:46:45 -0400, Kaladhaur Palaniappa wrote:

Paul's explanation of the lines beginning with '#' is correct but you
should note that those are comments. The '#' character comments out the
following characters to the end of the line in 4GL.

Art S. Kagel

> These are informix/4GL lines. I am writing equivalent perl code
>
> Can anyone explain me what this code performs
>
> sdate be any date
> ------------------
>
> let mnth = month(sdate)
> let yr = year(sdate)
> # let edatec = mnth using "&&", "/01/", yr using "&&&&"
> let edate = edatec
> # let edate = extend(edate) + 1 units month - 1 units day
>
> I have problems on how to translate to Perl on # marked lines
>
> Kaladhaur

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:28 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com