how to convert date format from one format to another i think
in CL/400 its CVTDAT,Please tell in RPG/400 sir not in RPGILE
Answers were Sorted based on User's Feedback
Answer / keshar
IN RPG using DS we can change date format. For example go
through the link
http://tutorialindia.com/articles/as400/ile_rpg_iv_data_stru
cture_for_date_format_conversion.php
Another method is to convert date into another format is
MOVE command.
In MOVE command we can specify date format. But one should
take care about compatibility.
example:
*mdy MOVE field DATE
Also we can use %date inbuilt function to change character
into date. So use %date in this way:
1. First convert date1 into character using %char.
2. then use %date to convert into desirable date format.
syntax:
%DATE{(expression{:date-format})}
%date also use to fetch system date.
| Is This Answer Correct ? | 2 Yes | 1 No |
Answer / narmatha
In ds1 we can initialize one fmt.. after tat in ds2, int
another fmt. by using move opc we can move 1 fmt to another
fmt.. eg:
I DS1 DS
I 1 6 DDMMYY
I 1 2 DD
I 3 4 MM
I 5 6 YY Same like DS2 *MDY
c movel DD DD1 like MM1 , YY1, if we want sep
means int '/' then we can use...
| Is This Answer Correct ? | 0 Yes | 0 No |
WHAT IS MONMSG IDENTIFIER FOR STRTCPFTP command IN cl (as/400)?
How to search particular records from the database file in rpg?
How do you find whether a job is a batch job or interactive?
How to code Page up and Page down in RPG for Single page subfile without using ROLLUP/ROLLDOWN in DSPF ?
I have two sessions S1 & S2 under this 3 jobs(say j1,j2,j3 under session S1) And 2 jobs(Say j4, j5 Under session S2)is running. How many QTEMP & how many LDA will create for the same.
RETRIVING DELETED RECORDS :- I'm frequently asked how to retrieve deleted records from an unjournaled physical file when the deleted records have not yet been removed from the file. Utility UNDEL lets you undelete records in a physical file. This public domain program is available in CISC and RISC versions, and the complete source code is available for download at: UNDEL for AS/400 Save File (RISC): http://www.as400network.com/sharewarefiles/undelris.zip UNDEL for AS/400 Save File (CISC): http://www.as400network.com/sharewarefiles/undel.zip UNDEL for AS/400 Save File (Source code): http://www.as400network.com/sharewarefiles/undelsrc.zip The utility takes advantage of the fact that deleted records in physical files are only flagged as deleted, and the record data still exists until it is overwritten or the file is reorganized with a utility such as RGZPFM. UNDEL simply reads the deleted record, then reuses the record by writing over it with the new record (thus eliminating the flag for the deleted record). Some homegrown and commercial utilities copy the file containing undeleted records to a save file, then use a program to read the save file, which contains live and undeleted records, to a file to undelete the records. The UNDEL utility is superior to the SAVF technique because there's no need to copy the file to a save file, which is especially important for really large files. When run, UNDEL displays the physical file records in their unformatted, raw text form. You can either position the display to a given relative record number or use F19 or F20 to find the previous and next deleted record, respectively. The utility also includes online help, which is almost unheard of for free utilities. Other utilities include the ability to undelete records. You can use the RTVDLTRCD command in the old QUSRTOOL (no longer supported by IBM). QUSRTOOL is now a commercial product called TAA Productivity Tools ( http://www.taatool.com ). The free file editor WRKDBF has a built-in undelete capability ( http://www.wrkdbf.com ), and several commercial file editors can undelete records. For a complete list of file editors, go to http://www.sourcebook400.com, select "Programmer Tools" under "Product Category," then select "File Editors."
I want my simple Green screen should refersh every 1 min ,How can I do it..? Please share the logic
check existence of one record without using chain or read?
what is the necessary command needed before OPNQRYF and why?
please help me answer to this question what is the difference between the binding and srvpgm in ilerpg?
Job is in MSGW while reading the input file and writing a new record / updating a reacod due to Duplicate data error. What action would you take ( C D I R )...?
Suppose i am having 3 programs PgmA,pgmB,pgmC and using source debugger. At debugging time i found that pgmC having some code error..then in debug mode directly how can i debug pgmC