The document discusses applications of the DOW loop in SAS. It describes how DOW loops can be used to perform Cartesian joins, calculate geometric means, and conduct bivariate linear regression. The DOW loop structure involves a DO loop with a SET statement to iterate through a dataset. It provides examples of using single and multiple DOW loops to summarize data and perform calculations that require multiple passes through the data.
The document discusses the stack and subroutines in assembly language programming. Some key points:
- The stack pointer (SP or A7) points to the top of the stack, which grows downward in memory. Values are pushed onto the stack using predecrement mode and popped using postincrement mode.
- The stack is used for temporary variable storage, passing parameters to subroutines, and storing the return address when making subroutine calls with JSR.
- To call a subroutine, parameters are pushed to the stack, JSR jumps to the subroutine, and RTS pops the return address back to PC. Transparent subroutines save and restore any modified registers.
- Parameters
This document provides an overview of directional survey theory, methods, and tools used by BP Amoco. It covers topics such as surface positioning, the earth's magnetic field, position uncertainty calculations, multi-well development planning, survey program design, target analysis, survey calculation, in-hole and in-field referencing, drill-string magnetic interference, and survey data comparison. It also includes appendices on mathematical references and approved tool error models. The document is intended as a handbook for directional drilling and well operations at BP Amoco.
This document discusses real-time analytics and when it is appropriate for businesses. It begins by asking when the right time for real-time capabilities is, noting that the need is driven by business needs. It then discusses what real-time means for different types of applications like fraud detection, e-commerce, and online retail. While real-time capabilities can provide benefits, the document stresses that the most important thing is having the "right timing". It provides examples of real-time marketing strategies for malls and how some retailers in Singapore have benefited from real-time analytics.
This document discusses several classical ciphers and their implementation in SAS code, including Caesar cipher, Alberti cipher, Bifid cipher. It provides pseudocode to encrypt and decrypt text for each cipher by applying encryption algorithms like character shifts, multiple substitution wheels, and using a Polybius square with transposition. The implementations generate cipher keys and encrypt input variables before substituting keys to produce the encrypted output.
Edison chen and Cammie Tse Scandal: A twitter studyMurphy Choy
This document provides a case study of the 2008 celebrity sex scandal involving Hong Kong actors Edison Chen and Cammie Tse. It includes sections on the motivation for researching scandals, defining what constitutes a scandal, how scandals typically evolve, and a case study analyzing data collected around the Chen-Tse incident, including tweet counts and sentiment over time. The document aims to understand celebrity scandals by examining the high-profile example of photos of Chen and Tse being leaked online.
Building a decision tree from decision stumpsMurphy Choy
The document discusses building decision tree stumps from full decision trees. It introduces decision trees and defines a decision tree stump. It compares the CART and CHAID algorithms, noting CART handles different data types better and uses more robust statistics. It discusses splitting criteria like Gini impurity and building a SAS macro to create a decision tree stump by recursively splitting on the variable with the maximum Gini decrease. Finally, it notes decision tree stumps can be linked to build a full decision tree.
This document contains a C program to compute the roots of a quadratic equation. It begins by reading in the coefficients a, b, and c from the user. It then calculates the discriminant and determines if the roots are real, equal, or complex. Appropriate messages are printed. If the roots are real and distinct, it calculates and prints them. If equal, it prints the single root. If complex, it separates into real and imaginary parts and prints both roots. The program uses decision making and math functions to systematically solve the quadratic equation.
The document contains 44 PL/SQL programs covering a variety of programming concepts like loops, conditional statements, functions, procedures, dates, strings and mathematical operations. The programs include examples to print patterns, find sums, factorials, check prime numbers, palindrome strings, date calculations, data type conversions and more.
The document discusses the stack and subroutines in assembly language programming. Some key points:
- The stack pointer (SP or A7) points to the top of the stack, which grows downward in memory. Values are pushed onto the stack using predecrement mode and popped using postincrement mode.
- The stack is used for temporary variable storage, passing parameters to subroutines, and storing the return address when making subroutine calls with JSR.
- To call a subroutine, parameters are pushed to the stack, JSR jumps to the subroutine, and RTS pops the return address back to PC. Transparent subroutines save and restore any modified registers.
- Parameters
This document provides an overview of directional survey theory, methods, and tools used by BP Amoco. It covers topics such as surface positioning, the earth's magnetic field, position uncertainty calculations, multi-well development planning, survey program design, target analysis, survey calculation, in-hole and in-field referencing, drill-string magnetic interference, and survey data comparison. It also includes appendices on mathematical references and approved tool error models. The document is intended as a handbook for directional drilling and well operations at BP Amoco.
This document discusses real-time analytics and when it is appropriate for businesses. It begins by asking when the right time for real-time capabilities is, noting that the need is driven by business needs. It then discusses what real-time means for different types of applications like fraud detection, e-commerce, and online retail. While real-time capabilities can provide benefits, the document stresses that the most important thing is having the "right timing". It provides examples of real-time marketing strategies for malls and how some retailers in Singapore have benefited from real-time analytics.
This document discusses several classical ciphers and their implementation in SAS code, including Caesar cipher, Alberti cipher, Bifid cipher. It provides pseudocode to encrypt and decrypt text for each cipher by applying encryption algorithms like character shifts, multiple substitution wheels, and using a Polybius square with transposition. The implementations generate cipher keys and encrypt input variables before substituting keys to produce the encrypted output.
Edison chen and Cammie Tse Scandal: A twitter studyMurphy Choy
This document provides a case study of the 2008 celebrity sex scandal involving Hong Kong actors Edison Chen and Cammie Tse. It includes sections on the motivation for researching scandals, defining what constitutes a scandal, how scandals typically evolve, and a case study analyzing data collected around the Chen-Tse incident, including tweet counts and sentiment over time. The document aims to understand celebrity scandals by examining the high-profile example of photos of Chen and Tse being leaked online.
Building a decision tree from decision stumpsMurphy Choy
The document discusses building decision tree stumps from full decision trees. It introduces decision trees and defines a decision tree stump. It compares the CART and CHAID algorithms, noting CART handles different data types better and uses more robust statistics. It discusses splitting criteria like Gini impurity and building a SAS macro to create a decision tree stump by recursively splitting on the variable with the maximum Gini decrease. Finally, it notes decision tree stumps can be linked to build a full decision tree.
This document contains a C program to compute the roots of a quadratic equation. It begins by reading in the coefficients a, b, and c from the user. It then calculates the discriminant and determines if the roots are real, equal, or complex. Appropriate messages are printed. If the roots are real and distinct, it calculates and prints them. If equal, it prints the single root. If complex, it separates into real and imaginary parts and prints both roots. The program uses decision making and math functions to systematically solve the quadratic equation.
The document contains 44 PL/SQL programs covering a variety of programming concepts like loops, conditional statements, functions, procedures, dates, strings and mathematical operations. The programs include examples to print patterns, find sums, factorials, check prime numbers, palindrome strings, date calculations, data type conversions and more.
This document contains multiple choice questions about SQL and PL/SQL concepts such as triggers, procedures, functions, exceptions, transactions and dynamic SQL. It tests knowledge of the different components needed to define triggers, how to call procedures and functions, transaction control statements, and exception handling.
The document discusses a case study on customer churn for a telecommunications company called Mobicom. It aims to identify the top five factors driving churn and recommend proactive retention programs. Key factors analyzed include usage, billing issues, network quality, data usage and rate plans. The analysis identifies age, retention calls, equipment age and length of relationship as top predictors of churn. It recommends rate plan migration and prioritizing high-churn customers for retention campaigns.
Please follow the cod eand comments for description CODE #incl.pdfannaielectronicsvill
Please follow the cod eand comments for description :
CODE :
#include // cin cout
#include // pow
#include // setprecision, fixed, showpoint
using namespace std;
/*--Function Prototypes--*/
void displayMenu();
bool isPositive(float a);
float calcSquareArea (float baseData);
float calcRectangleArea (float baseData, float heightData);
float calcTriangleArea (float baseData, float heightData);
float calcCircleArea (float radiusData);
void displayArea(float result);
/*-MAIN--------------------------------*/
int main() {
// declare \'base\' and \'height\' as type float
// and initialize them both to 1
float base = 1;
float height = 1;
// declare \'area\' as type float
float area;
// declare \'choice\' as type int
int choice;
do{
// display menu and prompt for user\'s choice
displayMenu();
// read in user\'s choice
cin >> choice;
// branch to the corresponding case for \'choice\'
switch(choice) {
case 1 :
// validate for positive dimesion(s)
// do{
// prompt for side length and read into \'base\'
// }while( !isPositive( base ) );
// calcSquareArea
// displayArea
do{
cout << \"Enter the Length of the Each Side For the Square : \";
cin >> base;
}while (!isPositive(base));
area = calcSquareArea (base);
displayArea(area);
break;
case 2:
// validate for positive dimesion(s)
// prompt for base and height and read in values
// calcRectangleArea
// displayArea
do{
cout << \"Enter the Base data of the Rectangle : \";
cin >> base;
}while (!isPositive(base));
do{
cout << \"Enter the Height data of the Rectangle : \";
cin >> height;
}while (!isPositive(height));
area = calcRectangleArea (base, height);
displayArea(area);
break;
case 3:
// validate for positive dimesion(s)
// prompt for base and height and read in values
// calcTriangleArea
// displayArea
do{
cout << \"Enter the Base data of the Triangle : \";
cin >> base;
}while (!isPositive(base));
do{
cout << \"Enter the Height data of the Triangle : \";
cin >> height;
}while (!isPositive(height));
area = calcTriangleArea (base, height);
displayArea(area);
break;
case 4:
// validate for positive dimesion(s)
// prompt for radius and read into \'base\'
// calcCircleArea
// displayArea
do{
cout << \"Enter the Radius data of the Circle : \";
cin >> base;
}while (!isPositive(base));
area = calcCircleArea (base);
displayArea(area);
break;
case 0:
// alert the user \"closing program\"
cout << \"Closing the Program.!\" << endl;
break;
default:
// alert the user \"invalid option\"
cout << \"Invalid Option..!!\" << endl;
break;
}
}while(choice != 0);
cout << endl;
return(0);
}
/*-------------------------------------*/
void displayMenu() {
cout << \"1. Area of a square \ \"
<< \"2. Area of a rectangle \ \"
<< \"3. Area of a triangle \ \"
<< \"4. Area of a circle \ \"
<< \"0. Exit\ \"
<< \"----------------------\ \"
<< \"Enter choice: \";
return;
}
bool isPositive(float a) {
if(a > 0){
return true;
} else {
cout << \"Invalid Data..!!\" << endl;
exit(0);
return false;
}
}
float calcSquareArea (float baseData) {
float are.
This document discusses assembler programming and 2-pass assembler algorithms. It provides example assembly language code and uses a 2-pass assembler approach to generate the symbol table, literal table, base table, and machine code for each example. Five questions are included with example AL code and the full solution showing the tables and machine code generated by the 2-pass assembler.
SAS codes and tricks Comprehensive all codesrizrazariz
This document contains SAS code to perform various data management and analysis tasks. It includes code to import and format data, create new variables, sort and merge datasets, conduct descriptive statistics, regression analysis, and programming logic using IF/THEN statements. The code imports several datasets, calculates summary statistics, explores relationships between variables, and creates new variables for modeling and analysis.
This document contains 16 programming problems and their solutions in PL/SQL. The problems cover basic concepts like nested programs, if/else conditions, loops (while, for), functions to find greatest of numbers, calculate interest, swap values, and more. Sample inputs and outputs are provided for each problem to demonstrate how the programs work. The goal is to help learn PL/SQL programming through examples.
Query Optimization & How to interpret query execution planAmol Barewar
Efficient methods of processing unanticipated queries are a crucial prerequisite for the success of generalized database management systems. A wide variety of approaches to improve the performance of query evaluation algorithms have been proposed: logic-based and semantic transformations, fast implementations of basic operations, and combinatorial or heuristic algorithms for generating alternative access plans and choosing among them. These methods are presented in the framework of a general query evaluation procedure using the relational calculus representation of queries
SAS codes and tricks Comprehensive all codessrizrazariz
https://www.dropbox.com/sh/s12ibnz9e14sn7d/AADmeewvF8Q2gfHwRMKMd_Jda?dl=0
sas useful codes and tricks
https://www.dropbox.com/sh/s12ibnz9e14sn7d/AADmeewvF8Q2gfHwRMKMd_Jda?dl=0
This document provides an overview of hardware description languages (HDLs) like Verilog and VHDL. It discusses that HDLs allow designing and simulating digital hardware at different levels of abstraction before fabrication. It then focuses on Verilog, describing that it is commonly used in the US while VHDL is more common in Europe. Key concepts covered include Verilog modules, simulation, levels of abstraction like gate-level and data flow modeling. Examples provided include a 2-input AND gate and a 4-bit ripple carry adder.
Learning SAS by Example -A Programmer’s Guide by Ron CodySolutionVibeesh CS
The document provides SAS code solutions to problems from Learning SAS by Example - A Programmer’s Guide by Ron Cody. The code samples demonstrate subsetting datasets using WHERE and IN operators, creating new variables using SELECT statements, and performing iterative processing using DO loops. Key functions used include WHERE, SELECT, SUM, RETAIN, INTCK, and more. The solutions cover topics like conditional processing, dates, and combining datasets.
Rina Wahyuni ~ Jual Harga & Detail Total Station Pentax R422 (Single Face) 08...Rina Wahyuni
TRANS SURVEY
Alamat : Jalan .Joglo Raya No.27A (11640) Jakarta Barat
Contact Person : Rina Wahyuni
Telp Kantor : (021) 22544580
No Ponsel :
Simpati : 081297551995/WA
XL : 087714476290/WA
Pin BB : 5BADB3CF
email : rinawahyuni260@gmail.com
website : http://www.transsurvey.net
Kami disini sebagai Perusahaan supplier alat survey tanah atau bangunan, alat survey telekomunikasi, alat survey geologi atau mining, dan alat survey lainnya diantaranya Total Station, Digital Theodolite, Automatic Level, GPS, Kompas, Binoculars, Monocullars, Laser Rangefinder, Teropong Malam, Digital Altimeter, Clinometer, Tandem, Digital Planimeter, Distometer Speed Gun, Measuring Wheel, Measuring Tape, Grounding Tester, HT Handy Talky, Sound Level Meter, dan alat alat Geologi.
Ditunjang dengan merk merk yang sudah terkenal dan telah diakui keberadaanya di dunia survey diantaranya Topcon,Nikon,Sokkia, Garmin, Trimble, Magellan, Suunto, Horizon, Bushnell, Bruunton
Leica, Bosch, South, Yamayo, Tajima, Icom, Kyoritsu,
Semoga keberadan kami dapat menjawab sekaligus memenuhi kebutuhan alat survey yang keberadaannya sangat dibutuhkan pada era perkembangan pembangunan dan tekhnologi pada saat ini.
KAMI MELAYANI PEMESANAN KESELURUH KOTA-KOTA DI INDONESIA,
Surabaya, Bali, Sidoarjo, Malang, Semarang, Yogyakarta, Pekalongan, Cirebon, Tangerang, Jakarta, Bandung, Sumatra, Aceh, Lampung, Medan, Riau, Batam, Jambi, Padang, Kalimantan, Samarinda, Pekanbaru, Bengkulu, Makasar, Menado, Sulawesi, Irian jaya,Papua, Ambon, Bangka Belitung, Banten, Jabar, Jateng, Jatim, Ntt, Ntb, Gorontalo, maluku DLL
Pengiriman Untuk Kota Jakarta Gratis. Luar Jakarta dengan layanan JNE,TIKI, KARGO, dan Exspedisi lainnya.
This document contains examples of C++ code demonstrating various programming concepts including:
- Declaring and initializing variables
- Arithmetic, assignment, and compound assignment operators
- goto loops
- Functions with parameters and returning values
- Passing parameters by reference
- Multiple return values from functions
- Default values in functions
PL/SQL is a database-oriented programming language that extends SQL with procedural capabilities like condition checking, looping, and branching. It allows programmers to handle errors and display user-friendly error messages. PL/SQL code is organized into declarative regions, and it can define variables, constants, cursors, procedures, and functions. Cursors are used to process result sets from a SQL query row by row.
the following SPOOL command will capture the results of .docxMARRY7
/* the following SPOOL command will capture the results of */
/* running this script in a SPOOL file name */
/* f:SLQ_Output_zero_for_Chap7.LST */
/* Note that the file is on a USB jumpdrive with a drive */
/* letter of f: */
/* The name assigned to this spool is not special in any way. */
/* You can assign any name to the file. The .LST file */
/* extension will be automatically added by the SPOOL process */
SPOOL f:SQL_Output_zero_for_Chap7;
/* Step-0 used to create and load textbook Chapter 7 tables */
DROP TABLE TBL_PRJ_EMPLOYEE;
DROP TABLE TBL_PRJ_CLIENT;
DROP TABLE TBL_PRJ_CAR;
DROP TABLE TBL_PRJ_MECHANIC;
/* Step-1 CREATE EMPLOYEE TABLE*/
CREATE TABLE TBL_PRJ_EMPLOYEE (
EMP_ID CHAR(10) PRIMARY KEY,
EMP_FNAME CHAR(15) NOT NULL,
EMP_LNAME CHAR(15) NOT NULL,
EMP_PHONE_NUMBER CHAR(10) NOT NULL,
EMP_ZIPCODE CHAR(5) NOT NULL,
CLIENT_ID CHAR(10) PRIMARY KEY,
C_PRICE VARCHAR(70) NOT NULL,
/* Step-2 CREATE ClIENT TABLE*/
CREATE TABLE TBL_PRJ_CLIENT (
CLIENT_ID CHAR(10) PRIMARY KEY,
CLIENT_FNAME CHAR(15) NOT NULL,
CLIENT_LNAME CHAR(15) NOT NULL,
CLIENT_PHONE_NUMBER CHAR(10) NOT NULL,
CLIENT_ZIPCODE CHAR(5) NOT NULL,
FOREIGN KEY (CLIENT_ID) REFERENCES TBL_PRJ_EMPLOYEE(CLIENT_ID),
/* Step-3 Create CAR table */
CREATE TABLE TBL_PRJ_CAR (
C_MAKE INTEGER PRIMARY KEY,
C_MODEL INTEGER PRIMARY KEY,
C_MAKE VARCHAR(70) NOT NULL,
C_MODEL VARCHAR(70) NOT NULL,
C_PRICE VARCHAR(70) NOT NULL,
C_YEAR VARCHAR(4) NOT NULL,
C_MPG VARCHAR(3) NOT NULL,
FOREIGN KEY (C_PRICE) REFERENCES TBL_PRJ_EMPLOYEE(C_PRICE),
/* Step-4 Create MECHANIC table */
CREATE TABLE TBL_PRJ_CLIENT (
MECHA_ID CHAR(10) PRIMARY KEY,
MECHA_FNAME CHAR(15) NOT NULL,
MECHA_LNAME CHAR(15) NOT NULL,
MECHA_EXTENSION CHAR(10) NOT NULL,
MECHA_COST CHAR(10) NOT NULL,
/* Step-5 Create INDEX table */
CREATE INDEX CLIE_INLNAME ON TBL_PRJ_CLIENT(CLIENT_LNAME);
CREATE INDEX CA_MODEL ON TBL_PRJ_CAR(CAR_MODEL);
/* Step-6 INSERT MECHANIC table */
INSERT INTO TBL_PRJ_MECHANIC VALUES ('1001','FRANCK','YEBOUE','614424514','43221','14253');
INSERT INTO TBL_PRJ_MECHANIC VALUES ('1002','JEFF','LO','614412515','43231','24587');
INSERT INTO TBL_PRJ_MECHANIC VALUES ('1011','HADJI','SECK','614524516','43220','35689');
INSERT INTO TBL_PRJ_MECHANIC VALUES ('1451','DARKO','MILIC','61824517','43227','1425');
INSERT INTO TBL_PRJ_MECHANIC VALUES ('1003','ANTHONY','BABEN','614224518','43228','125');
INSERT INTO TBL_PRJ_MECHANIC VALUES ('1781','GORA','SECK','614624519','43320','7896');
INSERT INTO TBL_PRJ_MECHANIC VALUES ('1401','IBRA','MOVIC','614424510','43221','14256');
INSERT INTO TBL_PRJ_MECHANIC VALUES ('1511','EZIQUEL','LAVEZZI','614724511','43229','478');
INSERT INTO TBL_PRJ_MECHANIC VALUES ('1004','JEAN','CL ...
1. The document provides examples of using CALL EXECUTE in SAS for programmers, statisticians, and data managers.
2. For programmers, CALL EXECUTE is used to include all SAS programs in a directory automatically.
3. For statisticians, it is used to generate consistent symbol statements for graphs based on treatment values from a data set.
4. For data managers, it allows searching through libnames for incorrect data by executing data checks using values from a data set.
Python And GIS - Beyond Modelbuilder And PythonwinChad Cooper
The document discusses using Python for GIS tasks beyond ESRI's ModelBuilder. It covers Python lists, code examples accessing databases and downloading files, using third-party modules, text editors and IDEs for Python development, and references for further learning about Python and GIS. The presentation and code discussed are available online.
We completed the Top down and Bottom Up design and layout of an n-bit general purpose shift register using Cadence Encounter RTL & Cadence Virtuoso Design Environment respectively in our VLSI II Laboratory. For the purpose of demonstration, we chose n=4. The Top down approach was completed upto generating synthesized Verilog code since the technology files required to do the layout was not available in our laboratory. However, we completed the Bottom up approach completely with an additional ESD protection circuit in order to ensure a better protection to the inner core of the chip.
This is a fairly easy project, but worth while. I created this scraper using free API to get weather information for a data warehouse. With detailed weather information by date and zip codes at your disposal, you can tie this with location information in your database or data warehouse to do extensive querying/analytics. E.g.
• How does rain affect my sales by region
• How does humidity affect sales
• How does cloud cover affect sales
• How does weather affect tips
• How does weather affect Employee productivity
The sky (pun intended) is virtually the limit on this.
Good Luck.
This document discusses various components used in embedded programs including state machines, stream-oriented programming, and queues. It provides examples of a state machine for a buzzer system and implementing a circular buffer for stream-oriented programming. Additionally, it covers topics like data flow graphs, control flow graphs, compiler optimizations, and interpreters versus just-in-time compilers.
This document describes a statistical analysis project to determine the factors that affect commercial flight landing distance. The author analyzes 950 flight observations to build a linear regression model with landing distance as the target variable. Key factors found to impact landing distance are aircraft type, ground speed, and height of the aircraft. The final regression equation found is: Distance =-2554.47 + 501.57(Aircraft_Cat)+ 42.79(Ground Speed)+ 12.52(Height), where Aircraft_Cat is a dummy variable for aircraft type. 832 observations were used to fit the final model after removing outliers.
Introduction to Jio Cinema**:
- Brief overview of Jio Cinema as a streaming platform.
- Its significance in the Indian market.
- Introduction to retention and engagement strategies in the streaming industry.
2. **Understanding Retention and Engagement**:
- Define retention and engagement in the context of streaming platforms.
- Importance of retaining users in a competitive market.
- Key metrics used to measure retention and engagement.
3. **Jio Cinema's Content Strategy**:
- Analysis of the content library offered by Jio Cinema.
- Focus on exclusive content, originals, and partnerships.
- Catering to diverse audience preferences (regional, genre-specific, etc.).
- User-generated content and interactive features.
4. **Personalization and Recommendation Algorithms**:
- How Jio Cinema leverages user data for personalized recommendations.
- Algorithmic strategies for suggesting content based on user preferences, viewing history, and behavior.
- Dynamic content curation to keep users engaged.
5. **User Experience and Interface Design**:
- Evaluation of Jio Cinema's user interface (UI) and user experience (UX).
- Accessibility features and device compatibility.
- Seamless navigation and search functionality.
- Integration with other Jio services.
6. **Community Building and Social Features**:
- Strategies for fostering a sense of community among users.
- User reviews, ratings, and comments.
- Social sharing and engagement features.
- Interactive events and campaigns.
7. **Retention through Loyalty Programs and Incentives**:
- Overview of loyalty programs and rewards offered by Jio Cinema.
- Subscription plans and benefits.
- Promotional offers, discounts, and partnerships.
- Gamification elements to encourage continued usage.
8. **Customer Support and Feedback Mechanisms**:
- Analysis of Jio Cinema's customer support infrastructure.
- Channels for user feedback and suggestions.
- Handling of user complaints and queries.
- Continuous improvement based on user feedback.
9. **Multichannel Engagement Strategies**:
- Utilization of multiple channels for user engagement (email, push notifications, SMS, etc.).
- Targeted marketing campaigns and promotions.
- Cross-promotion with other Jio services and partnerships.
- Integration with social media platforms.
10. **Data Analytics and Iterative Improvement**:
- Role of data analytics in understanding user behavior and preferences.
- A/B testing and experimentation to optimize engagement strategies.
- Iterative improvement based on data-driven insights.
This document contains multiple choice questions about SQL and PL/SQL concepts such as triggers, procedures, functions, exceptions, transactions and dynamic SQL. It tests knowledge of the different components needed to define triggers, how to call procedures and functions, transaction control statements, and exception handling.
The document discusses a case study on customer churn for a telecommunications company called Mobicom. It aims to identify the top five factors driving churn and recommend proactive retention programs. Key factors analyzed include usage, billing issues, network quality, data usage and rate plans. The analysis identifies age, retention calls, equipment age and length of relationship as top predictors of churn. It recommends rate plan migration and prioritizing high-churn customers for retention campaigns.
Please follow the cod eand comments for description CODE #incl.pdfannaielectronicsvill
Please follow the cod eand comments for description :
CODE :
#include // cin cout
#include // pow
#include // setprecision, fixed, showpoint
using namespace std;
/*--Function Prototypes--*/
void displayMenu();
bool isPositive(float a);
float calcSquareArea (float baseData);
float calcRectangleArea (float baseData, float heightData);
float calcTriangleArea (float baseData, float heightData);
float calcCircleArea (float radiusData);
void displayArea(float result);
/*-MAIN--------------------------------*/
int main() {
// declare \'base\' and \'height\' as type float
// and initialize them both to 1
float base = 1;
float height = 1;
// declare \'area\' as type float
float area;
// declare \'choice\' as type int
int choice;
do{
// display menu and prompt for user\'s choice
displayMenu();
// read in user\'s choice
cin >> choice;
// branch to the corresponding case for \'choice\'
switch(choice) {
case 1 :
// validate for positive dimesion(s)
// do{
// prompt for side length and read into \'base\'
// }while( !isPositive( base ) );
// calcSquareArea
// displayArea
do{
cout << \"Enter the Length of the Each Side For the Square : \";
cin >> base;
}while (!isPositive(base));
area = calcSquareArea (base);
displayArea(area);
break;
case 2:
// validate for positive dimesion(s)
// prompt for base and height and read in values
// calcRectangleArea
// displayArea
do{
cout << \"Enter the Base data of the Rectangle : \";
cin >> base;
}while (!isPositive(base));
do{
cout << \"Enter the Height data of the Rectangle : \";
cin >> height;
}while (!isPositive(height));
area = calcRectangleArea (base, height);
displayArea(area);
break;
case 3:
// validate for positive dimesion(s)
// prompt for base and height and read in values
// calcTriangleArea
// displayArea
do{
cout << \"Enter the Base data of the Triangle : \";
cin >> base;
}while (!isPositive(base));
do{
cout << \"Enter the Height data of the Triangle : \";
cin >> height;
}while (!isPositive(height));
area = calcTriangleArea (base, height);
displayArea(area);
break;
case 4:
// validate for positive dimesion(s)
// prompt for radius and read into \'base\'
// calcCircleArea
// displayArea
do{
cout << \"Enter the Radius data of the Circle : \";
cin >> base;
}while (!isPositive(base));
area = calcCircleArea (base);
displayArea(area);
break;
case 0:
// alert the user \"closing program\"
cout << \"Closing the Program.!\" << endl;
break;
default:
// alert the user \"invalid option\"
cout << \"Invalid Option..!!\" << endl;
break;
}
}while(choice != 0);
cout << endl;
return(0);
}
/*-------------------------------------*/
void displayMenu() {
cout << \"1. Area of a square \ \"
<< \"2. Area of a rectangle \ \"
<< \"3. Area of a triangle \ \"
<< \"4. Area of a circle \ \"
<< \"0. Exit\ \"
<< \"----------------------\ \"
<< \"Enter choice: \";
return;
}
bool isPositive(float a) {
if(a > 0){
return true;
} else {
cout << \"Invalid Data..!!\" << endl;
exit(0);
return false;
}
}
float calcSquareArea (float baseData) {
float are.
This document discusses assembler programming and 2-pass assembler algorithms. It provides example assembly language code and uses a 2-pass assembler approach to generate the symbol table, literal table, base table, and machine code for each example. Five questions are included with example AL code and the full solution showing the tables and machine code generated by the 2-pass assembler.
SAS codes and tricks Comprehensive all codesrizrazariz
This document contains SAS code to perform various data management and analysis tasks. It includes code to import and format data, create new variables, sort and merge datasets, conduct descriptive statistics, regression analysis, and programming logic using IF/THEN statements. The code imports several datasets, calculates summary statistics, explores relationships between variables, and creates new variables for modeling and analysis.
This document contains 16 programming problems and their solutions in PL/SQL. The problems cover basic concepts like nested programs, if/else conditions, loops (while, for), functions to find greatest of numbers, calculate interest, swap values, and more. Sample inputs and outputs are provided for each problem to demonstrate how the programs work. The goal is to help learn PL/SQL programming through examples.
Query Optimization & How to interpret query execution planAmol Barewar
Efficient methods of processing unanticipated queries are a crucial prerequisite for the success of generalized database management systems. A wide variety of approaches to improve the performance of query evaluation algorithms have been proposed: logic-based and semantic transformations, fast implementations of basic operations, and combinatorial or heuristic algorithms for generating alternative access plans and choosing among them. These methods are presented in the framework of a general query evaluation procedure using the relational calculus representation of queries
SAS codes and tricks Comprehensive all codessrizrazariz
https://www.dropbox.com/sh/s12ibnz9e14sn7d/AADmeewvF8Q2gfHwRMKMd_Jda?dl=0
sas useful codes and tricks
https://www.dropbox.com/sh/s12ibnz9e14sn7d/AADmeewvF8Q2gfHwRMKMd_Jda?dl=0
This document provides an overview of hardware description languages (HDLs) like Verilog and VHDL. It discusses that HDLs allow designing and simulating digital hardware at different levels of abstraction before fabrication. It then focuses on Verilog, describing that it is commonly used in the US while VHDL is more common in Europe. Key concepts covered include Verilog modules, simulation, levels of abstraction like gate-level and data flow modeling. Examples provided include a 2-input AND gate and a 4-bit ripple carry adder.
Learning SAS by Example -A Programmer’s Guide by Ron CodySolutionVibeesh CS
The document provides SAS code solutions to problems from Learning SAS by Example - A Programmer’s Guide by Ron Cody. The code samples demonstrate subsetting datasets using WHERE and IN operators, creating new variables using SELECT statements, and performing iterative processing using DO loops. Key functions used include WHERE, SELECT, SUM, RETAIN, INTCK, and more. The solutions cover topics like conditional processing, dates, and combining datasets.
Rina Wahyuni ~ Jual Harga & Detail Total Station Pentax R422 (Single Face) 08...Rina Wahyuni
TRANS SURVEY
Alamat : Jalan .Joglo Raya No.27A (11640) Jakarta Barat
Contact Person : Rina Wahyuni
Telp Kantor : (021) 22544580
No Ponsel :
Simpati : 081297551995/WA
XL : 087714476290/WA
Pin BB : 5BADB3CF
email : rinawahyuni260@gmail.com
website : http://www.transsurvey.net
Kami disini sebagai Perusahaan supplier alat survey tanah atau bangunan, alat survey telekomunikasi, alat survey geologi atau mining, dan alat survey lainnya diantaranya Total Station, Digital Theodolite, Automatic Level, GPS, Kompas, Binoculars, Monocullars, Laser Rangefinder, Teropong Malam, Digital Altimeter, Clinometer, Tandem, Digital Planimeter, Distometer Speed Gun, Measuring Wheel, Measuring Tape, Grounding Tester, HT Handy Talky, Sound Level Meter, dan alat alat Geologi.
Ditunjang dengan merk merk yang sudah terkenal dan telah diakui keberadaanya di dunia survey diantaranya Topcon,Nikon,Sokkia, Garmin, Trimble, Magellan, Suunto, Horizon, Bushnell, Bruunton
Leica, Bosch, South, Yamayo, Tajima, Icom, Kyoritsu,
Semoga keberadan kami dapat menjawab sekaligus memenuhi kebutuhan alat survey yang keberadaannya sangat dibutuhkan pada era perkembangan pembangunan dan tekhnologi pada saat ini.
KAMI MELAYANI PEMESANAN KESELURUH KOTA-KOTA DI INDONESIA,
Surabaya, Bali, Sidoarjo, Malang, Semarang, Yogyakarta, Pekalongan, Cirebon, Tangerang, Jakarta, Bandung, Sumatra, Aceh, Lampung, Medan, Riau, Batam, Jambi, Padang, Kalimantan, Samarinda, Pekanbaru, Bengkulu, Makasar, Menado, Sulawesi, Irian jaya,Papua, Ambon, Bangka Belitung, Banten, Jabar, Jateng, Jatim, Ntt, Ntb, Gorontalo, maluku DLL
Pengiriman Untuk Kota Jakarta Gratis. Luar Jakarta dengan layanan JNE,TIKI, KARGO, dan Exspedisi lainnya.
This document contains examples of C++ code demonstrating various programming concepts including:
- Declaring and initializing variables
- Arithmetic, assignment, and compound assignment operators
- goto loops
- Functions with parameters and returning values
- Passing parameters by reference
- Multiple return values from functions
- Default values in functions
PL/SQL is a database-oriented programming language that extends SQL with procedural capabilities like condition checking, looping, and branching. It allows programmers to handle errors and display user-friendly error messages. PL/SQL code is organized into declarative regions, and it can define variables, constants, cursors, procedures, and functions. Cursors are used to process result sets from a SQL query row by row.
the following SPOOL command will capture the results of .docxMARRY7
/* the following SPOOL command will capture the results of */
/* running this script in a SPOOL file name */
/* f:SLQ_Output_zero_for_Chap7.LST */
/* Note that the file is on a USB jumpdrive with a drive */
/* letter of f: */
/* The name assigned to this spool is not special in any way. */
/* You can assign any name to the file. The .LST file */
/* extension will be automatically added by the SPOOL process */
SPOOL f:SQL_Output_zero_for_Chap7;
/* Step-0 used to create and load textbook Chapter 7 tables */
DROP TABLE TBL_PRJ_EMPLOYEE;
DROP TABLE TBL_PRJ_CLIENT;
DROP TABLE TBL_PRJ_CAR;
DROP TABLE TBL_PRJ_MECHANIC;
/* Step-1 CREATE EMPLOYEE TABLE*/
CREATE TABLE TBL_PRJ_EMPLOYEE (
EMP_ID CHAR(10) PRIMARY KEY,
EMP_FNAME CHAR(15) NOT NULL,
EMP_LNAME CHAR(15) NOT NULL,
EMP_PHONE_NUMBER CHAR(10) NOT NULL,
EMP_ZIPCODE CHAR(5) NOT NULL,
CLIENT_ID CHAR(10) PRIMARY KEY,
C_PRICE VARCHAR(70) NOT NULL,
/* Step-2 CREATE ClIENT TABLE*/
CREATE TABLE TBL_PRJ_CLIENT (
CLIENT_ID CHAR(10) PRIMARY KEY,
CLIENT_FNAME CHAR(15) NOT NULL,
CLIENT_LNAME CHAR(15) NOT NULL,
CLIENT_PHONE_NUMBER CHAR(10) NOT NULL,
CLIENT_ZIPCODE CHAR(5) NOT NULL,
FOREIGN KEY (CLIENT_ID) REFERENCES TBL_PRJ_EMPLOYEE(CLIENT_ID),
/* Step-3 Create CAR table */
CREATE TABLE TBL_PRJ_CAR (
C_MAKE INTEGER PRIMARY KEY,
C_MODEL INTEGER PRIMARY KEY,
C_MAKE VARCHAR(70) NOT NULL,
C_MODEL VARCHAR(70) NOT NULL,
C_PRICE VARCHAR(70) NOT NULL,
C_YEAR VARCHAR(4) NOT NULL,
C_MPG VARCHAR(3) NOT NULL,
FOREIGN KEY (C_PRICE) REFERENCES TBL_PRJ_EMPLOYEE(C_PRICE),
/* Step-4 Create MECHANIC table */
CREATE TABLE TBL_PRJ_CLIENT (
MECHA_ID CHAR(10) PRIMARY KEY,
MECHA_FNAME CHAR(15) NOT NULL,
MECHA_LNAME CHAR(15) NOT NULL,
MECHA_EXTENSION CHAR(10) NOT NULL,
MECHA_COST CHAR(10) NOT NULL,
/* Step-5 Create INDEX table */
CREATE INDEX CLIE_INLNAME ON TBL_PRJ_CLIENT(CLIENT_LNAME);
CREATE INDEX CA_MODEL ON TBL_PRJ_CAR(CAR_MODEL);
/* Step-6 INSERT MECHANIC table */
INSERT INTO TBL_PRJ_MECHANIC VALUES ('1001','FRANCK','YEBOUE','614424514','43221','14253');
INSERT INTO TBL_PRJ_MECHANIC VALUES ('1002','JEFF','LO','614412515','43231','24587');
INSERT INTO TBL_PRJ_MECHANIC VALUES ('1011','HADJI','SECK','614524516','43220','35689');
INSERT INTO TBL_PRJ_MECHANIC VALUES ('1451','DARKO','MILIC','61824517','43227','1425');
INSERT INTO TBL_PRJ_MECHANIC VALUES ('1003','ANTHONY','BABEN','614224518','43228','125');
INSERT INTO TBL_PRJ_MECHANIC VALUES ('1781','GORA','SECK','614624519','43320','7896');
INSERT INTO TBL_PRJ_MECHANIC VALUES ('1401','IBRA','MOVIC','614424510','43221','14256');
INSERT INTO TBL_PRJ_MECHANIC VALUES ('1511','EZIQUEL','LAVEZZI','614724511','43229','478');
INSERT INTO TBL_PRJ_MECHANIC VALUES ('1004','JEAN','CL ...
1. The document provides examples of using CALL EXECUTE in SAS for programmers, statisticians, and data managers.
2. For programmers, CALL EXECUTE is used to include all SAS programs in a directory automatically.
3. For statisticians, it is used to generate consistent symbol statements for graphs based on treatment values from a data set.
4. For data managers, it allows searching through libnames for incorrect data by executing data checks using values from a data set.
Python And GIS - Beyond Modelbuilder And PythonwinChad Cooper
The document discusses using Python for GIS tasks beyond ESRI's ModelBuilder. It covers Python lists, code examples accessing databases and downloading files, using third-party modules, text editors and IDEs for Python development, and references for further learning about Python and GIS. The presentation and code discussed are available online.
We completed the Top down and Bottom Up design and layout of an n-bit general purpose shift register using Cadence Encounter RTL & Cadence Virtuoso Design Environment respectively in our VLSI II Laboratory. For the purpose of demonstration, we chose n=4. The Top down approach was completed upto generating synthesized Verilog code since the technology files required to do the layout was not available in our laboratory. However, we completed the Bottom up approach completely with an additional ESD protection circuit in order to ensure a better protection to the inner core of the chip.
This is a fairly easy project, but worth while. I created this scraper using free API to get weather information for a data warehouse. With detailed weather information by date and zip codes at your disposal, you can tie this with location information in your database or data warehouse to do extensive querying/analytics. E.g.
• How does rain affect my sales by region
• How does humidity affect sales
• How does cloud cover affect sales
• How does weather affect tips
• How does weather affect Employee productivity
The sky (pun intended) is virtually the limit on this.
Good Luck.
This document discusses various components used in embedded programs including state machines, stream-oriented programming, and queues. It provides examples of a state machine for a buzzer system and implementing a circular buffer for stream-oriented programming. Additionally, it covers topics like data flow graphs, control flow graphs, compiler optimizations, and interpreters versus just-in-time compilers.
This document describes a statistical analysis project to determine the factors that affect commercial flight landing distance. The author analyzes 950 flight observations to build a linear regression model with landing distance as the target variable. Key factors found to impact landing distance are aircraft type, ground speed, and height of the aircraft. The final regression equation found is: Distance =-2554.47 + 501.57(Aircraft_Cat)+ 42.79(Ground Speed)+ 12.52(Height), where Aircraft_Cat is a dummy variable for aircraft type. 832 observations were used to fit the final model after removing outliers.
Introduction to Jio Cinema**:
- Brief overview of Jio Cinema as a streaming platform.
- Its significance in the Indian market.
- Introduction to retention and engagement strategies in the streaming industry.
2. **Understanding Retention and Engagement**:
- Define retention and engagement in the context of streaming platforms.
- Importance of retaining users in a competitive market.
- Key metrics used to measure retention and engagement.
3. **Jio Cinema's Content Strategy**:
- Analysis of the content library offered by Jio Cinema.
- Focus on exclusive content, originals, and partnerships.
- Catering to diverse audience preferences (regional, genre-specific, etc.).
- User-generated content and interactive features.
4. **Personalization and Recommendation Algorithms**:
- How Jio Cinema leverages user data for personalized recommendations.
- Algorithmic strategies for suggesting content based on user preferences, viewing history, and behavior.
- Dynamic content curation to keep users engaged.
5. **User Experience and Interface Design**:
- Evaluation of Jio Cinema's user interface (UI) and user experience (UX).
- Accessibility features and device compatibility.
- Seamless navigation and search functionality.
- Integration with other Jio services.
6. **Community Building and Social Features**:
- Strategies for fostering a sense of community among users.
- User reviews, ratings, and comments.
- Social sharing and engagement features.
- Interactive events and campaigns.
7. **Retention through Loyalty Programs and Incentives**:
- Overview of loyalty programs and rewards offered by Jio Cinema.
- Subscription plans and benefits.
- Promotional offers, discounts, and partnerships.
- Gamification elements to encourage continued usage.
8. **Customer Support and Feedback Mechanisms**:
- Analysis of Jio Cinema's customer support infrastructure.
- Channels for user feedback and suggestions.
- Handling of user complaints and queries.
- Continuous improvement based on user feedback.
9. **Multichannel Engagement Strategies**:
- Utilization of multiple channels for user engagement (email, push notifications, SMS, etc.).
- Targeted marketing campaigns and promotions.
- Cross-promotion with other Jio services and partnerships.
- Integration with social media platforms.
10. **Data Analytics and Iterative Improvement**:
- Role of data analytics in understanding user behavior and preferences.
- A/B testing and experimentation to optimize engagement strategies.
- Iterative improvement based on data-driven insights.
Predictably Improve Your B2B Tech Company's Performance by Leveraging DataKiwi Creative
Harness the power of AI-backed reports, benchmarking and data analysis to predict trends and detect anomalies in your marketing efforts.
Peter Caputa, CEO at Databox, reveals how you can discover the strategies and tools to increase your growth rate (and margins!).
From metrics to track to data habits to pick up, enhance your reporting for powerful insights to improve your B2B tech company's marketing.
- - -
This is the webinar recording from the June 2024 HubSpot User Group (HUG) for B2B Technology USA.
Watch the video recording at https://youtu.be/5vjwGfPN9lw
Sign up for future HUG events at https://events.hubspot.com/b2b-technology-usa/
Orchestrating the Future: Navigating Today's Data Workflow Challenges with Ai...Kaxil Naik
Navigating today's data landscape isn't just about managing workflows; it's about strategically propelling your business forward. Apache Airflow has stood out as the benchmark in this arena, driving data orchestration forward since its early days. As we dive into the complexities of our current data-rich environment, where the sheer volume of information and its timely, accurate processing are crucial for AI and ML applications, the role of Airflow has never been more critical.
In my journey as the Senior Engineering Director and a pivotal member of Apache Airflow's Project Management Committee (PMC), I've witnessed Airflow transform data handling, making agility and insight the norm in an ever-evolving digital space. At Astronomer, our collaboration with leading AI & ML teams worldwide has not only tested but also proven Airflow's mettle in delivering data reliably and efficiently—data that now powers not just insights but core business functions.
This session is a deep dive into the essence of Airflow's success. We'll trace its evolution from a budding project to the backbone of data orchestration it is today, constantly adapting to meet the next wave of data challenges, including those brought on by Generative AI. It's this forward-thinking adaptability that keeps Airflow at the forefront of innovation, ready for whatever comes next.
The ever-growing demands of AI and ML applications have ushered in an era where sophisticated data management isn't a luxury—it's a necessity. Airflow's innate flexibility and scalability are what makes it indispensable in managing the intricate workflows of today, especially those involving Large Language Models (LLMs).
This talk isn't just a rundown of Airflow's features; it's about harnessing these capabilities to turn your data workflows into a strategic asset. Together, we'll explore how Airflow remains at the cutting edge of data orchestration, ensuring your organization is not just keeping pace but setting the pace in a data-driven future.
Session in https://budapestdata.hu/2024/04/kaxil-naik-astronomer-io/ | https://dataml24.sessionize.com/session/667627
Build applications with generative AI on Google CloudMárton Kodok
We will explore Vertex AI - Model Garden powered experiences, we are going to learn more about the integration of these generative AI APIs. We are going to see in action what the Gemini family of generative models are for developers to build and deploy AI-driven applications. Vertex AI includes a suite of foundation models, these are referred to as the PaLM and Gemini family of generative ai models, and they come in different versions. We are going to cover how to use via API to: - execute prompts in text and chat - cover multimodal use cases with image prompts. - finetune and distill to improve knowledge domains - run function calls with foundation models to optimize them for specific tasks. At the end of the session, developers will understand how to innovate with generative AI and develop apps using the generative ai industry trends.
We are pleased to share with you the latest VCOSA statistical report on the cotton and yarn industry for the month of March 2024.
Starting from January 2024, the full weekly and monthly reports will only be available for free to VCOSA members. To access the complete weekly report with figures, charts, and detailed analysis of the cotton fiber market in the past week, interested parties are kindly requested to contact VCOSA to subscribe to the newsletter.
3. Introduction
• A simple data step concept first proposed
by Ian Whitlock on the SAS – L list with
Don Henderson.
• Detail analysis by Paul Dorfman and
Howard Schreier.
• The term DOW (DO – Whitlock) loop was
coined by Dorfman.
4. Structure of the DOW Loop
• The original DOW loop is a simple do
loop with a set statement in the structure.
Data ... ;
<Stuff done before break-event> ;
Do <Index Specs> Until ( Break-Event ) ;
Set A ;
<Stuff done for each record> ;
End ;
<Stuff done after break-event... > ;
Run ;
5. Application 1: Cartesian Join
• Cartesian Join is one of the simple things
that can be easily achieved in a single
SQL statement.
PROC SQL;
CREATE TABLE DATA AS SELECT * FROM
A,B;
QUIT;
6. Application 1: Cartesian Join
• Cartesian Joins can also be done
using a simple DOW loop.
• Not as simple and as elegant as the
SQL statement
• Applicable to all versions of SAS
DATA CART_JOIN;
SET A;
DO J = 1 TO COUNT;
SET B NOBS=COUNT POINT=J;
OUTPUT;
END;
RUN;
7. The engine
A B C D
1 2 3 4
1 2 3 4
1 2 3 4
1 2 3 4
DATA CART_JOIN;
SET A;
DO J = 1 TO 4;
SET B NOBS=COUNT POINT=J;
OUTPUT;
END;
RUN;
8. The engine
A B C D
1 2 3 4
1 2 3 4
1 2 3 4
1 2 3 4
DATA CART_JOIN;
SET A;
DO J = 1 TO 4;
SET B NOBS=COUNT POINT=J;
OUTPUT;
END;
RUN;
9. The engine
A B C D
1 2 3 4
1 2 3 4
1 2 3 4
1 2 3 4
DATA CART_JOIN;
SET A;
DO J = 1 TO 4;
SET B NOBS=COUNT POINT=J;
OUTPUT;
END;
RUN;
10. The engine
A B C D
1 2 3 4
1 2 3 4
1 2 3 4
1 2 3 4
DATA CART_JOIN;
SET A;
DO J = 1 TO 4;
SET B NOBS=COUNT POINT=J;
OUTPUT;
END;
RUN;
11. The engine
A B C D
1 2 3 4
1 2 3 4
1 2 3 4
1 2 3 4
DATA CART_JOIN;
SET A;
DO J = 1 TO 4;
SET B NOBS=COUNT POINT=J;
OUTPUT;
END;
RUN;
12. The engine
A B C D
1 2 3 4
1 2 3 4
1 2 3 4
1 2 3 4
DATA CART_JOIN;
SET A;
DO J = 1 TO 4;
SET B NOBS=COUNT POINT=J;
OUTPUT;
END;
RUN;
13. The engine
A B C D
1 2 3 4
1 2 3 4
1 2 3 4
1 2 3 4
DATA CART_JOIN;
SET A;
DO J = 1 TO 4;
SET B NOBS=COUNT POINT=J;
OUTPUT;
END;
RUN;
14. The engine
A B C D
1 2 3 4
1 2 3 4
1 2 3 4
1 2 3 4
DATA CART_JOIN;
SET A;
DO J = 1 TO 4;
SET B NOBS=COUNT POINT=J;
OUTPUT;
END;
RUN;
15. The engine
A B C D
1 2 3 4
1 2 3 4
1 2 3 4
1 2 3 4
DATA CART_JOIN;
SET A;
DO J = 1 TO 4;
SET B NOBS=COUNT POINT=J;
OUTPUT;
END;
RUN;
16. The engine
A B C D
1 2 3 4
1 2 3 4
1 2 3 4
1 2 3 4
DATA CART_JOIN;
SET A;
DO J = 1 TO 4;
SET B NOBS=COUNT POINT=J;
OUTPUT;
END;
RUN;
17. The engine
A B C D
1 2 3 4
1 2 3 4
1 2 3 4
1 2 3 4
DATA CART_JOIN;
SET A;
DO J = 1 TO 4;
SET B NOBS=COUNT POINT=J;
OUTPUT;
END;
RUN;
18. The engine
A B C D
1 2 3 4
1 2 3 4
1 2 3 4
1 2 3 4
DATA CART_JOIN;
SET A;
DO J = 1 TO 4;
SET B NOBS=COUNT POINT=J;
OUTPUT;
END;
RUN;
19. The engine
A B C D
1 2 3 4
1 2 3 4
1 2 3 4
1 2 3 4
DATA CART_JOIN;
SET A;
DO J = 1 TO 4;
SET B NOBS=COUNT POINT=J;
OUTPUT;
END;
RUN;
20. The engine
A B C D
1 2 3 4
1 2 3 4
1 2 3 4
1 2 3 4
DATA CART_JOIN;
SET A;
DO J = 1 TO 4;
SET B NOBS=COUNT POINT=J;
OUTPUT;
END;
RUN;
21. The engine
A B C D
1 2 3 4
1 2 3 4
1 2 3 4
1 2 3 4
DATA CART_JOIN;
SET A;
DO J = 1 TO 4;
SET B NOBS=COUNT POINT=J;
OUTPUT;
END;
RUN;
22. The engine
A B C D
1 2 3 4
1 2 3 4
1 2 3 4
1 2 3 4
DATA CART_JOIN;
SET A;
DO J = 1 TO 4;
SET B NOBS=COUNT POINT=J;
OUTPUT;
END;
RUN;
23. The engine
A B C D
1 2 3 4
1 2 3 4
1 2 3 4
1 2 3 4
DATA CART_JOIN;
SET A;
DO J = 1 TO 4;
SET B NOBS=COUNT POINT=J;
OUTPUT;
END;
RUN;
24. The engine
A B C D
1 2 3 4
1 2 3 4
1 2 3 4
1 2 3 4
DATA CART_JOIN;
SET A;
DO J = 1 TO 4;
SET B NOBS=COUNT POINT=J;
OUTPUT;
END;
RUN;
25. The engine
A B C D
1 2 3 4
1 2 3 4
1 2 3 4
1 2 3 4
DATA CART_JOIN;
SET A;
DO J = 1 TO 4;
SET B NOBS=COUNT POINT=J;
OUTPUT;
END;
RUN;
26. The engine
A B C D
1 2 3 4
1 2 3 4
1 2 3 4
1 2 3 4
DATA CART_JOIN;
SET A;
DO J = 1 TO 4;
SET B NOBS=COUNT POINT=J;
OUTPUT;
END;
RUN;
27. The engine
A B C D
1 2 3 4
1 2 3 4
1 2 3 4
1 2 3 4
DATA CART_JOIN;
SET A;
DO J = 1 TO 4;
SET B NOBS=COUNT POINT=J;
OUTPUT;
END;
RUN;
28. Application 2: Geometric Mean
• Most of the mathematical and statistical
functions in SAS are column based and
deriving a calculation for just a single
column can be very troublesome.
• The DOW loop provides a simple
solution to these problems.
• We can use a DOW loop to loop through
the observations and derive the answer.
29. Application 2: Geometric Mean
/*LOOP RUN*/
DATA _NULL_;
/*SINGLE DO LOOP*/
DO UNTIL (EOF);
SET HAVE END=EOF;
BY CATEGORY;
/*RESETING THE PREVIOUS VALUE*/
IF FIRST.CATEGORY THEN DO;
TOTAL = 1;
COUNT = 0;
END;
/*CALCULATING THE TOTAL SUM AND COUNTS VALUE*/
TOTAL = TOTAL*NUMBER;
COUNT = SUM(COUNT,1);
/*OUTPUTING THE RESULTS AND THE GEOMETRIC MEAN CALCULATION*/
IF LAST.CATEGORY THEN DO;
/*CALCULATION FORMULA AS PER THE INSTRUCTION IN SAS HELP*/
GEOMEAN = TOTAL**(1/COUNT);
/*OUTPUTING THE SOLUTION*/
PUT CATEGORY= GEOMEAN=;
OUTPUT;
END;
END;
RUN;
30. DATA _NULL_;
DO UNTIL (EOF);
SET A END = EOF;
COUNT = SUM(COUNT,1);
VALUE = SUM(VALUE,A);
END;
RUN;
The engine
A B C D
1 2 3 4
2 2 3 4
3 2 3 4
4 2 3 4
Count Value
31. DATA _NULL_;
DO UNTIL (EOF);
SET A END = EOF;
COUNT = SUM(COUNT,1);
VALUE = SUM(VALUE,A);
END;
RUN;
The engine
A B C D
1 2 3 4
2 2 3 4
3 2 3 4
4 2 3 4
Count Value
1
32. DATA _NULL_;
DO UNTIL (EOF);
SET A END = EOF;
COUNT = SUM(COUNT,1);
VALUE = SUM(VALUE,A);
END;
RUN;
The engine
A B C D
1 2 3 4
2 2 3 4
3 2 3 4
4 2 3 4
Count Value
1 1
33. DATA _NULL_;
DO UNTIL (EOF);
SET A END = EOF;
COUNT = SUM(COUNT,1);
VALUE = SUM(VALUE,A);
END;
RUN;
The engine
A B C D
1 2 3 4
2 2 3 4
3 2 3 4
4 2 3 4
Count Value
1 1
34. DATA _NULL_;
DO UNTIL (EOF);
SET A END = EOF;
COUNT = SUM(COUNT,1);
VALUE = SUM(VALUE,A);
END;
RUN;
The engine
A B C D
1 2 3 4
2 2 3 4
3 2 3 4
4 2 3 4
Count Value
1 1
2
35. DATA _NULL_;
DO UNTIL (EOF);
SET A END = EOF;
COUNT = SUM(COUNT,1);
VALUE = SUM(VALUE,A);
END;
RUN;
The engine
A B C D
1 2 3 4
2 2 3 4
3 2 3 4
4 2 3 4
Count Value
1 1
2 3
36. DATA _NULL_;
DO UNTIL (EOF);
SET A END = EOF;
COUNT = SUM(COUNT,1);
VALUE = SUM(VALUE,A);
END;
RUN;
The engine
A B C D
1 2 3 4
2 2 3 4
3 2 3 4
4 2 3 4
Count Value
1 1
2 3
37. DATA _NULL_;
DO UNTIL (EOF);
SET A END = EOF;
COUNT = SUM(COUNT,1);
VALUE = SUM(VALUE,A);
END;
RUN;
The engine
A B C D
1 2 3 4
2 2 3 4
3 2 3 4
4 2 3 4
Count Value
1 1
2 3
3
38. DATA _NULL_;
DO UNTIL (EOF);
SET A END = EOF;
COUNT = SUM(COUNT,1);
VALUE = SUM(VALUE,A);
END;
RUN;
The engine
A B C D
1 2 3 4
2 2 3 4
3 2 3 4
4 2 3 4
Count Value
1 1
2 3
3 6
39. DATA _NULL_;
DO UNTIL (EOF);
SET A END = EOF;
COUNT = SUM(COUNT,1);
VALUE = SUM(VALUE,A);
END;
RUN;
The engine
A B C D
1 2 3 4
2 2 3 4
3 2 3 4
4 2 3 4
Count Value
1 1
2 3
3 6
40. DATA _NULL_;
DO UNTIL (EOF);
SET A END = EOF;
COUNT = SUM(COUNT,1);
VALUE = SUM(VALUE,A);
END;
RUN;
The engine
A B C D
1 2 3 4
2 2 3 4
3 2 3 4
4 2 3 4
Count Value
1 1
2 3
3 6
4
41. DATA _NULL_;
DO UNTIL (EOF);
SET A END = EOF;
COUNT = SUM(COUNT,1);
VALUE = SUM(VALUE,A);
END;
RUN;
The engine
A B C D
1 2 3 4
2 2 3 4
3 2 3 4
4 2 3 4
Count Value
1 1
2 3
3 6
4 10
42. Multiple DOW Loop
• The double DOW loop structure
was first proposed by Howard
Scherier on the SAS – L as a
variation of the original technique.
• There have been several
approaches which use multiple
DOW loops to achieve various
calculations which requires multiple
iterations through the data.
43. Application 3: Bivariate Regression
• In order to calculate the
parameters of the regression, we
have to first calculate the mean of
both the x and y variables.
• After running through this, we will
then use the mean to calculate the
sum of square for both x-squares
and xy which are essential for the
regression parameter estimation.
44. Application 3: Bivariate Regression
/******************************************************************************
-------------------------------------------------------------------------------
DOW LOOP REGRESSION
-------------------------------------------------------------------------------
THIS MACRO IS A SIMPLE DEMONSTRATION THE USE OF DOUBLE DOW LOOP TO COMPUTE THE
SLOPE AND INTERCEPT OF A SIMPLE LINEAR REGRESSION MODEL.
-------------------------------------------------------------------------------
INPUT DESCRIPTION
-------------------------------------------------------------------------------
INPUT INPUT DATASET
Y DEPEDENT VARIABLE
X INDEPENDENT VARIABLE
-------------------------------------------------------------------------------
*******************************************************************************/
%LET INPUT = HTWT;
%LET Y = HEIGHT;
%LET X = WEIGHT;
/******************************************************************************/
45. Application 3: Bivariate Regression
/******************************************************************************
MAIN MACRO
*******************************************************************************/
%MACRO DOW_REG();
/******************************************************************************/
/******************************************************************************
*******************************************************************************/
DATA _NULL_;
/******************************************************************************
FIRST DOW LOOP FOR MEANS CALCULATION SUMMARIZATION
*******************************************************************************/
DO I = 1 BY 1 UNTIL (EOF);
SET &INPUT END=EOF;
SUM_Y = SUM(SUM_Y,&Y);
SUM_X = SUM(SUM_X,&X);
COUNT = SUM(COUNT,1);
END;
/******************************************************************************
MEANS CALCULATION
*******************************************************************************/
MEAN_Y = SUM_Y/COUNT;
MEAN_X = SUM_X/COUNT;
46. Application 3: Bivariate Regression
/******************************************************************************
LOOP TO CALCULATE SUM OF SQUARES AND XY
*******************************************************************************/
DO _N_ = 1 TO COUNT;
SET &INPUT;
XY = (&Y - MEAN_Y)*(&X - MEAN_X);
XX = (&X - MEAN_X)**2;
SUM_XY = SUM(SUM_XY,XY);
SUM_XX = SUM(SUM_XX,XX);
END;
/******************************************************************************
CALCULATION OF SLOPES
*******************************************************************************/
SLOPE = SUM_XY/SUM_XX;
INTERCEPT = MEAN_Y - SLOPE*MEAN_X;
PUT SLOPE = INTERCEPT = ;
/******************************************************************************
*******************************************************************************/
RUN;
%MEND;
/******************************************************************************
MACRO CALLING
*******************************************************************************/
%DOW_REG();
47. Conclusion
• One of the most versatile programming
structures in SAS
• Can be used on a variety of scenario to
achieve the required results
• Beside data manipulation, DOW loops
are also useful for summarization of
data, mathematical calculations and
even model parameter estimations.
Editor's Notes
The do loop in the middle is known as the DOW loop structure.
The DOW loop basically separates the data step into three different steps.
The first step is done to create some variables that need to be used for the DOW loop section.
Typical statements in this area are RETAIN and ARRAY statements.
The second part of the structure is the DOW loop itself.
This part is the main engine of structure.
It presents the user with a variety of options to create new variables, summarizing information and other nifty tricks to work with.
This is also the section which can be very troublesome should the users do something wrong here.
The last portion is a final calculation step which is useful for final summarization or calculations involving overall summarization.
This step is occasionally being used for the subsequent DOW loops such as those in the Double DOW loop programming structure.
You can distinctly see the structure of the DOW loop easily.
The first set statement is the first portion of the DOW structure which basically reads in one dataset.
The main part which is the DOW loop is the part that reads in the second dataset and setting each observations of the second dataset to the first dataset.
Each combination is then outputted by the single output statement.
In this particular DOW loop, only the main structure of the DOW is being used.
The loop uses a EOF statement to identify the end of a loop and uses a by statement as in this case, it was a calculation of geometric mean for each sub category.
At the end of each loop, a summarization process takes place and the geometric mean calculated accordingly.