Issues combining two codes that work independently for a simple thermostat

This is my first project with Arduino, and my first true attempt at some programming. My current project is a thermostat consisting of an Arduino Uno, a servo motor, a DHT11 temperature and humidity sensor, a 16x2 LCD Display with 4 Pin Adapter (I2C LCD1602), and a button. Currently, I have a code that properly works to control the servo motor with the button (one click of the button turns the motor to position 90/ON and another click turns the motor back to position 0/OFF), and I have a code that is properly working to display the time and temperature on the LCD display; however, I am encountering numerous errors when attempting to compile the two.

Ideally, I would also like to set an alarm for 10 PM for the program to check the position of the servo motor and turn it to position 0 if it is at position 90. Currently, there is alarm set for 1:25:10 PM to print “ALARM: TURN OFF HEAT” in the serial monitor.

This is also my first post on a forum such as this. I have read the rules and guidelines, but would appreciate any further guidance for improvements or changes. Thank you!

Faulty Frankensteined Attempt at Combining

//Credit to codebender_cc at instructables.com for the groundwork of the button coding for the button control.
//http://www.instructables.com/id/How-to-use-a-Push-Button-Arduino-Tutorial/
          
#include <Servo.h>

Servo myservo;  // create servo object to control a servo 
                // a maximum of eight servo objects can be created 

// include the library code
#include <dht.h>
#include <Wire.h> 
#include <LiquidCrystal_I2C.h>

dht DHT;
#define DHT11_PIN 5

#include <Time.h>
#include <TimeAlarms.h>

//Constants
const int buttonPin = 7;          

//Variables
int buttonState = 0;
int flag = 0;
int pos = 0;

/**********************************************************/
//char array1[]="Temperature"; //the string to print on the LCD
//char array2[]="Humidity";
//int tim = 500; //the value of delay time
// initialize the library with the numbers of the interface pins
LiquidCrystal_I2C lcd(0x27,16,2); // set the LCD address to 0x27 for a 16 chars and 2 line display
/*********************************************************/

void setup() 
{
 { 
  myservo.attach(9);  // attaches the servo on pin 9 to the servo object
pinMode(pos, OUTPUT);
pinMode(buttonPin, INPUT_PULLUP); 
digitalWrite (buttonPin, LOW);
}
{
  lcd.init(); //initialize the lcd
  lcd.backlight(); //open the backlight
}
{
  Serial.begin(9600);
  setTime(13,25,0,5,6,17); // set time to Saturday 1:25:00pm May 6 2017
  // create the alarms 
 {
  void EveningAlarm();
  Serial.println("ALARM: TURN HEAT OFF");
 }
  Alarm.alarmRepeat(13,25,10,EveningAlarm);  // 1:25:10pm every day 
}
}

void loop()
  //Read button state (pressed or not pressed?)
  {
  buttonState = digitalRead(buttonPin);
  
  //If button pressed...
  if (buttonState == HIGH) { 
    //...once, turn thermostat on!
    if ( flag == 0){
      myservo.write(90);              // tell servo to go to position
      flag=1; //change flag variable
    }
    //...twice, turn thermostat off!
    else if ( flag == 1){
      myservo.write(0);              // tell servo to go to position
      flag=0; //change flag variable again 
    }    
  }
  delay(200); //Small delay
{
  int chk = DHT.read11(DHT11_PIN);
  lcd.setCursor(0,0); 
  lcd.print("Temp: ~ ");
  lcd.print(DHT.temperature);
  lcd.print((char)223);
  lcd.print("C");
  
  lcd.setCursor(0,1);
  lcd.print("Time: ~ ");
  digitalClockDisplay();
  Alarm.delay(1000); // wait one second between clock display
}

void EveningAlarm()
{
  Serial.println("ALARM: TURN HEAT OFF");    
}

void digitalClockDisplay()
{
  // digital clock display of the time
  lcd.print(hour());
  printDigits(minute());
  printDigits(second());
  lcd.println(); 
}

void printDigits(int digits)
{
  lcd.print(":");
  if(digits < 10)
    lcd.print('0');
  lcd.print(digits);
}
}

I realize there are likely several beginner errors and sloppy syntax. Any constructive criticism and guidance is apppreciated.

Errors

CumulativeAttempt2.ino: In function 'void setup()':
CumulativeAttempt2:56: error: 'EveningAlarm' was not declared in this scope
CumulativeAttempt2.ino: In function 'void loop()':
CumulativeAttempt2:89: error: 'digitalClockDisplay' was not declared in this scope
CumulativeAttempt2:94: error: a function-definition is not allowed here before '{' token
CumulativeAttempt2:99: error: a function-definition is not allowed here before '{' token
CumulativeAttempt2:108: error: a function-definition is not allowed here before '{' token
'EveningAlarm' was not declared in this scope

Code for Button and Servo

//Credit to codebender_cc at instructables.com for the groundwork of the button coding for the button control.
//http://www.instructables.com/id/How-to-use-a-Push-Button-Arduino-Tutorial/
          
#include <Servo.h>

Servo myservo;  // create servo object to control a servo 
                // a maximum of eight servo objects can be created 

//Constants
const int buttonPin = 7;          

//Variables
int buttonState = 0;
int flag = 0;
int pos = 0;

void setup() 
{ 
  myservo.attach(9);  // attaches the servo on pin 9 to the servo object
pinMode(pos, OUTPUT);
pinMode(buttonPin, INPUT_PULLUP); 
digitalWrite (buttonPin, LOW);
} 

void loop(){
  //Read button state (pressed or not pressed?)
  buttonState = digitalRead(buttonPin);

  //If button pressed...
  if (buttonState == HIGH) { 
    //...once, turn thermostat on!
    if ( flag == 0){
      myservo.write(90);              // tell servo to go to position
      flag=1; //change flag variable
    }
    //...twice, turn thermostat off!
    else if ( flag == 1){
      myservo.write(0);              // tell servo to go to position
      flag=0; //change flag variable again 
    }    
  }
  delay(200); //Small delay

}

Code for LCD

// include the library code
#include <dht.h>
#include <Wire.h> 
#include <LiquidCrystal_I2C.h>

dht DHT;
#define DHT11_PIN 5

#include <Time.h>
#include <TimeAlarms.h>

/**********************************************************/
//char array1[]="Temperature"; //the string to print on the LCD
//char array2[]="Humidity";
//int tim = 500; //the value of delay time
// initialize the library with the numbers of the interface pins
LiquidCrystal_I2C lcd(0x27,16,2); // set the LCD address to 0x27 for a 16 chars and 2 line display
/*********************************************************/
void setup()
{
  //Serial.begin(9600);
  lcd.init(); //initialize the lcd
  lcd.backlight(); //open the backlight
  
/************************TIMER*********************************/
  Serial.begin(9600);
  setTime(13,25,0,5,9,17); // set time to Saturday 1:25:00pm May 9 2017
  // create the alarms 
  Alarm.alarmRepeat(13,25,10,EveningAlarm);  // 1:25:10pm every day 
}
/*********************************************************/
void loop() 
{
  int chk = DHT.read11(DHT11_PIN);
  lcd.setCursor(0,0); 
  lcd.print("Temp: ~ ");
  lcd.print(DHT.temperature);
  lcd.print((char)223);
  lcd.print("C");
  
  lcd.setCursor(0,1);
  lcd.print("Time: ~ ");
  digitalClockDisplay();
  Alarm.delay(1000); // wait one second between clock display
}

void EveningAlarm(){
  Serial.println("ALARM: TURN HEAT OFF");
    
}

void digitalClockDisplay()
{
  // digital clock display of the time
  lcd.print(hour());
  printDigits(minute());
  printDigits(second());
  lcd.println(); 
}

void printDigits(int digits)
{
  lcd.print(":");
  if(digits < 10)
    lcd.print('0');
  lcd.print(digits);
}

Hi,
Combining sketches can be difficult. There are some suggestions about how to approach this On THIS Page

Oh my goodness. What a silly mistake. Thank you so much Terry. I seriously wished I had found that resource before ever attempting to do anything on Arduino. I had a single bracket out of place. Much appreciated!