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...

Show 2 ways to convert a date from YYMMDD to MMDDYY (MULT operation not acceptable)

Answer Posted / sanjeet kumar

1)CVTDAT() DATE() RTNVAR() FROMFMT() TOFMT()

Source code is required to convert from one date format to another date format.

The source code in CLP is given below:

PGM
DCL VAR(&VAR1) LENGTH(6) TYPE(*CHAR) VALUE('YYMMDD')
DCL VAR(&RCVD) LENGTH(6) TYPE(*CHAR)
DCL VAR(&VAR2) LENGTH(4) TYPE(*CHAR)
DCL VAR(&VAR3) LENGTH(2) TYPE(*CHAR)
CHGVAR VAR(&VAR2) VALUE(%SST(&VAR1 3 4))
CHGVAR VAR(&VAR3) VALUE(%SST(&VAR1 1 2))
CHGVAR VAR(&RCVD) VALUE(&VAR2 *CAT &VAR3)
SNDMSG MSG(&RCVD) TOUSR(*USRPRF)
ENDPGM

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

can a indexed file be accessed in arrival sequence in rpg program?

1723


What are the types of data structure in as400?

1092


which of the cl command can be used to determine which logical files are dependent on a specific file?

1143


what is the difference between udate and the system date?

2186


how many printer files maximum can be used in single rpg program?

1234


explain the purpose of keep and assume keywords?

1878


is there any way I can ease my rpg controls on numeric input fields? How about an input date field?

1167


which cl command is used to trap error messages during program execution?

1520


how many files can be defined in f specs?

2467


what is a keyed physical file?

1903


how would you design the process for a nightly, high volume check producing process that needs to select only records that are flagged to be processed?

1692


Write a logic program for knowing the repeated number of a vowels in a given program?

3796


how will you search an array?

1141


What is the Difference between command attention key and command function key ?

1429


what opcode will be used to test the zone of a character field?

1837