View previous topic :: View next topic
|
Author |
Message |
Pallavi Bhat
New User
Joined: 21 Nov 2009 Posts: 6 Location: Chennai
|
|
|
|
Hi,
I want to pick the timestamp present in the load module of the CobolDB2 program. The problem is that this timestamp is
not present at a fixed position in the load module neither it has any fixed delimiters.
Can the timestamp be extracted by pattern matching?
By googling, i found that this could be used:
time_stamp=":d:d:d:d-:d:d-:d:d-:d:da.:d:d.:d:d.:d:d:d:d:d:d"
load_vers=ARRAYINSERT(inrecord, time_stamp)
where inrecord is data/line from the loadmodule and ':d' represents a numeric field of the timestamp.
but this is not working. i have tried with ArraySearch routine also.
Is it because the loadmodule has the data record format as 'U' and the record length '0'?
Could you please help me? |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
I use the AMBLIST utility with the following control statement :
LISTIDR DDN=loadlib,MEMBER=(member)
The output written to a file that is input for SAS where is process it in the
following way :
**********************************************************************;
OPTIONS NOCENTER LINESIZE=256 YEARCUTOFF=1971;
**********************************************************************;
DATA (KEEP=MEMBER LINKDATE)
;
RETAIN MEMBER;
FORMAT LINKDATE YYMMDD10.;
INFILE AMBLIST;
INPUT @6 MEMID $CHAR11.
@20 MEMNME $CHAR8.
@11 THISID $CHAR9.@;
IF MEMID = 'MEMBER NAME' THEN MEMBER = MEMNME;
ELSE IF THISID = 'THIS LOAD' THEN DO;
INPUT @92 LDAY 3.
@104 LYEAR 4.;
LINKDATE = DATEJUL((LYEAR * 1000) + LDAY);
OUTPUT;
END;
RUN;
*;
PROC PRINT DATA=AMBLIST NOOBS U; |
|
Back to top |
|
|
|