how to display date in reverse order if the pic clause of
the is numeric
suppose date is 09032010 ==> need to print in 20100309
(pic clause is numeric)
Answer Posted / tata
id division.
program-id. exe.
data division.
working-storage section.
01 idate pic 9(8) value 10032010.
01 rdate pic 9(8).
procedure division.
move idate (1:2) to rdate (7:2).
move idate (3:2) to rdate(5:2).
move idate (5:4) to rdate(1:4).
display rdate.
stop run.
Is This Answer Correct ? | 10 Yes | 0 No |
Post New Answer View All Answers
Mention the guidelines to write a structured cobol program?
I have program P1 which calls file F1 which has 100 records and following structure 001 .................. 002 .................. 003 .................. 098 .................... 099 ................... 100 .................... Now I want to read these files and write these records in file F2 in following manner. 001 ...... 051 ..... 002 ...... 052 ..... 003 ...... 053 ..... .......... ....... .......... ....... .......... ....... 048 ........ 098 ...... 049 .......... 099 ....... 050 .... 100 ......
How can you get the ksds file records into your cobol program?
how we sort two input files based on a common column and giving one o/p file please send me the coding logic?
how do you reference the esds vsam file formats from cobol programs
What is an in line perform? When would you use it? Anything else you wish to say about it.
What is the difference between next sentence and continue in cobol programing language?
Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?
Which is not true about evaluate statement
Hi pls anybody tell me about " ANALYSIS DOCUMENT PREPARATION AND ESTIMATION OF TASK " (in real time project)."I want to update a sequential file in my project" for that purpose i need both structures i mean analysis document and estimation of task.
What is the problem of ordered sequential files access?
Difference between array and sub-script ?
How to get the last record in vsam file in cluster? And how can you get the ksds file records into cobol program?
how do you reference the ksds vsam file formats from cobol programs
What are the different rules for performing sort operation?