Last active
June 19, 2023 13:56
-
-
Save earnhardt3rd/9e48d37c4963fa205cc3ee64d28ef8b5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'getopts.pl'; | |
Getopts('m:d:t'); | |
my $MODE = uc($opt_m) || ""; | |
my $DEBUG = $opt_d || 0; | |
if (defined $opt_t) { my %TEST = &D_PDM_TREE();} | |
1; | |
sub D_PDM_TREE { | |
my $cRef = $_[0]; | |
my $dFile = $_[1]; | |
my $ret_msg = "PDM Tree"; | |
if (! -f $dFile) {return "ERROR! Unable to Locate Data File ($dFile) \@ $cRef";} | |
open (DAFH,">> $dFile"); | |
print DAFH "\n"; | |
print DAFH "REM ### $ret_msg ###\n"; | |
print DAFH "::THIS IS JUST A SAMPLE DATA ELEMENT FOR PDM (IT DOES NOTHING)!\n"; | |
close(DAFH); | |
return $ret_msg; | |
} | |
sub D_USD_ATTACHMENT_REPOSITORY { | |
my $cRef = $_[0]; | |
my $dFile = $_[1]; | |
my $ret_msg = "Export Attachment Repository"; | |
if (! -f $dFile) {return "ERROR! Unable to Locate Data File ($dFile) \@ $cRef";} | |
open (DAFH,">> $dFile"); | |
print DAFH "\n"; | |
print DAFH "REM ### $ret_msg ###\n"; | |
print DAFH "pdm_extract Document_Repository >>%data%\n"; | |
close(DAFH); | |
return $ret_msg; | |
} | |
sub D_USD_ACCESS_TYPES { | |
my $cRef = $_[0]; | |
my $dFile = $_[1]; | |
my $ret_msg = "Export Access Types"; | |
if (! -f $dFile) {return "ERROR! Unable to Locate Data File ($dFile) \@ $cRef";} | |
open (DAFH,">> $dFile"); | |
print DAFH "\n"; | |
print DAFH "REM ### $ret_msg ###\n"; | |
print DAFH "pdm_extract Access_Type >>%data%\n"; | |
close(DAFH); | |
return $ret_msg; | |
} | |
sub D_USD_ACTIVITY_TYPES { | |
my $cRef = $_[0]; | |
my $dFile = $_[1]; | |
my $ret_msg = "Exporting Activity Type with Related Macros!"; | |
if (! -f $dFile) {return "ERROR! Unable to Locate Data File ($dFile) \@ $cRef";} | |
my @ATY_LIST = &_PDM_EXTRACT("select sym,code,id from Act_Type"); | |
if (scalar(@ATY_LIST) <= 0) { | |
print " ERROR! Unable to continue data build without results from extract!\n"; | |
return; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment