Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Pattern Matching in REXX

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: Pattern Matching in REXX
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: 2429
Location: Netherlands, Amstelveen

PostPosted: Sat Nov 28, 2009 4:51 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts REXX cdoe to purge a JOB from spool a... Sulabh Agrawal CLIST & REXX 11 Thu Mar 09, 2017 11:36 am
No new posts Extract set of records matching on ac... bhaskar_kanteti DFSORT/ICETOOL 3 Mon Mar 06, 2017 7:19 am
No new posts Overriding PS data in rexx Shaheen Shaik CLIST & REXX 8 Fri Mar 03, 2017 5:08 pm
No new posts REXX compiled via RXTCOMP sergeyken CLIST & REXX 7 Tue Feb 07, 2017 9:41 pm
No new posts Matching and unmatching records scdinesh DFSORT/ICETOOL 11 Tue Feb 07, 2017 12:41 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us