BookmarkSubscribeRSS Feed
rohitkrishna
Calcite | Level 5

Hi ,  I new to the mainframe environment i basically sas programmer i currently working on both environment so i have few dought  on compilation of the sas jcl program    below the prg

 

//rohit2a job (998924) 'krishna',

//                                    class=0,msgclass=x,notify=&sysuid

//saspgm  exec sssas,

//                work='150,100', region=8m,sort='100,100'

//saslist dd sysout=*

//work dd space=(23476,(5,1)),avgrec=k

//dsinput1 dd dsn=in.test.half,disp=shr

//dsoutput dd dsn=in.test.file2.  disp=new,

//                                        unit=sysda,space=(cyl,(10,10),rlse),

//                                        dcb=(recfm=fb,lrecl=128,blksize=12800)

//sysin dd *

------------sas prg begins here-----------------------

data freq;

infile dsinput1 dsd;

input @3 id $char4.

                name $char4.

                 surname $char8.;

proc sort data=freq out=dsoutput nodupkey;

by id;

proc print data=dsoutput;

run;

 

so here the my dought mainly i getting the maxxcc=0000 and my output will display on spoll but not went to outputfile so what is issue and give the sum coding part and some expls

Thanks & Regards

N rohitkrishna

 

10 REPLIES 10
rbetancourt
Obsidian | Level 7

This job should fail with a JCL error.  Try placing a comma (,) after in.test.file2 and not a period (.)

 

//dsoutput dd dsn=in.test.file2,  disp=new,

 

Good Luck,

Randy

Astounding
PROC Star
It is unusual to specify dcb information for SAS data. Just omit that and let sas use default values.

Your program does not write anything to in.test.file2 ... it only writes a temporary sas data set named dsoutput. If you want a permanent sas data set named mydata, you would need to specify out=dsoutput.mydata. Permanent sas data sets use two part names where the first part of the name is the name of the DD statement and the second part of the name is the name you assign to the sas data set.
rohitkrishna
Calcite | Level 5
HI Astounding
thanks for you reply, and i used your syntax
out=DSOUTPUT.FREQ one is dd name other one is sas data set name but it shows maxcc=0008
and in spool it says "Libraray DSOUTPUT is not in a valid format for access method sase7"
that is error i am getting kindly give solution for that
Thanks & Regards
N rohitkrishna
Astounding
PROC Star
 
Astounding
PROC Star
When you ran the job the first time, the program created in.test.file2 with incorrect DCB information. A later program cannot change the structure of the existing data set. You need to remove the DCB parameter from the DD statement then manually delete in.test.file2 then re-run the job.
rohitkrishna
Calcite | Level 5
Thanks for replay
i am getting output but the thing is i am getting all records its not i am expeeting bez i am sorting the file so after sorting i getting unique records in saslog only not in outputfile
plz kindly give me the sum suggestions
Thanks & Regards
N muralikrishna
Astounding
PROC Star
You will have to show your latest program.

In general you should expect that PROC SORT will not change your original data set. When using the out= option, the original data set remains unchanged, while the out= data set contains the sorted, unique results.
rohitkrishna
Calcite | Level 5
HI, Astounding
I shown above prg in that i mention two differnt data sets one is for input data in that data will there and the other one is output put data so i mention out=output dataset name itself but still i am not getting the sorted data
Thanks & Regards
N muralikrishna
Astounding
PROC Star
For anyone to be able to help, you will have to post the log from your latest program.
Jebastin
Obsidian | Level 7

Hey, You should give SASLIST a data set name instead of giving * ( * means, it will write in spool).

 

Please refer the link below,

 https://documentation.sas.com/?docsetId=hosto390&docsetTarget=n0av74evu58bjnn1hhfdazc88lcd.htm&docse...

 

Sorry for the late reply..................... Cheers !!!!!!!!!!!!!

SAS Innovate 2025: Call for Content

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!

Submit your idea!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 10 replies
  • 3259 views
  • 0 likes
  • 4 in conversation