Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Have you ever linked SAS code, If so, describe the link and
any required statements used to either process the code or
the step itself?

Answers were Sorted based on User's Feedback



Have you ever linked SAS code, If so, describe the link and any required statements used to either ..

Answer / sirisha

in the editor window we write

%include'path of the sas file';
run;
if it is with non-windowing environment no need to give run
statement

Is This Answer Correct ?    7 Yes 0 No

Have you ever linked SAS code, If so, describe the link and any required statements used to either ..

Answer / ganesh

The link statement tells sas to jump immediately to the
statement label that is indicated inthe label statement and
to continue executing.

Is This Answer Correct ?    2 Yes 1 No

Have you ever linked SAS code, If so, describe the link and any required statements used to either ..

Answer / bakul shah

Another way to call Subroutine.
Example:
*========================================================
* Bakul Shah
* HOW MANY DIFFERENT WAYS IT IS POSSIBLE TO MAKE
* CHANGE FOR A DOLLAR? ---> 292 Posibilities ??
*
* H HALF DOLLAR
* Q QUARTER
* D DIME
* N NICKEL
* P PENNY
* A LOOP - INITIALIZE TO ZERO
* NO LINE NUMBER - INITIALIZE TO 55
* KOUNT TOTAL NUMBER INITIALIZE TO ZERO
* ;

/* The file 'c:coinpage.txt' is:
File Name=C:\WINDOWS\system32\coinpage.txt,
RECFM=V,LRECL=256 */

Data Null_ ;
/* file 'c:coinpage.txt'; */
File CoinPage ;
A=0 ;
PageCount = 0 ;
NO=55; Retain NO;
KOUNT=0;
DO H = A to 2; /* Half Dollar */
DO Q = A to 4; /* Quarter */
DO D = A to 10; /* Dime */
DO N = A to 20; /* Nickle */
DO P = A to 100; /* Cents */
IF(((H*50)+(Q*25)+(D*10)+(N*5)+P)=100) THEN
do;
KOUNT+1 ;
If NO > = 55 then
do;
Link PageHeader;/* Calling Subroutine*/
end;
NO+1 ;
Put @9 KOUNT 3. @18 H 3. @27 Q 3.
@36 D 3. @45 N 3. @54 P 3. ;
end;
end;
end;
end;
end;
end;
Return;

PageHeader: /* Subroutine */
PageCount + 1 ;
Put @70 'Page' +0 PageCount 2.
/@8 'KOUNT' @20 'H' @29 'Q' @38 'D'
@47 'N' @56 'P' ;
NO = 0 ;
Return;
Run;

Is This Answer Correct ?    2 Yes 1 No

Have you ever linked SAS code, If so, describe the link and any required statements used to either ..

Answer / prakhar

SAS code could be linked using the GOTO or the Link statement.

The difference between the LINK statement and the GO TO statement is in the action of a subsequent RETURN statement. A RETURN statement after a LINK statement returns execution to the statement that follows LINK. A RETURN statement after a GO TO statement returns execution to the beginning of the DATA step, unless a LINK statement precedes GO TO, in which case execution continues with the first statement after LINK. In addition, a LINK statement is usually used with an explicit RETURN statement, whereas a GO TO statement is often used without a RETURN statement.

When your program executes a group of statements at several points in the program, using the LINK statement simplifies coding and makes program logic easier to follow. If your program executes a group of statements at only one point in the program, using DO-group logic rather than LINK-RETURN logic is simpler.

Goto eg.

data info;

input x;

if 1<=x<=5 then go to add;

put x=;

add: sumx+x;

datalines;

7

6

323

;

Link Eg.



data hydro;

input type $ depth station $;

/* link to label calcu: */

if type =’aluv’ then link calcu;

date=today();

/* return to top of step */

return;

calcu: if station=’site_1′

then elevatn=6650-depth;

else if station=’site_2′

then elevatn=5500-depth;

/* return to date=today(); */

return;

datalines;

aluv 523 site_1

uppa 234 site_2

aluv 666 site_2

…more data lines…

;



GOTO – http://support.sas.com/onlinedoc/913/getDoc/en/lrdict.hlp/a000201949.htm

LINK – http://support.sas.com/onlinedoc/913/getDoc/en/lrdict.hlp/a000201972.htm

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SAS Interview Questions

Are you sensitive to code walk-throughs peer review or QC review?

0 Answers   Quintiles,


What is SAS Information Map Studio and its purpose ?

2 Answers   SAS, TCS,


What is the different between functions and PROCs that calculate the same simple descriptive statistics?

0 Answers   Quintiles,


What versions of SAS have you used (on which platforms)?

0 Answers   Quintiles,


what the use of proc glm

1 Answers   Accenture, C Marc,


what is sas application server, database server, sas olap server and sas metadata server? : Sas-di

0 Answers  


how can you import .csv file in to sas? : Sas programming

0 Answers  


what is sas data set?

0 Answers  


What is the difference between reading data from an external file and reading data from an existing data set?

0 Answers  


IS SAS COMPILER OR INTERPRETER? EXPLAIN?

3 Answers   Aon Hewitt, HSBC, SCL, TCS,


how does sas handle missing values in formats? : Sas programming

0 Answers  


what is pdv? how it is related to input buffer in sas?

5 Answers   HSBC, Satyam,


Categories