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



how to convert date format from one format to another i think in CL/400 its CVTDAT,Please tell in ..

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

how to convert date format from one format to another i think in CL/400 its CVTDAT,Please tell in ..

Answer / neet

by use user defined data structure, we can change date format

Is This Answer Correct ?    1 Yes 0 No

how to convert date format from one format to another i think in CL/400 its CVTDAT,Please tell in ..

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

Post New Answer

More RPG400 Interview Questions

Why there is invention of RPG if we can do insert update delete in CL through SQL.Why the rise of RPG?

1 Answers   Infogain,


Is it possible to call a subfile using CL. IF yes.. kindly help me out with explanation...?

3 Answers  


how to retrieve particular field records from a physical file,say i have a physical file called 'employee' in it i have to retrieve the records of a field 'admin' present in pf 'employee' using rpg,but i should not use logical file or openquery file.

3 Answers   iGate, Wipro,


I have learnt through Net that Debugging a Batch job involves 1. Submit the job with the HOLD (*YES) parameter: SBMJOB HOLD(*YES) or Hold the job queue that before submitting the job by using the HLDJOBQ command. 2. Determine the job name, user, and number of the submitted job by using the WRKSBMJOB command. 3. Type the Start Service Job command on your screen: STRSRVJOB JOB(job name/user/number) 4. Type the Start Debug command on your screen: STRDBG 5. Release the job in the jobq. Type WRKSBMJOB and then put a 6 beside the job to be released and press enter, or, if the job queue was put on hold, release the job queue with the RLSJOBQ command. 6. A display appears when the job is ready to start, saying that you can now begin debugging the job. Press F10 to show the Command Entry display. 7. Now you can start debugging by entering an Add Break Point command: ADDBKP 8.ENDDBG 9.ENDSRVJOB I tried this for RPG/400 Program and up to six steps of the above it's ok,but for me no source is displayed and i typed DSPMODSRC in Command line but still i can't see the sourceif i press F.10 and enter command ADDBKP i don't know how to add break points through it,usually i add break points using F.6 for Interactive job debugs,but since this is batch i don't know sir,Please help me out. I was asked this question in a interview,i know only RPG/400 and i’m asking for debugging of RPG/400 program only sir. or is it only possible to debug BATCH RPG ILE JOB and it is not possible to debug BATCH RPG/400 JOB kindly help me out sir

4 Answers   HSBC,


Maximum how many files declare in rpgle

3 Answers   TCS,






Q1.How we can copy the data of file one session to another session? Q2.how we can execute a loop infinitely in AS/400 coding? Q3.In ALDON tool,multitask is posible on a perticular object by the user?

6 Answers   CSC,


wat is meant by hidden field , why it is used?

4 Answers   Four soft,


1.Are there any errors in the following statement?If so then list them.DTAARA is a data area having a field EMP # and EMPNO is a field in the file EMPPF.Which has one record. READ EMPPF IF %FOUND(EMPPF) IN DTAARA EVAL EMP#=EMPNO OUT DTAARA ENDIF

5 Answers  


suppose a job is running for 15 minutes after that it goes to message wait? what are the impact analysis

1 Answers  


The RP program is displaying records 11 times .But there are 10 records in a pf.(ie last record is displayed twice).How to display records only 10 times?

5 Answers  


i have a file with the values 10, 20, 30, 40, if am setll with the value 25 then readp, so what it will return?

6 Answers   Mind Tree,


What is significance of a file designated as a Primary file in Rpg400 program....also what's use of secoundry file

1 Answers  


Categories