Quantcast
Channel: IBM Mainframe Computers Forums
Viewing all articles
Browse latest Browse all 9405

COBOL Programming :: Two digit Date format

$
0
0
Author: abdulrafi
Subject: Two digit Date format
Posted: Fri May 06, 2016 6:51 pm (GMT 5.5)

Hi,

Is there any function in cobol to do the following,

Input date : 1/1/2001
output date I need is: 01/01/2001

Currently my code is something like this and I am unable to achieve what I am expecting,

Code:
01 WS-EFF-DATE1.                                           
    05 WS-EFF-MM1             PIC X(02)  VALUE SPACES.     
    05 FILLER                 PIC X(01)  VALUE '/'.       
    05 WS-EFF-DD1             PIC X(02)  VALUE SPACES.     
    05 FILLER                 PIC X(01)  VALUE '/'.       
    05 WS-EFF-YYYY1           PIC X(04)  VALUE SPACES.     



Request your help on this.
_________________
Thanks,
Abdul Rafi


Viewing all articles
Browse latest Browse all 9405

Trending Articles