Dynamic sequential file allocation on MVS

sas

    Sponsored Links

    Next

  • 1. Help: comparing percentage using Fisher's exact test
    Hi experts, I have a data set containing the number and percentage of adverse events for subjects in 3 different treatment. I would like to compare every two treatment group percentages in terms of Fisher's exact test and produce p-values for the comparisons. How can I do it in SAS? The dataset is like as follows: n(%) Treatment A: xx (xx%) Treatment B: xx (xx%) Treatment C: xx (xx%) Thank you in advance.
  • 2. Win2k3 server role
    Happy New Year, all! I wonder if you can help? Using SAS connect we remotely submit SAS code to a server running Win2k3 through Base SAS running on a local machine. SAS 8.2 is running on both the clients and the server. In Win 2k3 there is a "Manage your server" application that allows you to specify the server role. I notice that this is currently set to "File Server". Given the nature of the work we are doing, this looks sub-optimal to me. Is there a good reason to use the File Server role - I would have thought that the Application Server role would be more appropriate? Can anyone shed any light on this? Thanks, in advance, Robert
  • 3. stats jargon -
    paul wilson < XXXX@XXXXX.COM > wrote >Reading a bunch of books lately, I've been encountering "controlling for the effects of" phrase quite >often but what does this really mean? > >I'll give you an example: > >"you can interpret these probabilities as estimates of the XYZ function, controlling for the effects of the covariates" > >I'm not quite sure I understand the last part of that sentence. > "controlling for" means "holding constant". So, e.g., "Height is a predictor of weight, controlling for sex" would mean that, holding sex constant, taller people are heavier. It means that taller men are heavier than shorter men, and similar for women. BUT, if you don't include an interaction term, then the model *assumes* that the effect of height on weight is the same in men and women HTH Peter Peter L. Flom, PhD Statistical Consultant www DOT peterflom DOT com
  • 4. help needed with reading .xpt files
    I have got a rich set of sas files in .xpt format plus SAS/LE that only allows datasets up to 1500 obs. What I want to do is split the .xpt files by unique patient identifier using non-sas techniques so that that are hopefully less than 1500 obs each and then I can run some sas code on them. When I open these .xpt files in Notepad all I get is mostly crucifixes and rectangles. These files are OK because sas will read them but then I get the 1500 limit slapped on me and I wanted to split these files before giving them to sas to read.
  • 5. OT Happy New Year
    Well, it's now 2009 in some places (e.g. New Zealand) so Happy New Year to all SAS_L people. Kind regards, John Chapman, Sydney, Australia

Dynamic sequential file allocation on MVS

Postby vijayakumar » Wed, 05 Aug 2009 05:40:51 GMT

Dear Folks,

I was used SAS on Win/Unix platform and new to mainframe, I have task
to complete which needs some expert advise , that why I am here.

I have to export SAS datasets to a delimited file which has to be
stored in portioned dataset as member, I wrote macro to do covert the
dataset as delimited file but I don know how to put it into PDS
member i.e

My pds name : bgxp.ftdf.data
My dataset name: mytrans
My csv converter macro : mconcsv
My Delimited file name should be : transrep

Here my expectations are :

1.	How to include a delimited file to member of PDS via JCL or SAS
2.	How do we set the space for the file i.e. I don know exactly how
much space I need for the delimited file?

If some one in the group post sample snippet with JCL / SAS that will
be really helpful.

Thanks & Regards,
Vijay

Re: Dynamic sequential file allocation on MVS

Postby barry.a.schwarz » Wed, 05 Aug 2009 06:39:53 GMT

Check out the "Writing to Members of PDS or PDSE Data Sets" section in
the "SAS Companion for z/OS" manual.

-----Original Message-----
From: vijayakumar
Sent: Monday, August 03, 2009 1:41 PM
To:  XXXX@XXXXX.COM 
Subject: Dynamic sequential file allocation on MVS

Dear Folks,

I was used SAS on Win/Unix platform and new to mainframe, I have task
to complete which needs some expert advise , that's why I am here.

I have to export SAS datasets to a delimited file which has to be
stored in portioned dataset as member, I wrote macro to do covert the
dataset as delimited file but I don't know how to put it into PDS
member i.e

My pds name : bgxp.ftdf.data
My dataset name: mytrans
My csv converter macro : mconcsv
My Delimited file name should be : transrep

Re: Dynamic sequential file allocation on MVS

Postby nathaniel.wooding » Fri, 07 Aug 2009 00:07:30 GMT

ijay

I was out most of yesterday and when I cleaned out my inbox, I do not recall seeing a reply to you.

First, a minor correction. The type of data set on a mainframe is called "Partitioned", not "Portioned".

I have not needed to allocate a new data set like this in quite a while but in the past, I have used the ISPF 3.2 menu. An easy way to cheat in using this tool is to specify an existing PDS on the 3.2 menu and hit enter. The data sets characteristics such as record length and number of cylinders or tracks allocated will be displayed. Assuming that your pf keys are set up like mine, if you hit F3, you will return to the 3.2 menu. Then, enter the letter A in the option field and the name of your new data set either in the section labeled ISPF library or below in the area labeled
Other Partitioned, Sequential or VSAM Data Set:

If you use the latter area, you will need to enclose the set name in quotation marks.

When you hit enter, you will see a screen like the one you saw in the first step. It will have the new file name but all of the parameters of the set that you used as a model.

Now, as to the amount of space to allocate, that will depend on how much information you are going to store there. The PDS where I store my working programs has about 200 tracks allocated on a 3390 disk drive. If you are looking at, say a few thousand obs and maybe 20 variables, you might start with 200 primary tracks and 200 secondary tracks. When ZOS fills up the first 200 tracks, it will automatically add another 200 and will keep doing this for 14 or 15 more times. If this ever happens, you will need to allocate a new PDS with the primary tracks being around 200*16. Use ISPF 3.3 to copy the old members to the new set, delete the old set, and rename the new one.

You will need to estimate the number of "columns" meaning count up the length of each of the variables and add in enough space for the delimiters. Put this in the field labeled "Record Length".

The field Directory Blocks saves a bit of the file space to store the directory information for the PDS. I have several hundred members in the PDS that I have been using as a model here and I have 200 directory blocks. This is probably more than you will need.

Now, when you refer to this data set and the member that you are writing you may write your file name like

FILENAME Out "bgxp.ftdf.data(&newfile)" DISP=old;

The fileref (Out) is, of course, a name that you choose. Some important bits to watch for are:

1) the member name can NOT be more than 8 characters long.
2) it must start with a character but the remaining 7 can be numeric
3) for you to be able to write a member, DISP MUST be Old. You may specify SHR if you are reading the member later although you may also read with OLD. This also goes for reading and writing SAS data sets.

This should get you started. Your biggest challenge will probably be in estimating the size of your file.

Good luck

Nat Wooding


-----Original Message-----
From: SAS(r) Discussion [mailto: XXXX@XXXXX.COM ] On Behalf Of vijayakumar
Sent: Monday, August 03, 2009 4:41 PM
To: XXXX@XXXXX.COM
Subject: Dynamic sequential file allocation on MVS

Dear Folks,

I was used SAS on Win/Unix platform and new to mainframe, I have task
to complete which needs some expert advise , that's why I am here.

I have to export SAS datasets to a delimited file which has to be
stored in portioned dataset as member, I wrote macro to do

Similar Threads:

1.MVS allocation of ODS PDF file

How should one allocation a PDF file for ODS PDF.  The default size is too
small.

Here is how I tried it:

//TOPSPDF  DD DSN=PSB2230.TOPS.PDF,
//            DISP=(NEW,CATLG,DELETE),
//            SPACE=(CYL,(50,10),RLSE),UNIT=SYSDA,
//            DCB=(RECFM=U,BLKSIZE=0)

And the statement is SAS is:

ODS PDF FILE=TOPSPDF;

Thanks!

2.Dynamic allocation of output files in a SAS program

Hi,
Is it possible to dynamically allocate output files in a SAS program.
I guess it is possible in Assembler.

3.sequential summing/ sequential running totals of column values

Hi List,
I wonder if anyone could help? I'm trying to sum values in one column=20
sequentially, producing the running total of each column in a seperate=20
column. So in the example below column 'a' contains the original data and=
=20
column 'as' contains the corresponding running total when each value is=20
summed sequentially, greatest value first. I've searched the web plus past=
=20
listings on this listserve and can't find what I'm looking for. Not sure if=
=20
I have to use proc sort on each column in turn (I have 100 such columns) an=
d=20
use Suma+a in a data step, or whether there is a function that will do what=
=20
i want without having to sort first.=20
Many thanks for any help!
jared
     a as b bs c cs 4 4 10 100 2 96 2 9 30 70 74 74 1 10 40 40 20 94 3 7 20=
=20
90 1 97

4.Unix File Allocation Freeing ?

I have a program that is writing to a file that I want to execute,
within the program, after being created.  It didn't work when I tried
it and I'm guessing it's because the file was tied up by the program.
Is there a Unix command I can use to free the file within the program?

Here's the general flow of the program:

data _null_;
     file '/mypath/test.sh';
     put 'line 1';
     run;

* this is where the allocation free would be ;

x test.sh;

Other ideas welcome.  Thanks for any help.

5.Merging Multiple Datasets With Sequential File Names

I'm in need of some advice from a SAS guru.

Is there a way to merge multiple files, which have a sequential naming
convention (file001, file002, file 003 etc), into a master table that
also creates a new variable derived from number in the file name?

for example:

Variables
Name     Date     Cost

file001
A     1/2006     4.25
C     2/2004     4.23

file002
J     4/2003     2.34
K    7/2001     5.32

Then merge the files into a master table:

Variables
Name     Date          Cost     FileNum
A           1/2006       4.25      001
C           2/2004       4.23      001
J           4/2003        2.34      002
K           7/2001       5.32      002

Anyone have a quick solution for me?

Thanks Much,

Aaron

6. Check the existence of a file on MVS from UNIX

7. Getting a ZIP file from a remote website in MVS/Z/os

8. MVS transport file



Return to sas

 

Who is online

Users browsing this forum: No registered users and 71 guest