How do you fetch current date in normal cobol pgm and in
cobol-db2 pgm?
Answers were Sorted based on User's Feedback
Answer / sharath
Normal program
--------------
WORKING-STORAGE SECTION..
01 WS-DATE PIC X(6).
01 CURDATE.
05 WS-DATE-20 PIC X(2) VALUE '20'.
05 WS-DATE-YR PIC X(2).
05 FILLER PIC X(1) VALUE '/'.
05 WS-DATE-MT PIC X(2).
05 FILLER PIC X(1) VALUE '/'.
05 WS-DATE-DT PIC X(2).
PROCEDURE DIVISON..
ACCEPT WS-DATE FROM DATE
MOVE WS-DATE(1:2) TO WS-DATE-YR
MOVE WS-DATE(3:2) TO WS-DATE-MT
MOVE WS-DATE(5:2) TO WS-DATE-DT
DISPLAY CURDATE
Cobol-DB2
--------
Just writing the query..
Select CURRENT DATE into
:ws-date
from SYSIBM.SYSDUMMY
Is This Answer Correct ? | 14 Yes | 0 No |
Answer / adithya
procedure division.
accept a from date.
accept b from date
accept c from day-of-week
Is This Answer Correct ? | 1 Yes | 0 No |
What the difference is between continue and next sentence?
HELLO FRIENDS, THIS IS JANARDHAN.GADIRAJU, I FACED ONE INTERESTING QUESTION IN COBOL, THAT IS WHAT ARE THE VALUES WE CAN SEE IN HIGHVALUES AND LOWVALUES, CAN U PLEASE GIVE ME THE ANSWER
Explain call by context by comparing it to other calls.
what is Pic 9v99 Indicates?
1.Can we define condition-name conditions in FD entry.
i want to store 20 digits . h will u do it in cobol ?
what is the difference between Normal vaiable and comp variable.
what is SYNCHRONIZATION?
What are the various section in data division and briefly explain them.
What is difference between com and com3? Eg. s9(4) so what is the memory it will occupy com and com3.
01 a pic x(4) value 'abcd' 01 b pic 9(3) can we move from a to b.if possible what would be stored in b.
Which is the best IBM mainframe Training Institute in Ameerpet, Hyderabad