Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 2442
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 How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 5 Wed Oct 04, 2017 6:54 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 47 Fri Sep 29, 2017 1:08 pm
No new posts ejck thru rexx to multiple jobs insid... Susanta All Other Mainframe Topics 5 Tue Sep 19, 2017 1:39 pm
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us