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
 
PDS record layout when RECFM=U

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1521
Location: Chennai

PostPosted: Wed Sep 14, 2011 6:12 pm    Post subject: PDS record layout when RECFM=U
Reply with quote

Hi,

There is a PDS with LRECL 80 and FB.
When the PDS was read with RECFM=U and then written 'as is' into a output dataset it looked like,
Code:

----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
----+----F----+----F----+----F----+----F----+----F----+----F----+----F----+----F
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
 ------------------------------------------------------------------------------
********************************* Top of Data **********************************                                                                               
 ------------------------------------------------------------------------------
.ÚMEMBER1 .......ç...|...|........USERID1   MEMBER2 ...........|...|........USER
0FDCDCCDF4001000040114011402010000EECDCCF444DCDCCDF4002000010114011403000000EECD
0E4542591002DF1108119F119F77060000425994100045425920021F1001119F119F700C0C004259
 ------------------------------------------------------------------------------
ID1   MEMBER3 .......á...?...?........USERID1   MEMBER4 ........................
CCF444DCDCCDF4001000040126012602010100EECDCCF444DCDCCDF4000000020112011200010100
9410004542593003EF1105111F111F460A080042599410004542594001EF1004115F115F35000000
 ------------------------------------------------------------------------------
USERID1   MEMBER5 ........................USERID1   MEMBER6 ....................
EECDCCF444DCDCCDF4001000010112011201000100EECDCCF444DCDCCDF400100000011201120101
425994100045425950027F1209119F119F560C0800425994100045425960011F1107115F115F420B

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.
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10308
Location: italy

PostPosted: Wed Sep 14, 2011 6:24 pm    Post subject: Reply to: PDS record layout when RECFM=U
Reply with quote

what You posted is just the directory of a pds read as a PS dataset

for the ispf statistics see here
http://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
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1521
Location: Chennai

PostPosted: Wed Sep 14, 2011 6:58 pm    Post subject:
Reply with quote

Hello Enrico,
Thanks for the REXX solution (happy that it was not a cobol or assembler),
I will try to translate the REXX to SAS.

Regards,
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8154
Location: East Dubuque, Illinois, USA

PostPosted: Wed Sep 14, 2011 7:32 pm    Post subject:
Reply with quote

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.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1521
Location: Chennai

PostPosted: Wed Sep 14, 2011 7:55 pm    Post subject:
Reply with quote

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.

Regards,
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1521
Location: Chennai

PostPosted: Wed Sep 21, 2011 4:38 pm    Post subject:
Reply with quote

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;                                                                 


Thanks & Regards,
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1521
Location: Chennai

PostPosted: Wed Sep 21, 2011 4:59 pm    Post subject:
Reply with quote

Got the error,
Changing
Code:
CRDATE = INPUT(SUBSTR(STATS,6,3),PIB3.);            /* CREATED DATE */

to
Code:
CRDATE = INPUT(SUBSTR(STATS,6,3),PD3.);

resolved the issue.
Thanks anyway.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Sep 21, 2011 7:35 pm    Post subject: Reply to: PDS record layout when RECFM=U
Reply with quote

Hi Vasanth,

Good to hear it is working - thank you for letting us know icon_smile.gif

d
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 -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts Repeat part of record multiple times Learncoholic DFSORT/ICETOOL 4 Tue Aug 29, 2017 11:33 am
No new posts Read two inputs and write into output... murali.andaluri DFSORT/ICETOOL 6 Wed Jul 26, 2017 7:35 pm
No new posts Need to write record of PS File in ex... Chandan1993 JCL & VSAM 1 Wed Jun 07, 2017 1:35 am
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am

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