# Environment Variables
Get-ChildItem env:
Get-ChildItem env:RC*
Write-Host 'Getting ENV'
#Write-Host $env




# Compiling and Running
& "$env:rcbin\cobrc" "@CompileOptions.txt" "E:\DUTAS\src\Batch\CHGBD100.cob"
Write-Host 'Compile CHGBD100'

& "$env:rcbin\rclrun" "hello"

# Syntax Error
& "$env:rcbin\cobrc" "hello.cob"

# Command-line Options
& "$env:rcbin\cobrc" "hello.cob" :MaxMem="1G" :StringRuntimeEncoding="1252"
& "$env:rcbin\rclrun" "hello" -StringRuntimeEncoding="1252"

# Enable or Disable Warnings
& "$env:rcbin\cobrc" "warning.cob" 
& "$env:rcbin\cobrc" "warning.cob" :Warnings=-1015
& "$env:rcbin\cobrc" "warning.cob" :Warnings=-1015,+100

# Compiling Multiple Programs at Once
& "$env:rcbin\cobrc" HELLO.cob WARNING.cob
& "$env:rcbin\cobrc" *.cob

# Repository
& "$env:rcbin\cobrc" HELLO.cob WARNING.cob :DBDriver=SQLITE :DBConnectString=repository.db3

# @-Files
& "$env:rcbin\cobrc" "@CobOptions.txt" "@CobSource.txt"

# Env Variables do not Expand in @-Files 
$env:temp
& "$env:rcbin\cobrc" "@CobOptions.txt" "@CobSource.txt" -OutputDir="$env:temp" 

# Copybooks
& "$env:rcbin\cobrc" "COPYBOOK.cob" 
& "$env:rcbin\cobrc" "COPYBOOK.cob" :IncludeSearchPath=".\INCLUDES"

# FileConfig
& "$env:rcbin\cobrc" "COB001.cob"

# Tracing
& "$env:rcbin\cobrc" "TRACE.cob"
& "$env:rcbin\rclrun" "TRACE"
& "$env:rcbin\rclrun" "TRACE" -LogLevel="TRACE"
