the output records seems to have some record layout which contains the PDS member statistics. Is it correct?
If so could you please point me to the place/link which has the record structure and more information. Thanks.
This task has no business need, processing the PDS data was a part of 'reading different external files using SAS'.
Thanks for viewing.
what You posted is just the directory of a pds read as a PS dataset
for the ispf statistics see here
www.sillysot.com/ftp/mlrexx.txt
quick and dirty link,
look at the ispf manuals for the complete explanation for the statistics section
at the MVS data management manuals the general directory entry layout
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
vasanthz, find member PDSLIST of your site's SAS SAMPLE library. This contains SAS code to read PDS directory entries. IIRC, there is also SAS code on the SAS support web site that allows you to read every member of a PDS without having to specify the members.
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
Hello Robert, Thanks for the pointer.
Did not knew until now that there was a sample library for SAS programs.
after a bit of searching, found the PDSLIST member.
I think I would look at the member once completing my exercise, else the sample program would become a spoiler.
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
Hi,
On the link provided by Enrico,
There are a set of REXX statements like,
Code:
(decoding the PDS statistics present inside the variable "direntry")
Parse Var direntry,
vv 2 mm 3 flags 4 ss 5 crecc 6 crdate 9 modcc 10 moddate 13 hh,
14 tm 15 lines 17 init 19 mod 21 userid 28 .
Parse Value c2x(crdate) with cyy 3 cjjj 6 .
out=out 19+c2x(crecc)cyy'.'cjjj /* Create date */
So I tried some equivalent SAS statemets like,
Code:
(decoding the PDS statistics present inside the variable "STATS")
CRECC = INPUT(SUBSTR(STATS,5,1),PIB1.) + 19; /* CREATED CENTURY */
CRDATE = INPUT(SUBSTR(STATS,6,3),PIB3.); /* CREATED DATE */
For a PDS memeber that was created today,
The CRECC on SAS output was 20 (Correct)
The CRDATE on SAS output was 1123919(?).
I was expecting CRDATE member to have 11264(Julian date for today) but output was 1123919.
Could you please let me know where the issue could be?
Trial program:
Code:
DATA GO;
INFILE 'WELLS.SOME.PDS' LRECL=256 BLKSIZE=256;
LENGTH BLOCK1 BLOCK2 BLOCK3 $256 STATS $30;
INPUT @1 BLOCK1 $256.;
IF _N_ = 1;
BL1 = INPUT(SUBSTR(BLOCK1,1,2),PIB2.); /* BLOCK LENGTH */
BLOCK2 = SUBSTR(BLOCK1,3); /* BLOCK LENGTH PART REMOVED */
NAME = SUBSTR(BLOCK2,1,8); /* MEMBER NAME */
TTR = SUBSTR(BLOCK2,9,3); /* DON'T KNOW */
C = SUBSTR(BLOCK2,12,1); /* SOME IMPORTANT BIT */
BLOCK3 = SUBSTR(BLOCK2,13);
STATS = SUBSTR(BLOCK3,1,30); /* MEMBER STATISTICS */
CRECC = INPUT(SUBSTR(STATS,5,1),PIB1.) + 19; /* CREATED CENTURY */
CRDATE = INPUT(SUBSTR(STATS,6,3),PIB3.); /* CREATED DATE */
USERID = SUBSTR(STATS,21,8); /* USERID */
PUT CRDATE= CRECC= USERID= NAME=;
RUN;