Catalog access method clarification - macros

I have stored the macro in a local working directory as shown
I would like to access the macro with following code:
libname test 'C:\Users\Desktop\Enhancement\';
filename prtsort catalog 'TEST.SASMACR';
%include prtsort(Printtext) ;
WHile it gives following error:
ERROR: Entry PRINTTEXT.SOURCE not found in catalog TEST.SASMACR.
ERROR: Cannot %INCLUDE member Printtext in the aggregate PRTSORT.
ERROR: Entry PRINTTEXT.SOURCE not found in catalog TEST.SASMACR.
ERROR: Cannot %INCLUDE member Printtext in the aggregate PRTSORT.
Anyone can delight me, which part i did wrong? Thanks

If you are trying to re-use stored compiled macros that have previously been saved in your folder then you don't need to %include them from the catalogue. After defining your libref test pointing to the folder, you just need to set
option mstored sasmstore = test;
and your session should pick up all macros stored there automatically.

Related

Error: `path` does not exist: ‘MIS_655_RS_T3_Wholesale_Customers’

I imported my excel file into R Environment and saved the path by creating a new file in R scrip. However, when I tried to check my directory and load the dataset, I received the following message " Error: path does not exist: ‘MIS_655_RS_T3_Wholesale_Customers’
What am I doing wrong here?
Thanks
Have you missed the format of your dataset, eg. csv, xlsx.
I suggest you first set your file as working directory, then the following code might help you with it.
Dat_customers <- readxl::read_excel("MIS_655_RS_T3_Wholesale_Customers.xlsx")

Check for empty file and quit cakebuild

I am attempting to write a check in my Cake build script to pull in a file from BuildParameters and check if the file contents are empty -- if contents are empty, throw an exception and quit the build.
I am attempting to use FileReadText from the FileHelpers namespace but for some reason I cannot get my build to recognize the file command. I am following the syntax and documentation found here: https://cakebuild.net/api/Cake.FileHelpers/FileHelperAliases/97F5679A
Here is the code I am trying in build.cake:
var fileReadText= FileReadText(Parameters.TestParameters.TestListFP);
var fileText= fileReadText.ThrowIfNullOrEmpty(nameof(fileReadText));
The argument Parameters.TestParameters.TestListFP is set in my Parameters.cake file as such:
TestListFP = context.File("C:\Some\Path\some_file_name.txt");
Using the above code, I see this error:
error CS0103: The name 'FileReadText' does not exist in the current
context
Note that I do not have a ICakeContext in build.cake, just BuildParameters.
I tried to resolve the issue by adding using Cake.FileHelpers; at the top of my build.cake file, but then I see this error:
The type or namespace name 'FileHelpers' does not exist in the namespace 'Cake' (are you missing an assembly reference?)
The script works fine without my FileReadText code, so I know TestListFP is actually a valid file.
I think I am inherently misunderstanding how to use FileHelpers and FileReadText and I could not find any examples of usage in documentation or anywhere else. If anyone has guidance on how to use this method, or a better way to accomplish what I am trying to do, I would appreciate the help.
Have you added the #addin pre-processor directive, as mentioned here:
https://github.com/cake-contrib/Cake.FileHelpers/#cakefilehelpers
You can easily reference Cake.FileHelpers directly in your build script via a cake addin:
#addin "Cake.FileHelpers"

GCloud Functions: load error: File ./dist/index.js that is expected to define function doesn't exist

When trying to deploy to google cloud functions I get the response
load error: File ./dist/index.js that is expected to define function doesn't exist
Why is that?
It didn't upload my dist folder, because that was gitignored. In .gcloudignore I could remove the addition of gitignore by deleting #!include:.gitignore from the file.

POSTGRESQL - ERROR: could not load library pgafis.so : undefined symbol: lfsparms_V2

I'm using PGAFIS library for fingerprint matching. For this i have installed postgresql and having some user defined c functions.
PGAFIS contain makefile, .control file, sql and unpacked sql file everything
I have compiled and pgafis.so file for the same and everyfile is on right location.
In my PGAdmin-III when i run CREATE EXTENSION pgafis it gives me following error:
ERROR: could not load library "/usr/lib/postgresql/9.4/lib/pgafis.so": /usr/lib/postgresql/9.4/lib/pgafis.so: undefined symbol: lfsparms_V2
SQL state: XX000
Please help. Thanks in advance
(This is a follow-up from Postgresql user defined c function issues)
I expect you forgot to link to the required library.
Try adding
PG_LIBS = -lmindtct
or whatever. If it's not on the default linker path you'll need to need to add -L/path/to/the/containing/directory to PG_CPPFLAGS too.

Using BSON type provider in F# Script

I'm trying to use the Bson type provider to do some work with a MongoDB database. in an F# script.
I've taken the following steps.
I've created the Bson files by using:-
mongodump /host:starbug /db:Logger /out:data
I've built the type provider from the source from https://github.com/visemet/FSharp.Data.Bson
I've created the following F# script file:
#I "../../FSharp.Data.Bson/bin" // Location of Dll's created by step 1.
#r "FSharp.Data.Bson.Runtime.dll"
#r "FSharp.Data.Bson.dll"
#r "MongoDB.Bson.dll"
open BsonProvider
type AccessLogs = BsonProvider<"./data/EkmLogger/access_logs.bson">
type SQLiteLogs = BsonProvider<"./data/EkmLogger/sqlite_logs.bson">
let accessLogs = AccessLogs.GetSamples().[0]
But the last line is showing the following error in VS 2013
The type provider 'BsonProvider.ProviderImplementation.BsonProvider' reported an error in the context of provided type 'BsonProvider.BsonProvider,Path="./data/Logger/access_logs.bson"', member 'GetSamples'.
The error: Could not load file or assembly 'FSharp.Data.Bson.Runtime, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
The system cannot find the file specified. C:\Development\fsharp-scripts\Logger\AccessSqliteStats.fsx
Any idea what's wrong?