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 / nanda
*********************** Top of Data ****
ID DIVISION.
PROGRAM-ID. ALLINONE.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 WS-DATE1.
05 DD PIC 9(2).
05 MM PIC 9(2).
05 YY PIC 9(4).
01 WS-DATE2.
05 YY PIC 9(4).
05 MM PIC 9(2).
05 DD PIC 9(2).
PROCEDURE DIVISION.
ACCEPT WS-DATE1.
MOVE CORR WS-DATE1 TO WS-DATE2.
DISPLAY WS-DATE1.
DISPLAY WS-DATE2.
STOP RUN.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is rmode(any) ?
What is the difference between PIC 9.99 and 9v99 in COBOL?
how do you reference the variable block file formats from cobol programs
How do you get the data to code the BMS macro?
How you can read the file from bottom?
input= ,,,, mainframe training ,,, hyderabad .... location.... output1=$ mainframe training in hyderabad location$ output2=**** mainframe training in hyderabad location ****. In this pgn when we give input considering the spaces the output is displayed in this format.Like in the place of ,,,, $ should be displayed likewise.So please helpmeout.
how to access the file from prodution from changeman tool and to submit a file to production
What do you understand by psb and acb?
How do we get current date from system with century in COBOL?
What is the utilization of copybook in cobol? Could we utilize a similar copybook?
Can we redefine the field of x(200) to less than 200?
How do you code cobol to access a parameter that has been defined in jcl? And do you code the parm parameter on the exec line in jcl?
How to read the 2nd last record of a VSAM file? (The file size is huge and we don't know the key)
What is an in line perform? When would you use it? Anything else you wish to say about it.
What is comp-1 and comp-2?