IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Pattern Matching in REXX


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Pallavi Bhat

New User


Joined: 21 Nov 2009
Posts: 6
Location: Chennai

PostPosted: Sat Nov 28, 2009 4:01 pm
Reply with quote

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
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Sat Nov 28, 2009 4:51 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
Search our Forums:

Back to Top