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?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to limit decimal places for the variable using proc means?

1008


In proc transpose and data step with arrays which one you pick?

3057


What do you know about sas data set?

1040


How do you convert basic cube to transaction cube and transaction cube to basic cube?

2194


What are the best sas programming practices for handling very large datasets? : sas-grid-administration

979


Do you need to rearrange the order of the data for the report?

2268


Explain what Proc glm does?

1133


what is data access? : Sas-di

1088


explain the difference between alternate key, business key, foreign key, generated key, primary key, retained key and surrogate key ? : Sas-di

1016


For clinical entire study how many tables will create approx?

1920


Explain the difference between informat and format with an example.

1129


How we can create SAS USER DEFINED CODE?

2040


how many types prompting framework can be broken down to? : Sas-bi

1042


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

1135


how to create the AE dataset by using SDTMIG specifications and SAP plan by using UNIX platform?

2721