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
Which division and paragraphs are mandatory for a COBOL program?
How do you differentiate between cobol and cobol-ii?
how to move the records from file to array table. give with code example
here is my requirement A1 is alphanumeric with value 'A1B2C3D4' as defined below 05 A1 PIC X(8) VALUE IS 'A1B2C3D4' but i need to have A2,A3 as ABCD & 1234 repectively...... A2 = ABCD A3 = 1234 Can you please explain me what are the different ways to do it?
Write some characteristics of cobol as means of business language.
Why did you choose to work with ibm mainframe cobol programming?
What are the access modes of START statement?
) How do u handle errors in BMS macro?
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.
Difference between array and sub-script ?
IF I mention stop run in CICS what happens?
i want a program using by if, evaluate , string, unstring, perform, occurs?
Differentiate between structured cobol programming and object-oriented cobol programming.
what is search and searchall?what is the diffrence between them?give an best example?
What are the different rules to perform a Search?