Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

I want to add 10 days in current date. how it is possible in
CL program...?

Answer Posted / chandrababu

We can add 10 days to current date as below..

DCL VAR(&DAY) TYPE(*CHAR) LEN(2)
DCL VAR(&D1) TYPE(*DEC) LEN(2)
DCL VAR(&MONTH) TYPE(*CHAR) LEN(2)
DCL VAR(&YEAR) TYPE(*CHAR) LEN(2)


RTVSYSVAL SYSVAL(QDAY) RTNVAR(&DAY)
RTVSYSVAL SYSVAL(QMONTH) RTNVAR(&MONTH)
RTVSYSVAL SYSVAL(QYEAR) RTNVAR(&YEAR)
SNDUSRMSG MSG(&DAY *CAT &MONTH *CAT &YEAR)
CHGVAR &D1 &DAY
CHGVAR &D1 (&D1 + 10)
CHGVAR &DAY &D1
SNDUSRMSG MSG(&DAY *CAT &MONTH *CAT &YEAR)

Also you can covert this date by using CVTDAT to any date format you like...

Is This Answer Correct ?    4 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How would display prime numbers using CL program?

6251


How can we override a file during runtime in rpg?

1140


How Chain operation copies the record's data to the input buffer for the program?

1537


Suppose we have one database file and it is used by 5 programs and in 3 program we have to add some records in datbase file s what is the impact on other program?

1868


what are the key words you must use when using a subfile?

1100


if there is a module object , how to find the program object for this module object.Assume the module object name and program object name is not same.

2580


what is the procedure and explain about real time scenario.

1891


How to handle duplicate error handling in RPG?

2228


What is the diff bw PF/LF Name and their Record format name? what is restriction in record format then file name?

2945


Program to read marks of 10 students for 4 subjects and compute and display total marks and status of each student in rpg

1095


what is the necessary keyword needed to scroll subfile records?

1103


What is difference between bind by copy and bind by reference?

2396


during execution, an rpg/400 program automatically follows a sequence of operations for each record that is processed. The built-in program cycle includes the following logical steps.

1149


What are the types of identifiers?

971


1. What is bound-by-call and bound-by-reference? 2. Where and why is *Nomain used? 3. What are the difficulties faced by programmers when using service programs? 4. Explain the different ways of parsing and compiling XML in iSeries.

6370