Yes...Absolutely PDSE ...however unfortunately I don't have predefined members name so I have to first get the members name using either HASH object method as above or something similar and then create these members name in the PDSE followed by further copying the corresponding records in those PDSE members....
It's now quite long ago that I've worked with SAS under z/OS but "in my times" you would have stored SAS tables using VSAM and not PDSE.
PDSE would have been used for textual data like SAS code.
Once the VSAM file is allocated (via JCL or a libname statement) you can use it and create/read/update/delete SAS tables as you would do it under any other OS by using normal SAS syntax.
SAS(R) 9.4 Companion for z/OS, Third Edition
So with z/OS it's always the same story: You need to create the external file in the right structure. Once this is done you can use it like you would use a directory in another OS (VSAM file for LIBNAME, PDSE for FILENAME).
I've seen that under SAS 9.4 option "dlcreatedir" also exists for z/OS. Not sure though if this only applies for HFS and if not where SAS would pick up the defaults for defining the file organisation.
Patrick, The DLCREATEDIR is only for UFS. SAS(R) 9.4 Companion for z/OS, Third Edition that is the HFS type (unix) or Posix based.
Today most of the initital sas process are Posix. When installing on z/OS you must be prepared for that. The old MVS is named boundary-files. The SAS/connect when used is starting a sh-script (unix) and found back by a BPXAS address space when using SDSF RMF or an other monitoring tool.
With SAS V5 the access method was of the BDAM unmovable type. It changed to QSAM (FS/PS) on a low level access method with EXecute Channel Program (excp access). That are the notes in a mainframe SAS log referring to still being there. VSAM (IDCAMS) has never been used for SAS libraries. SAS is very handy to access VSAM data very underestimated as valuable.
With SAS libraries on z/OS I woul prefer half track size blocks (27998) on a 3390 (model-9 type) minimizing IO for big data processing. The default is (was) 6Kb. A topic for a lot of hot discussions.
Another is the use of cardimage/nocardimage (Hollerith 80 colomn) of the sources datasets. Just recently all input datasets are now mandatory for VBS (autoexec config installation) with a goal of lrecl=255..
If you have a hard-copy of the SAS v6 companion, there is on page 44 described the multivolume approach. That one was implemented wrong by SAS, causing a lot of trouble for that bit in a QSAM file indicating continuation on the next volume (SMS HSM implementation). The correction was made in V8 (2004 migration because of milo-euro) leaving the issue to exist for 6-8 years.
I have no Mainframe at my hands but I could try to write machine independend code putting it all together.
With the used parathesis the members in a PDSE should be created as long as the data is clustered (at notsorted at the by)
Putting the libname filenames in top is like having it in JCL. The adding of A is needed for naming conventions in the Z/OS member approach
42 ;
43 /* test in UE for PDSE */
44 libname test "/folders/myfolders/test";
NOTE: Libref TEST was successfully assigned as follows:
Engine: V9
Physical Name: /folders/myfolders/test
45 filename test "/folders/myfolders/test";
46
47
48 /* machine independent code create sas dataset */
49 DATA test.LAB1;
50 INFILE DATALINES ;
51 INPUT
52 DAT DATE9. TIM TIME5. GLIBSEQN $ CLUSTER $ DLIB $ DISTNAME $ Deferr $8.
53 threshold $8. ;
54 DATALINES;
NOTE: The data set TEST.LAB1 has 8 observations and 8 variables.
NOTE: DATA statement used (Total process time):
real time 0.03 seconds
cpu time 0.04 seconds
63 proc print data=test.lab1;run;
NOTE: There were 8 observations read from the data set TEST.LAB1.
NOTE: The PROCEDURE PRINT printed page 7.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.09 seconds
cpu time 0.10 seconds
64
65 DATA _null_ ;
66 Set test.LAB1;
67 by GLIBSEQN ;
68 length filevarpds $256 ;
69 retain filevarpds ;
70 if first.GLIBSEQN then do;
71 filevarpds="%sysfunc(pathname(test))"||"(A"||TRIM(GLIBSEQN)||")" ;
72 end;
73 file outpds filevar = filevarpds ;
74 put _all_ ;
75
76 run;
NOTE: The file OUTPDS is:
Filename=/folders/myfolders/test(A10000),
Owner Name=root,Group Name=root,
Access Permission=-rwxrwxrwx,
Last Modified=28 november 2014 05:27:08 uur
NOTE: The file OUTPDS is:
Filename=/folders/myfolders/test(A20000),
Owner Name=root,Group Name=root,
Access Permission=-rwxrwxrwx,
Last Modified=28 november 2014 05:27:08 uur
NOTE: 4 records were written to the file OUTPDS.
The minimum record length was 192.
The maximum record length was 192.
NOTE: 4 records were written to the file OUTPDS.
The minimum record length was 192.
The maximum record length was 195.
NOTE: There were 8 observations read from the data set TEST.LAB1.
NOTE: DATA statement used (Total process time):
real time 0.02 seconds
cpu time 0.04 seconds
77
80
Thanks Japp Karman, your idea/code helped to get it working....
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.