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: 2446
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
This topic is locked: you cannot edit posts or make replies. GDG gen check using REXX raghuraman123 CLIST & REXX 6 Wed Apr 18, 2018 9:18 pm
No new posts How to control Panel Attributes throu... rsshanmugam CLIST & REXX 3 Mon Feb 26, 2018 9:51 pm
No new posts Find a string in PS file opened in br... mukkas CLIST & REXX 3 Sat Feb 24, 2018 2:15 pm
This topic is locked: you cannot edit posts or make replies. how to get Job information from IOF u... rsshanmugam CLIST & REXX 13 Mon Feb 05, 2018 4:22 pm
No new posts attchmvs from rexx subroutine that re... harisukumaran CLIST & REXX 1 Fri Jan 19, 2018 5:29 am

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