View previous topic :: View next topic
|
Author |
Message |
niharika19
New User
Joined: 23 Nov 2005 Posts: 3
|
|
|
|
ACCEPT WS-CURRENT-DATE FROM DATE
ACCEPT WS-TIME FROM TIME
Move the accepted values to a declared timestamp working storage variable. Here is the working storage declaration for timestamp,
01 WS-TIMESTAMP.
05 WS-TS-CC PIC X(2).
05 WS-TS-YY PIC X(2).
05 FILLER PIC X(1) VALUE '-'.
05 WS-TS-MM PIC X(2).
05 FILLER PIC X(1) VALUE '-'.
05 WS-TS-DD PIC X(2).
05 FILLER PIC X(1) VALUE '-'.
05 WS-TS-HH PIC X(2).
05 FILLER PIC X(1) VALUE '.'.
05 WS-TS-MIN PIC X(2).
05 FILLER PIC X(1) VALUE '.'.
05 WS-TS-SS PIC X(2).
05 FILLER PIC X(1) VALUE '.'.
05 WS-TS-NN PIC X(2).
05 FILLER PIC X(4) VALUE '0000'.
how to move the accepted values to timestamp declared variables |
|
Back to top |
|
|
rajandhla
Active User
Joined: 18 Oct 2005 Posts: 182 Location: Luton UK
|
|
|
|
use reference modifier (i.e move).....
example:
The following example shows how to use a reference modifier to refer to a substring of a data item:
Move Customer-Record(1:20) to Orig-Customer-Name
As this example shows, in parentheses immediately following the data item you code two values separated by a colon:
Ordinal position (from the left) of the character you want the substring to start with
Length of the desired substring
Regards
jai |
|
Back to top |
|
|
|