425.Can Advanced SAS Programming Detect Fraud And Correct Data Errors In Global Space Ground Station Operations?

Exploring Data Accuracy And Fraud Detection In Global Ground Station Operations Using SAS

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

HERE IN THIS PROJECT WE USED THESE SAS STATEMENTS —DATA STEP | LENGTH | INPUT | DATALINES | FORMAT | SET | IF-THEN- KEEP | DROP | MERGE | PROC SORT | PROC PRINT | PROC APPEND | PROC TRANSPOSE | PROC DATASETS | MACRO

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Introduction

Space ground stations are critical infrastructure used by space agencies and satellite operators to communicate with orbiting satellites. These stations track satellite signals, transmit telemetry data, and support navigation and scientific missions.

Ground station networks exist across the world and are operated by agencies such as:

·  NASA

·  ESA

·  ISRO

·  CNSA

·  JAXA

Because these facilities manage expensive satellite missions, data integrity is extremely important. Incorrect tracking logs, corrupted signal data, or manipulated operational statistics can lead to mission failures or financial losses.

For example:

·  A ground station may report incorrect tracking hours

·  Satellites supported may be incorrectly recorded

·  Signal loss events may be fraudulently modified

·  Operating costs might be inflated or under-reported

·  Reliability percentages might exceed 100% or fall below 0%

In this project, we simulate a Space Ground Station Operations Dataset and deliberately introduce intentional errors to demonstrate how SAS can detect and correct them.

The project demonstrates practical SAS programming concepts including:

·  Data step processing

·  Numeric functions

·  Character functions

·  Date handling

·  Dataset merging

·  Dataset appending

·  Transposing data

·  Macro-based fraud detection

·  Data validation

This type of workflow is extremely valuable in real-world aerospace data analytics and satellite network management systems.

Table Of Contents

1.     Business Context

2.     Dataset Design

3.     Intentional Errors Introduced

4.     Code 1 – Create Raw Dataset With Errors

5.     Code 2 – PROC CONTENTS Metadata Check

6.     Code 3 – Standardizing Station Names

7.     Code 4 – Numeric Error Detection

8.     Code 5 – Date Standardization Using MDY

9.     Code 6 – Usage Duration Calculation Using INTCK

10.  Code 7 – Forecast Maintenance Using INTNX

11.  Code 8 – PROC SORT & Dataset MERGE Operation

12.  Code 9 – Dataset APPEND Operation

13.  Code 10 – Dataset TRANSPOSE Operation

14.  Code 11 – Utilization Classification

15.  Code 12 – Fraud Detection Macro

16.  Code 13 – Final Data Cleaning Logic

17.  Code 14 – PROC DATASETS Delete Temporary Tables

18.  Final Corrected Dataset Code

19.  Project Insights

20.  Summary

21.  Conclusion

Business Context

Satellite ground station operators track several operational parameters daily.

Typical metrics include:


Metric

Purpose

Tracking Hours

Measures communication time with satellites

Satellites Supported

Number of satellites served

Signal Loss Events

Measures communication disruptions

Operating Cost

Daily operational expenditure

Reliability Index

System stability percentage

Utilization

Network capacity usage


If these metrics contain errors, it may cause:

·  Poor satellite scheduling

·  Resource wastage

·  Incorrect billing

·  Security vulnerabilities

Therefore, automated validation is required.

Dataset Variables

Our dataset includes the following variables:

Variable

Description

Station_Name

Name of the ground station

Country

Country where station is located

Tracking_Hours

Daily tracking hours

Satellites_Supported

Number of satellites handled

Signal_Loss_Events

Number of signal disruptions

Operating_Cost

Daily operating cost

Reliability_Index

Reliability percentage

Fees

Service revenue

Utilization

Capacity usage classification

Operation_Date

Date of operation

Intentional Errors Introduced

To simulate real-world data corruption, the dataset contains:

1.     Negative tracking hours

2.     Reliability > 100%

3.     Negative operating costs

4.     Lowercase / uppercase inconsistencies

5.     Extra spaces in station names

6.     Missing country values

7.     Wrong date formats

8.     Invalid satellite counts

9.     Duplicated station names

These errors will be detected and corrected using SAS.

Code 1 – Creating Raw Dataset With Intentional Errors

data ground_station_raw;

infile datalines dsd truncover;

input Station_Name :$30. Country :$20. Tracking_Hours Satellites_Supported

      Signal_Loss_Events Operating_Cost Reliability_Index Fees

      Operation_Date :$12.;

datalines;

sriharikota,India,12,8,2,15000,95,20000,03-01-2025

Goldstone,USA,14,10,1,20000,101,30000,03-02-2025

malindi,Kenya,-5,6,3,10000,89,15000,03-03-2025

Kourou,France,16,9,2,-12000,92,21000,03-04-2025

svalbard,Norway,18,11,0,17000,98,25000,03-05-2025

Alaska,USA,13,7,4,14000,87,19000,03-06-2025

beijing,China,15,twelve,1,21000,93,31000,03-07-2025

Perth,Australia,20,14,2,22000,97,33000,03-08-2025

Madrid,Spain,10,5,three,12000,85,16000,03-09-2025

Santiago,Chile,17,10,2,18000,94,24000,03-10-2025

Pretoria,SouthAfrica,11,6,4,13000,88,17000,03-11-2025

Bangalore,India,19,13,1,21000,96,32000,03-12-2025

Svalbard,Norway,21,15,0,25000,105,35000,03-13-2025

Dubai,UAE,8,3,6,9000,80,12000,wrong-date

Tokyo,Japan,22,16,1,26000,99,36000,03-15-2025

;

run;

proc print data=ground_station_raw;

run;

OUTPUT:

ObsStation_NameCountryTracking_HoursSatellites_SupportedSignal_Loss_EventsOperating_CostReliability_IndexFeesOperation_Date
1sriharikotaIndia128215000952000003-01-2025
2GoldstoneUSA14101200001013000003-02-2025
3malindiKenya-56310000891500003-03-2025
4KourouFrance1692-12000922100003-04-2025
5svalbardNorway1811017000982500003-05-2025
6AlaskaUSA137414000871900003-06-2025
7beijingChina15.121000933100003-07-2025
8PerthAustralia2014222000973300003-08-2025
9MadridSpain105.12000851600003-09-2025
10SantiagoChile1710218000942400003-10-2025
11PretoriaSouthAfrica116413000881700003-11-2025
12BangaloreIndia1913121000963200003-12-2025
13SvalbardNorway21150250001053500003-13-2025
14DubaiUAE83690008012000wrong-date
15TokyoJapan2216126000993600003-15-2025

Explanation

This DATA step creates the raw dataset.

However, several errors exist.

Examples:

·  Tracking hours = -5

·  Reliability index = 101 and 105

·  Operating cost = -12000

·  Station names inconsistent

Why This Code Is Used

·  To simulate real operational datasets

·  To intentionally insert data quality problems

·  To test SAS data validation techniques

Code 2 – Inspect Dataset Structure

proc contents data=ground_station_raw;

run;

OUTPUT:

The CONTENTS Procedure

Data Set NameWORK.GROUND_STATION_RAWObservations15
Member TypeDATAVariables9
EngineV9Indexes0
Created03/11/2026 10:37:43Observation Length112
Last Modified03/11/2026 10:37:43Deleted Observations0
Protection CompressedNO
Data Set Type SortedNO
Label   
Data RepresentationSOLARIS_X86_64, LINUX_X86_64, ALPHA_TRU64, LINUX_IA64  
Encodingutf-8 Unicode (UTF-8)  
Engine/Host Dependent Information
Data Set Page Size131072
Number of Data Set Pages1
First Data Page1
Max Obs per Page1168
Obs in First Data Page15
Number of Data Set Repairs0
Filename/saswork/SAS_workD45F00006B56_odaws01-apse1-2.oda.sas.com/SAS_workFE6000006B56_odaws01-apse1-2.oda.sas.com/ground_station_raw.sas7bdat
Release Created9.0401M8
Host CreatedLinux
Inode Number201353440
Access Permissionrw-r--r--
Owner Nameu63247146
File Size256KB
File Size (bytes)262144
Alphabetic List of Variables and Attributes
#VariableTypeLen
2CountryChar20
8FeesNum8
6Operating_CostNum8
9Operation_DateChar12
7Reliability_IndexNum8
4Satellites_SupportedNum8
5Signal_Loss_EventsNum8
1Station_NameChar30
3Tracking_HoursNum8

Explanation

PROC CONTENTS displays dataset metadata including:

·  Variable names

·  Variable types

·  Lengths

·  Formats

Why It Is Important

Before cleaning data, analysts must verify:

·  Variable types

·  Variable formats

·  Metadata consistency

Code 3 – Character Data Cleaning

data station_clean_names;

set ground_station_raw;

Station_Name=propcase(strip(Station_Name));

Country=propcase(strip(Country));

Station_Upper=upcase(Station_Name);

Station_Lower=lowcase(Station_Name);

Station_Clean=catx('_',Station_Name,Country);

run;

proc print data=station_clean_names;

run;

OUTPUT:

ObsStation_NameCountryTracking_HoursSatellites_SupportedSignal_Loss_EventsOperating_CostReliability_IndexFeesOperation_DateStation_UpperStation_LowerStation_Clean
1SriharikotaIndia128215000952000003-01-2025SRIHARIKOTAsriharikotaSriharikota_India
2GoldstoneUsa14101200001013000003-02-2025GOLDSTONEgoldstoneGoldstone_Usa
3MalindiKenya-56310000891500003-03-2025MALINDImalindiMalindi_Kenya
4KourouFrance1692-12000922100003-04-2025KOUROUkourouKourou_France
5SvalbardNorway1811017000982500003-05-2025SVALBARDsvalbardSvalbard_Norway
6AlaskaUsa137414000871900003-06-2025ALASKAalaskaAlaska_Usa
7BeijingChina15.121000933100003-07-2025BEIJINGbeijingBeijing_China
8PerthAustralia2014222000973300003-08-2025PERTHperthPerth_Australia
9MadridSpain105.12000851600003-09-2025MADRIDmadridMadrid_Spain
10SantiagoChile1710218000942400003-10-2025SANTIAGOsantiagoSantiago_Chile
11PretoriaSouthafrica116413000881700003-11-2025PRETORIApretoriaPretoria_Southafrica
12BangaloreIndia1913121000963200003-12-2025BANGALOREbangaloreBangalore_India
13SvalbardNorway21150250001053500003-13-2025SVALBARDsvalbardSvalbard_Norway
14DubaiUae83690008012000wrong-dateDUBAIdubaiDubai_Uae
15TokyoJapan2216126000993600003-15-2025TOKYOtokyoTokyo_Japan

Character Functions Used

Function

Purpose

STRIP

Removes leading/trailing spaces

TRIM

Removes trailing spaces

CAT

Concatenate values

CATX

Concatenate with delimiter

PROPCASE

Convert to Proper Case

UPCASE

Uppercase

LOWCASE

Lowercase

Explanation

This step standardizes textual data.

Example transformation:

" sriharikota " → "Sriharikota"

Code 4 – Numeric Error Detection

data numeric_validation;

set station_clean_names;

length Error_Flag $20.;

if Tracking_Hours < 0 then Error_Flag='Negative Hours';

if Reliability_Index >100 then Error_Flag='Invalid Reliability';

if Operating_Cost <0 then Error_Flag='Negative Cost';

run;

proc print data=numeric_validation;

run;

OUTPUT:

ObsStation_NameCountryTracking_HoursSatellites_SupportedSignal_Loss_EventsOperating_CostReliability_IndexFeesOperation_DateStation_UpperStation_LowerStation_CleanError_Flag
1SriharikotaIndia128215000952000003-01-2025SRIHARIKOTAsriharikotaSriharikota_India 
2GoldstoneUsa14101200001013000003-02-2025GOLDSTONEgoldstoneGoldstone_UsaInvalid Reliability
3MalindiKenya-56310000891500003-03-2025MALINDImalindiMalindi_KenyaNegative Hours
4KourouFrance1692-12000922100003-04-2025KOUROUkourouKourou_FranceNegative Cost
5SvalbardNorway1811017000982500003-05-2025SVALBARDsvalbardSvalbard_Norway 
6AlaskaUsa137414000871900003-06-2025ALASKAalaskaAlaska_Usa 
7BeijingChina15.121000933100003-07-2025BEIJINGbeijingBeijing_China 
8PerthAustralia2014222000973300003-08-2025PERTHperthPerth_Australia 
9MadridSpain105.12000851600003-09-2025MADRIDmadridMadrid_Spain 
10SantiagoChile1710218000942400003-10-2025SANTIAGOsantiagoSantiago_Chile 
11PretoriaSouthafrica116413000881700003-11-2025PRETORIApretoriaPretoria_Southafrica 
12BangaloreIndia1913121000963200003-12-2025BANGALOREbangaloreBangalore_India 
13SvalbardNorway21150250001053500003-13-2025SVALBARDsvalbardSvalbard_NorwayInvalid Reliability
14DubaiUae83690008012000wrong-dateDUBAIdubaiDubai_Uae 
15TokyoJapan2216126000993600003-15-2025TOKYOtokyoTokyo_Japan 

Explanation

This code flags suspicious values.

Example errors detected:

·  Negative hours

·  Reliability above 100

·  Negative cost

Code 5 – Converting Date Using MDY

data date_format_fix;

set numeric_validation;

month=input(substr(Operation_Date,1,2),8.);

day=input(substr(Operation_Date,4,2),8.);

year=input(substr(Operation_Date,7,4),8.);

Correct_Date=mdy(month,day,year);

format Correct_Date date9.;

run;

proc print data=date_format_fix;

run;

OUTPUT:

ObsStation_NameCountryTracking_HoursSatellites_SupportedSignal_Loss_EventsOperating_CostReliability_IndexFeesOperation_DateStation_UpperStation_LowerStation_CleanError_FlagmonthdayyearCorrect_Date
1SriharikotaIndia128215000952000003-01-2025SRIHARIKOTAsriharikotaSriharikota_India 31202501MAR2025
2GoldstoneUsa14101200001013000003-02-2025GOLDSTONEgoldstoneGoldstone_UsaInvalid Reliability32202502MAR2025
3MalindiKenya-56310000891500003-03-2025MALINDImalindiMalindi_KenyaNegative Hours33202503MAR2025
4KourouFrance1692-12000922100003-04-2025KOUROUkourouKourou_FranceNegative Cost34202504MAR2025
5SvalbardNorway1811017000982500003-05-2025SVALBARDsvalbardSvalbard_Norway 35202505MAR2025
6AlaskaUsa137414000871900003-06-2025ALASKAalaskaAlaska_Usa 36202506MAR2025
7BeijingChina15.121000933100003-07-2025BEIJINGbeijingBeijing_China 37202507MAR2025
8PerthAustralia2014222000973300003-08-2025PERTHperthPerth_Australia 38202508MAR2025
9MadridSpain105.12000851600003-09-2025MADRIDmadridMadrid_Spain 39202509MAR2025
10SantiagoChile1710218000942400003-10-2025SANTIAGOsantiagoSantiago_Chile 310202510MAR2025
11PretoriaSouthafrica116413000881700003-11-2025PRETORIApretoriaPretoria_Southafrica 311202511MAR2025
12BangaloreIndia1913121000963200003-12-2025BANGALOREbangaloreBangalore_India 312202512MAR2025
13SvalbardNorway21150250001053500003-13-2025SVALBARDsvalbardSvalbard_NorwayInvalid Reliability313202513MAR2025
14DubaiUae83690008012000wrong-dateDUBAIdubaiDubai_Uae ....
15TokyoJapan2216126000993600003-15-2025TOKYOtokyoTokyo_Japan 315202515MAR2025

Why MDY Is Used

MDY constructs a SAS date.

MDY(month,day,year)

Example:

03-01-2025 → 01MAR2025

Code 6 – Calculating Tracking Duration

data duration_calc;

set date_format_fix;

Days_Since=intck('day',Correct_Date,today());

run;

proc print data=duration_calc;

run;

OUTPUT:

ObsStation_NameCountryTracking_HoursSatellites_SupportedSignal_Loss_EventsOperating_CostReliability_IndexFeesOperation_DateStation_UpperStation_LowerStation_CleanError_FlagmonthdayyearCorrect_DateDays_Since
1SriharikotaIndia128215000952000003-01-2025SRIHARIKOTAsriharikotaSriharikota_India 31202501MAR2025375
2GoldstoneUsa14101200001013000003-02-2025GOLDSTONEgoldstoneGoldstone_UsaInvalid Reliability32202502MAR2025374
3MalindiKenya-56310000891500003-03-2025MALINDImalindiMalindi_KenyaNegative Hours33202503MAR2025373
4KourouFrance1692-12000922100003-04-2025KOUROUkourouKourou_FranceNegative Cost34202504MAR2025372
5SvalbardNorway1811017000982500003-05-2025SVALBARDsvalbardSvalbard_Norway 35202505MAR2025371
6AlaskaUsa137414000871900003-06-2025ALASKAalaskaAlaska_Usa 36202506MAR2025370
7BeijingChina15.121000933100003-07-2025BEIJINGbeijingBeijing_China 37202507MAR2025369
8PerthAustralia2014222000973300003-08-2025PERTHperthPerth_Australia 38202508MAR2025368
9MadridSpain105.12000851600003-09-2025MADRIDmadridMadrid_Spain 39202509MAR2025367
10SantiagoChile1710218000942400003-10-2025SANTIAGOsantiagoSantiago_Chile 310202510MAR2025366
11PretoriaSouthafrica116413000881700003-11-2025PRETORIApretoriaPretoria_Southafrica 311202511MAR2025365
12BangaloreIndia1913121000963200003-12-2025BANGALOREbangaloreBangalore_India 312202512MAR2025364
13SvalbardNorway21150250001053500003-13-2025SVALBARDsvalbardSvalbard_NorwayInvalid Reliability313202513MAR2025363
14DubaiUae83690008012000wrong-dateDUBAIdubaiDubai_Uae .....
15TokyoJapan2216126000993600003-15-2025TOKYOtokyoTokyo_Japan 315202515MAR2025361

INTCK Function

INTCK calculates intervals between dates.

Example:

INTCK('day',date1,date2)

Code 7 – Predicting Next Maintenance Date

data maintenance_forecast;

set duration_calc;

Next_Maintenance=intnx('month',Correct_Date,6,'same');

format Next_Maintenance date9.;

run;

proc print data=maintenance_forecast;

run;

OUTPUT:

ObsStation_NameCountryTracking_HoursSatellites_SupportedSignal_Loss_EventsOperating_CostReliability_IndexFeesOperation_DateStation_UpperStation_LowerStation_CleanError_FlagmonthdayyearCorrect_DateDays_SinceNext_Maintenance
1SriharikotaIndia128215000952000003-01-2025SRIHARIKOTAsriharikotaSriharikota_India 31202501MAR202537501SEP2025
2GoldstoneUsa14101200001013000003-02-2025GOLDSTONEgoldstoneGoldstone_UsaInvalid Reliability32202502MAR202537402SEP2025
3MalindiKenya-56310000891500003-03-2025MALINDImalindiMalindi_KenyaNegative Hours33202503MAR202537303SEP2025
4KourouFrance1692-12000922100003-04-2025KOUROUkourouKourou_FranceNegative Cost34202504MAR202537204SEP2025
5SvalbardNorway1811017000982500003-05-2025SVALBARDsvalbardSvalbard_Norway 35202505MAR202537105SEP2025
6AlaskaUsa137414000871900003-06-2025ALASKAalaskaAlaska_Usa 36202506MAR202537006SEP2025
7BeijingChina15.121000933100003-07-2025BEIJINGbeijingBeijing_China 37202507MAR202536907SEP2025
8PerthAustralia2014222000973300003-08-2025PERTHperthPerth_Australia 38202508MAR202536808SEP2025
9MadridSpain105.12000851600003-09-2025MADRIDmadridMadrid_Spain 39202509MAR202536709SEP2025
10SantiagoChile1710218000942400003-10-2025SANTIAGOsantiagoSantiago_Chile 310202510MAR202536610SEP2025
11PretoriaSouthafrica116413000881700003-11-2025PRETORIApretoriaPretoria_Southafrica 311202511MAR202536511SEP2025
12BangaloreIndia1913121000963200003-12-2025BANGALOREbangaloreBangalore_India 312202512MAR202536412SEP2025
13SvalbardNorway21150250001053500003-13-2025SVALBARDsvalbardSvalbard_NorwayInvalid Reliability313202513MAR202536313SEP2025
14DubaiUae83690008012000wrong-dateDUBAIdubaiDubai_Uae ......
15TokyoJapan2216126000993600003-15-2025TOKYOtokyoTokyo_Japan 315202515MAR202536115SEP2025

INTNX Function

INTNX calculates future or past dates.

Example:

INTNX('month',date,6)

This predicts maintenance after 6 months.

Code 8 – PROC SORT & Dataset MERGE

proc sort data=maintenance_forecast;by Station_Name;run;

proc print data=maintenance_forecast;

run;

OUTPUT:

ObsStation_NameCountryTracking_HoursSatellites_SupportedSignal_Loss_EventsOperating_CostReliability_IndexFeesOperation_DateStation_UpperStation_LowerStation_CleanError_FlagmonthdayyearCorrect_DateDays_SinceNext_Maintenance
1AlaskaUsa137414000871900003-06-2025ALASKAalaskaAlaska_Usa 36202506MAR202537006SEP2025
2BangaloreIndia1913121000963200003-12-2025BANGALOREbangaloreBangalore_India 312202512MAR202536412SEP2025
3BeijingChina15.121000933100003-07-2025BEIJINGbeijingBeijing_China 37202507MAR202536907SEP2025
4DubaiUae83690008012000wrong-dateDUBAIdubaiDubai_Uae ......
5GoldstoneUsa14101200001013000003-02-2025GOLDSTONEgoldstoneGoldstone_UsaInvalid Reliability32202502MAR202537402SEP2025
6KourouFrance1692-12000922100003-04-2025KOUROUkourouKourou_FranceNegative Cost34202504MAR202537204SEP2025
7MadridSpain105.12000851600003-09-2025MADRIDmadridMadrid_Spain 39202509MAR202536709SEP2025
8MalindiKenya-56310000891500003-03-2025MALINDImalindiMalindi_KenyaNegative Hours33202503MAR202537303SEP2025
9PerthAustralia2014222000973300003-08-2025PERTHperthPerth_Australia 38202508MAR202536808SEP2025
10PretoriaSouthafrica116413000881700003-11-2025PRETORIApretoriaPretoria_Southafrica 311202511MAR202536511SEP2025
11SantiagoChile1710218000942400003-10-2025SANTIAGOsantiagoSantiago_Chile 310202510MAR202536610SEP2025
12SriharikotaIndia128215000952000003-01-2025SRIHARIKOTAsriharikotaSriharikota_India 31202501MAR202537501SEP2025
13SvalbardNorway1811017000982500003-05-2025SVALBARDsvalbardSvalbard_Norway 35202505MAR202537105SEP2025
14SvalbardNorway21150250001053500003-13-2025SVALBARDsvalbardSvalbard_NorwayInvalid Reliability313202513MAR202536313SEP2025
15TokyoJapan2216126000993600003-15-2025TOKYOtokyoTokyo_Japan 315202515MAR202536115SEP2025

proc sort data=numeric_validation;by Station_Name;run;

proc print data=numeric_validation;

run;

OUTPUT:

ObsStation_NameCountryTracking_HoursSatellites_SupportedSignal_Loss_EventsOperating_CostReliability_IndexFeesOperation_DateStation_UpperStation_LowerStation_CleanError_Flag
1AlaskaUsa137414000871900003-06-2025ALASKAalaskaAlaska_Usa 
2BangaloreIndia1913121000963200003-12-2025BANGALOREbangaloreBangalore_India 
3BeijingChina15.121000933100003-07-2025BEIJINGbeijingBeijing_China 
4DubaiUae83690008012000wrong-dateDUBAIdubaiDubai_Uae 
5GoldstoneUsa14101200001013000003-02-2025GOLDSTONEgoldstoneGoldstone_UsaInvalid Reliability
6KourouFrance1692-12000922100003-04-2025KOUROUkourouKourou_FranceNegative Cost
7MadridSpain105.12000851600003-09-2025MADRIDmadridMadrid_Spain 
8MalindiKenya-56310000891500003-03-2025MALINDImalindiMalindi_KenyaNegative Hours
9PerthAustralia2014222000973300003-08-2025PERTHperthPerth_Australia 
10PretoriaSouthafrica116413000881700003-11-2025PRETORIApretoriaPretoria_Southafrica 
11SantiagoChile1710218000942400003-10-2025SANTIAGOsantiagoSantiago_Chile 
12SriharikotaIndia128215000952000003-01-2025SRIHARIKOTAsriharikotaSriharikota_India 
13SvalbardNorway1811017000982500003-05-2025SVALBARDsvalbardSvalbard_Norway 
14SvalbardNorway21150250001053500003-13-2025SVALBARDsvalbardSvalbard_NorwayInvalid Reliability
15TokyoJapan2216126000993600003-15-2025TOKYOtokyoTokyo_Japan 

data station_merge;

merge maintenance_forecast

      numeric_validation;

by Station_Name;

run;

proc print data=station_merge;

run;

OUTPUT:

ObsStation_NameCountryTracking_HoursSatellites_SupportedSignal_Loss_EventsOperating_CostReliability_IndexFeesOperation_DateStation_UpperStation_LowerStation_CleanError_FlagmonthdayyearCorrect_DateDays_SinceNext_Maintenance
1AlaskaUsa137414000871900003-06-2025ALASKAalaskaAlaska_Usa 36202506MAR202537006SEP2025
2BangaloreIndia1913121000963200003-12-2025BANGALOREbangaloreBangalore_India 312202512MAR202536412SEP2025
3BeijingChina15.121000933100003-07-2025BEIJINGbeijingBeijing_China 37202507MAR202536907SEP2025
4DubaiUae83690008012000wrong-dateDUBAIdubaiDubai_Uae ......
5GoldstoneUsa14101200001013000003-02-2025GOLDSTONEgoldstoneGoldstone_UsaInvalid Reliability32202502MAR202537402SEP2025
6KourouFrance1692-12000922100003-04-2025KOUROUkourouKourou_FranceNegative Cost34202504MAR202537204SEP2025
7MadridSpain105.12000851600003-09-2025MADRIDmadridMadrid_Spain 39202509MAR202536709SEP2025
8MalindiKenya-56310000891500003-03-2025MALINDImalindiMalindi_KenyaNegative Hours33202503MAR202537303SEP2025
9PerthAustralia2014222000973300003-08-2025PERTHperthPerth_Australia 38202508MAR202536808SEP2025
10PretoriaSouthafrica116413000881700003-11-2025PRETORIApretoriaPretoria_Southafrica 311202511MAR202536511SEP2025
11SantiagoChile1710218000942400003-10-2025SANTIAGOsantiagoSantiago_Chile 310202510MAR202536610SEP2025
12SriharikotaIndia128215000952000003-01-2025SRIHARIKOTAsriharikotaSriharikota_India 31202501MAR202537501SEP2025
13SvalbardNorway1811017000982500003-05-2025SVALBARDsvalbardSvalbard_Norway 35202505MAR202537105SEP2025
14SvalbardNorway21150250001053500003-13-2025SVALBARDsvalbardSvalbard_NorwayInvalid Reliability313202513MAR202536313SEP2025
15TokyoJapan2216126000993600003-15-2025TOKYOtokyoTokyo_Japan 315202515MAR202536115SEP2025

Why SORT Is Used

Sort is used to order the observations in ascending or descending.

Why MERGE Is Used

MERGE combines datasets using a common key.

Code 9 – Dataset APPEND

proc append base=station_merge 

     data=maintenance_forecast;

run;

proc print data=station_merge;

run;

OUTPUT:

ObsStation_NameCountryTracking_HoursSatellites_SupportedSignal_Loss_EventsOperating_CostReliability_IndexFeesOperation_DateStation_UpperStation_LowerStation_CleanError_FlagmonthdayyearCorrect_DateDays_SinceNext_Maintenance
1AlaskaUsa137414000871900003-06-2025ALASKAalaskaAlaska_Usa 36202506MAR202537006SEP2025
2BangaloreIndia1913121000963200003-12-2025BANGALOREbangaloreBangalore_India 312202512MAR202536412SEP2025
3BeijingChina15.121000933100003-07-2025BEIJINGbeijingBeijing_China 37202507MAR202536907SEP2025
4DubaiUae83690008012000wrong-dateDUBAIdubaiDubai_Uae ......
5GoldstoneUsa14101200001013000003-02-2025GOLDSTONEgoldstoneGoldstone_UsaInvalid Reliability32202502MAR202537402SEP2025
6KourouFrance1692-12000922100003-04-2025KOUROUkourouKourou_FranceNegative Cost34202504MAR202537204SEP2025
7MadridSpain105.12000851600003-09-2025MADRIDmadridMadrid_Spain 39202509MAR202536709SEP2025
8MalindiKenya-56310000891500003-03-2025MALINDImalindiMalindi_KenyaNegative Hours33202503MAR202537303SEP2025
9PerthAustralia2014222000973300003-08-2025PERTHperthPerth_Australia 38202508MAR202536808SEP2025
10PretoriaSouthafrica116413000881700003-11-2025PRETORIApretoriaPretoria_Southafrica 311202511MAR202536511SEP2025
11SantiagoChile1710218000942400003-10-2025SANTIAGOsantiagoSantiago_Chile 310202510MAR202536610SEP2025
12SriharikotaIndia128215000952000003-01-2025SRIHARIKOTAsriharikotaSriharikota_India 31202501MAR202537501SEP2025
13SvalbardNorway1811017000982500003-05-2025SVALBARDsvalbardSvalbard_Norway 35202505MAR202537105SEP2025
14SvalbardNorway21150250001053500003-13-2025SVALBARDsvalbardSvalbard_NorwayInvalid Reliability313202513MAR202536313SEP2025
15TokyoJapan2216126000993600003-15-2025TOKYOtokyoTokyo_Japan 315202515MAR202536115SEP2025
16AlaskaUsa137414000871900003-06-2025ALASKAalaskaAlaska_Usa 36202506MAR202537006SEP2025
17BangaloreIndia1913121000963200003-12-2025BANGALOREbangaloreBangalore_India 312202512MAR202536412SEP2025
18BeijingChina15.121000933100003-07-2025BEIJINGbeijingBeijing_China 37202507MAR202536907SEP2025
19DubaiUae83690008012000wrong-dateDUBAIdubaiDubai_Uae ......
20GoldstoneUsa14101200001013000003-02-2025GOLDSTONEgoldstoneGoldstone_UsaInvalid Reliability32202502MAR202537402SEP2025
21KourouFrance1692-12000922100003-04-2025KOUROUkourouKourou_FranceNegative Cost34202504MAR202537204SEP2025
22MadridSpain105.12000851600003-09-2025MADRIDmadridMadrid_Spain 39202509MAR202536709SEP2025
23MalindiKenya-56310000891500003-03-2025MALINDImalindiMalindi_KenyaNegative Hours33202503MAR202537303SEP2025
24PerthAustralia2014222000973300003-08-2025PERTHperthPerth_Australia 38202508MAR202536808SEP2025
25PretoriaSouthafrica116413000881700003-11-2025PRETORIApretoriaPretoria_Southafrica 311202511MAR202536511SEP2025
26SantiagoChile1710218000942400003-10-2025SANTIAGOsantiagoSantiago_Chile 310202510MAR202536610SEP2025
27SriharikotaIndia128215000952000003-01-2025SRIHARIKOTAsriharikotaSriharikota_India 31202501MAR202537501SEP2025
28SvalbardNorway1811017000982500003-05-2025SVALBARDsvalbardSvalbard_Norway 35202505MAR202537105SEP2025
29SvalbardNorway21150250001053500003-13-2025SVALBARDsvalbardSvalbard_NorwayInvalid Reliability313202513MAR202536313SEP2025
30TokyoJapan2216126000993600003-15-2025TOKYOtokyoTokyo_Japan 315202515MAR202536115SEP2025

Explanation

APPEND adds observations to an existing dataset.

Code 10 – Dataset TRANSPOSE

proc transpose data=station_merge out=station_transpose;

by Station_Name NotSorted;

var Tracking_Hours Satellites_Supported Operating_Cost Fees;

run;

proc print data=station_transpose;

run;

OUTPUT:

ObsStation_Name_NAME_COL1COL2
1AlaskaTracking_Hours13.
2AlaskaSatellites_Supported7.
3AlaskaOperating_Cost14000.
4AlaskaFees19000.
5BangaloreTracking_Hours19.
6BangaloreSatellites_Supported13.
7BangaloreOperating_Cost21000.
8BangaloreFees32000.
9BeijingTracking_Hours15.
10BeijingSatellites_Supported..
11BeijingOperating_Cost21000.
12BeijingFees31000.
13DubaiTracking_Hours8.
14DubaiSatellites_Supported3.
15DubaiOperating_Cost9000.
16DubaiFees12000.
17GoldstoneTracking_Hours14.
18GoldstoneSatellites_Supported10.
19GoldstoneOperating_Cost20000.
20GoldstoneFees30000.
21KourouTracking_Hours16.
22KourouSatellites_Supported9.
23KourouOperating_Cost-12000.
24KourouFees21000.
25MadridTracking_Hours10.
26MadridSatellites_Supported5.
27MadridOperating_Cost12000.
28MadridFees16000.
29MalindiTracking_Hours-5.
30MalindiSatellites_Supported6.
31MalindiOperating_Cost10000.
32MalindiFees15000.
33PerthTracking_Hours20.
34PerthSatellites_Supported14.
35PerthOperating_Cost22000.
36PerthFees33000.
37PretoriaTracking_Hours11.
38PretoriaSatellites_Supported6.
39PretoriaOperating_Cost13000.
40PretoriaFees17000.
41SantiagoTracking_Hours17.
42SantiagoSatellites_Supported10.
43SantiagoOperating_Cost18000.
44SantiagoFees24000.
45SriharikotaTracking_Hours12.
46SriharikotaSatellites_Supported8.
47SriharikotaOperating_Cost15000.
48SriharikotaFees20000.
49SvalbardTracking_Hours1821
50SvalbardSatellites_Supported1115
51SvalbardOperating_Cost1700025000
52SvalbardFees2500035000
53TokyoTracking_Hours22.
54TokyoSatellites_Supported16.
55TokyoOperating_Cost26000.
56TokyoFees36000.
57AlaskaTracking_Hours13.
58AlaskaSatellites_Supported7.
59AlaskaOperating_Cost14000.
60AlaskaFees19000.
61BangaloreTracking_Hours19.
62BangaloreSatellites_Supported13.
63BangaloreOperating_Cost21000.
64BangaloreFees32000.
65BeijingTracking_Hours15.
66BeijingSatellites_Supported..
67BeijingOperating_Cost21000.
68BeijingFees31000.
69DubaiTracking_Hours8.
70DubaiSatellites_Supported3.
71DubaiOperating_Cost9000.
72DubaiFees12000.
73GoldstoneTracking_Hours14.
74GoldstoneSatellites_Supported10.
75GoldstoneOperating_Cost20000.
76GoldstoneFees30000.
77KourouTracking_Hours16.
78KourouSatellites_Supported9.
79KourouOperating_Cost-12000.
80KourouFees21000.
81MadridTracking_Hours10.
82MadridSatellites_Supported5.
83MadridOperating_Cost12000.
84MadridFees16000.
85MalindiTracking_Hours-5.
86MalindiSatellites_Supported6.
87MalindiOperating_Cost10000.
88MalindiFees15000.
89PerthTracking_Hours20.
90PerthSatellites_Supported14.
91PerthOperating_Cost22000.
92PerthFees33000.
93PretoriaTracking_Hours11.
94PretoriaSatellites_Supported6.
95PretoriaOperating_Cost13000.
96PretoriaFees17000.
97SantiagoTracking_Hours17.
98SantiagoSatellites_Supported10.
99SantiagoOperating_Cost18000.
100SantiagoFees24000.
101SriharikotaTracking_Hours12.
102SriharikotaSatellites_Supported8.
103SriharikotaOperating_Cost15000.
104SriharikotaFees20000.
105SvalbardTracking_Hours1821
106SvalbardSatellites_Supported1115
107SvalbardOperating_Cost1700025000
108SvalbardFees2500035000
109TokyoTracking_Hours22.
110TokyoSatellites_Supported16.
111TokyoOperating_Cost26000.
112TokyoFees36000.

Why TRANSPOSE Is Used

TRANSPOSE converts rows into columns.

Used for:

·  Reporting

·  Analytical transformations

Code 11 – Utilization Classification

data utilization_class;

set station_merge;

length Utilization $8.;

if Tracking_Hours >=20 then Utilization='High';

else if Tracking_Hours >=12 then Utilization='Medium';

else Utilization='Low';

run;

proc print data=utilization_class;

run;

OUTPUT:

ObsStation_NameCountryTracking_HoursSatellites_SupportedSignal_Loss_EventsOperating_CostReliability_IndexFeesOperation_DateStation_UpperStation_LowerStation_CleanError_FlagmonthdayyearCorrect_DateDays_SinceNext_MaintenanceUtilization
1AlaskaUsa137414000871900003-06-2025ALASKAalaskaAlaska_Usa 36202506MAR202537006SEP2025Medium
2BangaloreIndia1913121000963200003-12-2025BANGALOREbangaloreBangalore_India 312202512MAR202536412SEP2025Medium
3BeijingChina15.121000933100003-07-2025BEIJINGbeijingBeijing_China 37202507MAR202536907SEP2025Medium
4DubaiUae83690008012000wrong-dateDUBAIdubaiDubai_Uae ......Low
5GoldstoneUsa14101200001013000003-02-2025GOLDSTONEgoldstoneGoldstone_UsaInvalid Reliability32202502MAR202537402SEP2025Medium
6KourouFrance1692-12000922100003-04-2025KOUROUkourouKourou_FranceNegative Cost34202504MAR202537204SEP2025Medium
7MadridSpain105.12000851600003-09-2025MADRIDmadridMadrid_Spain 39202509MAR202536709SEP2025Low
8MalindiKenya-56310000891500003-03-2025MALINDImalindiMalindi_KenyaNegative Hours33202503MAR202537303SEP2025Low
9PerthAustralia2014222000973300003-08-2025PERTHperthPerth_Australia 38202508MAR202536808SEP2025High
10PretoriaSouthafrica116413000881700003-11-2025PRETORIApretoriaPretoria_Southafrica 311202511MAR202536511SEP2025Low
11SantiagoChile1710218000942400003-10-2025SANTIAGOsantiagoSantiago_Chile 310202510MAR202536610SEP2025Medium
12SriharikotaIndia128215000952000003-01-2025SRIHARIKOTAsriharikotaSriharikota_India 31202501MAR202537501SEP2025Medium
13SvalbardNorway1811017000982500003-05-2025SVALBARDsvalbardSvalbard_Norway 35202505MAR202537105SEP2025Medium
14SvalbardNorway21150250001053500003-13-2025SVALBARDsvalbardSvalbard_NorwayInvalid Reliability313202513MAR202536313SEP2025High
15TokyoJapan2216126000993600003-15-2025TOKYOtokyoTokyo_Japan 315202515MAR202536115SEP2025High
16AlaskaUsa137414000871900003-06-2025ALASKAalaskaAlaska_Usa 36202506MAR202537006SEP2025Medium
17BangaloreIndia1913121000963200003-12-2025BANGALOREbangaloreBangalore_India 312202512MAR202536412SEP2025Medium
18BeijingChina15.121000933100003-07-2025BEIJINGbeijingBeijing_China 37202507MAR202536907SEP2025Medium
19DubaiUae83690008012000wrong-dateDUBAIdubaiDubai_Uae ......Low
20GoldstoneUsa14101200001013000003-02-2025GOLDSTONEgoldstoneGoldstone_UsaInvalid Reliability32202502MAR202537402SEP2025Medium
21KourouFrance1692-12000922100003-04-2025KOUROUkourouKourou_FranceNegative Cost34202504MAR202537204SEP2025Medium
22MadridSpain105.12000851600003-09-2025MADRIDmadridMadrid_Spain 39202509MAR202536709SEP2025Low
23MalindiKenya-56310000891500003-03-2025MALINDImalindiMalindi_KenyaNegative Hours33202503MAR202537303SEP2025Low
24PerthAustralia2014222000973300003-08-2025PERTHperthPerth_Australia 38202508MAR202536808SEP2025High
25PretoriaSouthafrica116413000881700003-11-2025PRETORIApretoriaPretoria_Southafrica 311202511MAR202536511SEP2025Low
26SantiagoChile1710218000942400003-10-2025SANTIAGOsantiagoSantiago_Chile 310202510MAR202536610SEP2025Medium
27SriharikotaIndia128215000952000003-01-2025SRIHARIKOTAsriharikotaSriharikota_India 31202501MAR202537501SEP2025Medium
28SvalbardNorway1811017000982500003-05-2025SVALBARDsvalbardSvalbard_Norway 35202505MAR202537105SEP2025Medium
29SvalbardNorway21150250001053500003-13-2025SVALBARDsvalbardSvalbard_NorwayInvalid Reliability313202513MAR202536313SEP2025High
30TokyoJapan2216126000993600003-15-2025TOKYOtokyoTokyo_Japan 315202515MAR202536115SEP2025High

Explanation

This macro automatically checks:

·  Invalid reliability

·  Negative hours

·  Negative cost

Macros make SAS reusable and scalable.

Code 12 – Macro For Fraud Detection

%macro fraud_detection(ds);

data fraud_check;

set &ds;

if Reliability_Index >100 then Fraud='Yes';

if Tracking_Hours <0 then Fraud='Yes';

if Operating_Cost <0 then Fraud='Yes';

run;

proc print data=fraud_check;

run;

%mend;


%fraud_detection(station_merge);

OUTPUT:

ObsStation_NameCountryTracking_HoursSatellites_SupportedSignal_Loss_EventsOperating_CostReliability_IndexFeesOperation_DateStation_UpperStation_LowerStation_CleanError_FlagmonthdayyearCorrect_DateDays_SinceNext_MaintenanceFraud
1AlaskaUsa137414000871900003-06-2025ALASKAalaskaAlaska_Usa 36202506MAR202537006SEP2025 
2BangaloreIndia1913121000963200003-12-2025BANGALOREbangaloreBangalore_India 312202512MAR202536412SEP2025 
3BeijingChina15.121000933100003-07-2025BEIJINGbeijingBeijing_China 37202507MAR202536907SEP2025 
4DubaiUae83690008012000wrong-dateDUBAIdubaiDubai_Uae ...... 
5GoldstoneUsa14101200001013000003-02-2025GOLDSTONEgoldstoneGoldstone_UsaInvalid Reliability32202502MAR202537402SEP2025Yes
6KourouFrance1692-12000922100003-04-2025KOUROUkourouKourou_FranceNegative Cost34202504MAR202537204SEP2025Yes
7MadridSpain105.12000851600003-09-2025MADRIDmadridMadrid_Spain 39202509MAR202536709SEP2025 
8MalindiKenya-56310000891500003-03-2025MALINDImalindiMalindi_KenyaNegative Hours33202503MAR202537303SEP2025Yes
9PerthAustralia2014222000973300003-08-2025PERTHperthPerth_Australia 38202508MAR202536808SEP2025 
10PretoriaSouthafrica116413000881700003-11-2025PRETORIApretoriaPretoria_Southafrica 311202511MAR202536511SEP2025 
11SantiagoChile1710218000942400003-10-2025SANTIAGOsantiagoSantiago_Chile 310202510MAR202536610SEP2025 
12SriharikotaIndia128215000952000003-01-2025SRIHARIKOTAsriharikotaSriharikota_India 31202501MAR202537501SEP2025 
13SvalbardNorway1811017000982500003-05-2025SVALBARDsvalbardSvalbard_Norway 35202505MAR202537105SEP2025 
14SvalbardNorway21150250001053500003-13-2025SVALBARDsvalbardSvalbard_NorwayInvalid Reliability313202513MAR202536313SEP2025Yes
15TokyoJapan2216126000993600003-15-2025TOKYOtokyoTokyo_Japan 315202515MAR202536115SEP2025 
16AlaskaUsa137414000871900003-06-2025ALASKAalaskaAlaska_Usa 36202506MAR202537006SEP2025 
17BangaloreIndia1913121000963200003-12-2025BANGALOREbangaloreBangalore_India 312202512MAR202536412SEP2025 
18BeijingChina15.121000933100003-07-2025BEIJINGbeijingBeijing_China 37202507MAR202536907SEP2025 
19DubaiUae83690008012000wrong-dateDUBAIdubaiDubai_Uae ...... 
20GoldstoneUsa14101200001013000003-02-2025GOLDSTONEgoldstoneGoldstone_UsaInvalid Reliability32202502MAR202537402SEP2025Yes
21KourouFrance1692-12000922100003-04-2025KOUROUkourouKourou_FranceNegative Cost34202504MAR202537204SEP2025Yes
22MadridSpain105.12000851600003-09-2025MADRIDmadridMadrid_Spain 39202509MAR202536709SEP2025 
23MalindiKenya-56310000891500003-03-2025MALINDImalindiMalindi_KenyaNegative Hours33202503MAR202537303SEP2025Yes
24PerthAustralia2014222000973300003-08-2025PERTHperthPerth_Australia 38202508MAR202536808SEP2025 
25PretoriaSouthafrica116413000881700003-11-2025PRETORIApretoriaPretoria_Southafrica 311202511MAR202536511SEP2025 
26SantiagoChile1710218000942400003-10-2025SANTIAGOsantiagoSantiago_Chile 310202510MAR202536610SEP2025 
27SriharikotaIndia128215000952000003-01-2025SRIHARIKOTAsriharikotaSriharikota_India 31202501MAR202537501SEP2025 
28SvalbardNorway1811017000982500003-05-2025SVALBARDsvalbardSvalbard_Norway 35202505MAR202537105SEP2025 
29SvalbardNorway21150250001053500003-13-2025SVALBARDsvalbardSvalbard_NorwayInvalid Reliability313202513MAR202536313SEP2025Yes
30TokyoJapan2216126000993600003-15-2025TOKYOtokyoTokyo_Japan 315202515MAR202536115SEP2025 

Code 13 – Correcting Errors

data station_corrected;

set station_merge;

if Tracking_Hours <0 then Tracking_Hours=abs(Tracking_Hours);

if Reliability_Index>100 then Reliability_Index=100;

if Operating_Cost <0 then Operating_Cost=abs(Operating_Cost);

run;

proc print data=station_corrected;

run;

OUTPUT:

ObsStation_NameCountryTracking_HoursSatellites_SupportedSignal_Loss_EventsOperating_CostReliability_IndexFeesOperation_DateStation_UpperStation_LowerStation_CleanError_FlagmonthdayyearCorrect_DateDays_SinceNext_Maintenance
1AlaskaUsa137414000871900003-06-2025ALASKAalaskaAlaska_Usa 36202506MAR202537006SEP2025
2BangaloreIndia1913121000963200003-12-2025BANGALOREbangaloreBangalore_India 312202512MAR202536412SEP2025
3BeijingChina15.121000933100003-07-2025BEIJINGbeijingBeijing_China 37202507MAR202536907SEP2025
4DubaiUae83690008012000wrong-dateDUBAIdubaiDubai_Uae ......
5GoldstoneUsa14101200001003000003-02-2025GOLDSTONEgoldstoneGoldstone_UsaInvalid Reliability32202502MAR202537402SEP2025
6KourouFrance169212000922100003-04-2025KOUROUkourouKourou_FranceNegative Cost34202504MAR202537204SEP2025
7MadridSpain105.12000851600003-09-2025MADRIDmadridMadrid_Spain 39202509MAR202536709SEP2025
8MalindiKenya56310000891500003-03-2025MALINDImalindiMalindi_KenyaNegative Hours33202503MAR202537303SEP2025
9PerthAustralia2014222000973300003-08-2025PERTHperthPerth_Australia 38202508MAR202536808SEP2025
10PretoriaSouthafrica116413000881700003-11-2025PRETORIApretoriaPretoria_Southafrica 311202511MAR202536511SEP2025
11SantiagoChile1710218000942400003-10-2025SANTIAGOsantiagoSantiago_Chile 310202510MAR202536610SEP2025
12SriharikotaIndia128215000952000003-01-2025SRIHARIKOTAsriharikotaSriharikota_India 31202501MAR202537501SEP2025
13SvalbardNorway1811017000982500003-05-2025SVALBARDsvalbardSvalbard_Norway 35202505MAR202537105SEP2025
14SvalbardNorway21150250001003500003-13-2025SVALBARDsvalbardSvalbard_NorwayInvalid Reliability313202513MAR202536313SEP2025
15TokyoJapan2216126000993600003-15-2025TOKYOtokyoTokyo_Japan 315202515MAR202536115SEP2025
16AlaskaUsa137414000871900003-06-2025ALASKAalaskaAlaska_Usa 36202506MAR202537006SEP2025
17BangaloreIndia1913121000963200003-12-2025BANGALOREbangaloreBangalore_India 312202512MAR202536412SEP2025
18BeijingChina15.121000933100003-07-2025BEIJINGbeijingBeijing_China 37202507MAR202536907SEP2025
19DubaiUae83690008012000wrong-dateDUBAIdubaiDubai_Uae ......
20GoldstoneUsa14101200001003000003-02-2025GOLDSTONEgoldstoneGoldstone_UsaInvalid Reliability32202502MAR202537402SEP2025
21KourouFrance169212000922100003-04-2025KOUROUkourouKourou_FranceNegative Cost34202504MAR202537204SEP2025
22MadridSpain105.12000851600003-09-2025MADRIDmadridMadrid_Spain 39202509MAR202536709SEP2025
23MalindiKenya56310000891500003-03-2025MALINDImalindiMalindi_KenyaNegative Hours33202503MAR202537303SEP2025
24PerthAustralia2014222000973300003-08-2025PERTHperthPerth_Australia 38202508MAR202536808SEP2025
25PretoriaSouthafrica116413000881700003-11-2025PRETORIApretoriaPretoria_Southafrica 311202511MAR202536511SEP2025
26SantiagoChile1710218000942400003-10-2025SANTIAGOsantiagoSantiago_Chile 310202510MAR202536610SEP2025
27SriharikotaIndia128215000952000003-01-2025SRIHARIKOTAsriharikotaSriharikota_India 31202501MAR202537501SEP2025
28SvalbardNorway1811017000982500003-05-2025SVALBARDsvalbardSvalbard_Norway 35202505MAR202537105SEP2025
29SvalbardNorway21150250001003500003-13-2025SVALBARDsvalbardSvalbard_NorwayInvalid Reliability313202513MAR202536313SEP2025
30TokyoJapan2216126000993600003-15-2025TOKYOtokyoTokyo_Japan 315202515MAR202536115SEP2025

Code 14 – Delete Temporary Datasets

proc datasets library=work;

delete numeric_validation station_transpose duration_calc;

quit;

LOG:

NOTE: Deleting WORK.NUMERIC_VALIDATION (memtype=DATA).
NOTE: Deleting WORK.STATION_TRANSPOSE (memtype=DATA).
NOTE: Deleting WORK.DURATION_CALC (memtype=DATA).

Final Corrected Dataset Code

proc sort data=station_corrected nodup;by Station_Name;run;

proc print data=station_corrected;

title "Final Cleaned Space Ground Station Dataset";

run;

OUTPUT:

Final Cleaned Space Ground Station Dataset

ObsStation_NameCountryTracking_HoursSatellites_SupportedSignal_Loss_EventsOperating_CostReliability_IndexFeesOperation_DateStation_UpperStation_LowerStation_CleanError_FlagmonthdayyearCorrect_DateDays_SinceNext_Maintenance
1AlaskaUsa137414000871900003-06-2025ALASKAalaskaAlaska_Usa 36202506MAR202537006SEP2025
2BangaloreIndia1913121000963200003-12-2025BANGALOREbangaloreBangalore_India 312202512MAR202536412SEP2025
3BeijingChina15.121000933100003-07-2025BEIJINGbeijingBeijing_China 37202507MAR202536907SEP2025
4DubaiUae83690008012000wrong-dateDUBAIdubaiDubai_Uae ......
5GoldstoneUsa14101200001003000003-02-2025GOLDSTONEgoldstoneGoldstone_UsaInvalid Reliability32202502MAR202537402SEP2025
6KourouFrance169212000922100003-04-2025KOUROUkourouKourou_FranceNegative Cost34202504MAR202537204SEP2025
7MadridSpain105.12000851600003-09-2025MADRIDmadridMadrid_Spain 39202509MAR202536709SEP2025
8MalindiKenya56310000891500003-03-2025MALINDImalindiMalindi_KenyaNegative Hours33202503MAR202537303SEP2025
9PerthAustralia2014222000973300003-08-2025PERTHperthPerth_Australia 38202508MAR202536808SEP2025
10PretoriaSouthafrica116413000881700003-11-2025PRETORIApretoriaPretoria_Southafrica 311202511MAR202536511SEP2025
11SantiagoChile1710218000942400003-10-2025SANTIAGOsantiagoSantiago_Chile 310202510MAR202536610SEP2025
12SriharikotaIndia128215000952000003-01-2025SRIHARIKOTAsriharikotaSriharikota_India 31202501MAR202537501SEP2025
13SvalbardNorway1811017000982500003-05-2025SVALBARDsvalbardSvalbard_Norway 35202505MAR202537105SEP2025
14SvalbardNorway21150250001003500003-13-2025SVALBARDsvalbardSvalbard_NorwayInvalid Reliability313202513MAR202536313SEP2025
15SvalbardNorway1811017000982500003-05-2025SVALBARDsvalbardSvalbard_Norway 35202505MAR202537105SEP2025
16SvalbardNorway21150250001003500003-13-2025SVALBARDsvalbardSvalbard_NorwayInvalid Reliability313202513MAR202536313SEP2025
17TokyoJapan2216126000993600003-15-2025TOKYOtokyoTokyo_Japan 315202515MAR202536115SEP2025
Key Insights From This Project

·  SAS can identify operational anomalies in aerospace datasets

·  Character functions help standardize inconsistent text

·  Numeric validations detect impossible values

·  Date functions support mission scheduling

·  Macros automate fraud detection logic

·  MERGE combines operational logs

·  APPEND extends datasets dynamically

·  TRANSPOSE helps generate analytical reports

·  Utilization classification supports capacity planning

·  PROC DATASETS improves workspace efficiency

 Summary

Advanced SAS programming can play a significant role in detecting fraud and correcting data errors in global space ground station operations. Ground stations generate large volumes of operational data such as tracking hours, number of satellites supported, signal loss events, operating costs, reliability percentages, and service fees. When this data contains mistakes, missing values, or manipulated records, it can affect satellite communication efficiency and financial reporting. Using SAS, programmers can build validation rules to identify unusual patterns such as negative tracking hours, reliability values greater than 100 percent, or incorrect cost entries. SAS functions, procedures, and macros allow analysts to clean text fields, standardize formats, validate dates, and flag suspicious observations automatically. By applying techniques like data merging, transposing, and automated fraud detection logic, SAS helps transform raw, error-prone data into reliable operational datasets. As a result, organizations can improve decision-making, maintain accurate records, and ensure trustworthy monitoring of global ground station performance.

Conclusion

Space ground station networks generate large volumes of operational data every day. Because satellite communication is mission-critical, even small errors in tracking logs or reliability statistics can have serious consequences.

In this project we demonstrated how Advanced SAS Programming can:

·  Detect data anomalies

·  Identify fraudulent modifications

·  Correct corrupted values

·  Standardize inconsistent records

·  Automate validation processes

Using a combination of:

·  DATA steps

·  Numeric functions

·  Character functions

·  Date handling functions

·  Macros

·  Dataset management procedures

SAS provides a powerful framework for maintaining data integrity in complex operational environments such as satellite ground station networks.

The same techniques can be applied in other domains such as:

·  Aviation analytics

·  Defense communication networks

·  Telecommunications monitoring

·  Financial fraud detection

Thus, SAS programming remains a valuable tool for ensuring high-quality, reliable data in mission-critical systems.

SAS INTERVIEW QUESTIONS

1.What is the difference between HAVING and WHERE in SQL?

Answer:
WHERE filters rows before aggregation, while HAVING filters after aggregation.

2.What is a Cartesian join?

Answer:
A Cartesian join occurs when every row of one table joins with every row of another table.

3.What is DISTINCT used for?

Answer:
DISTINCT removes duplicate rows from query results.

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

About the Author:

SAS Learning Hub is a data analytics and SAS programming platform focused on clinical, financial, and real-world data analysis. The content is created by professionals with academic training in Pharmaceutics and hands-on experience in Base SAS, PROC SQL, Macros, SDTM, and ADaM, providing practical and industry-relevant SAS learning resources.


Disclaimer:

The datasets and analysis in this article are created for educational and demonstration purposes only. They do not represent GLOBAL SPACE data.


Our Mission:

This blog provides industry-focused SAS programming tutorials and analytics projects covering finance, healthcare, and technology.


This project is suitable for:

·  Students learning SAS

·  Data analysts building portfolios

·  Professionals preparing for SAS interviews

·  Bloggers writing about analytics 

·  Clinical SAS Programmer

·  Research Data Analyst

·  Regulatory Data Validator

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Follow Us On : 


 
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

--->Follow our blog for more SAS-based analytics projects and industry data models.

---> Support Us By Following Our Blog..

To deepen your understanding of SAS analytics, please refer to our other data science and industry-focused projects listed below:



--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

About Us | Contact Privacy Policy

Comments

Popular posts from this blog

458.Data Cleaning Secrets Using Famous Food Dataset:Handling Duplicate Records in SAS

453.Global AI Trends Unlocked Through SCAN and SUBSTR Precision in SAS

441.Fixing Negative Data Errors Like A Pro Using SAS ABS Function