Data entry, format and dll

Reply
Occasional Contributor
Posts: 7

Data entry, format and dll

[ Edited ]

I'm SAS and other application developer and looking for sas format infromation for developing "data entry form".

 

I wanna do follow convert.

Applicaiton->[entried data,informat]->dll->application get return value.

[] is arguments for call routine.

 

example:

['1 1 1',yymmdd10.]->dll->[True, '2001-01-01']

['1 1 1',yymdd10.]->dll->[False, missing]

 

 

anyone has infromation?

 

In sashelp.vformat, I found "pathname" and "object name" which shows sas installed directory and dll.

I tried call those dlls but argumens are unknown and faild.=(

 

using

Base SAS9.4 TS1M3

Windows 8.1 pro 64bit

Super User
Posts: 5,383

Re: Data entry, format and dll

I'm a bit confused. I have never heard of a requirement containing both SASHELP.VFORMAt and dll...

Can you please elaborate on what you are trying to achieve?

What is the application, and the underlying requirement?

Data never sleeps
Occasional Contributor
Posts: 7

Re: Data entry, format and dll

Thank you for your reply.

 

Application is my original application.

I attached sample image.

1.you entry "1 1 1".

2.you click "convert" button.

3."2001-01-01" entered to formated field by automatic.

 

I wanna auto formatting by other process.

Because I developed by hard coding follow and its inefficiency.

 

if format="yymmdd10." then

else format="datetime16." then 

else format="time5." then

else format="time8." then

...

else return="format error!"

 

 

 


1.png
Super User
Posts: 7,422

Re: Data entry, format and dll

You might want to look at stored processes.

The STP would have two text prompts, and then execute a data step like this:

data _null_;
file _webout;
result = input("&prompt1",&prompt2);
if result ne .
then do;
  put 'True';
  put result &prompt2;
end;
else do;
  put 'False';
  put 'missing';
end;
run;
---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Occasional Contributor
Posts: 7

Re: Data entry, format and dll

very thanks for reply and coding.

 

But I want to implement without run SAS or sas process because of for quick response in my applicaiton.=(

 

 

 

 

Super User
Posts: 7,422

Re: Data entry, format and dll

Using SAS without using SAS? The interface for the usage of SAS formats is Base SAS, so you have to use it, or find some way to re-engineer it. Besides that this would violate your license agreement, it would be extremely inefficient.

And a properly set up STP will have acceptable response times.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Occasional Contributor
Posts: 7

Re: Data entry, format and dll

I use Delphi to develop interface as substitution of SAS/AF more ease to handle, cheeper.

 

Eventually entered data is going to converted to sas datasets.

Making formatted data is a part of data checking.

 

Of course I do not re-engineer sas system files.

I recognize it will violate sas license agreement.

 

I try STP you suggest. =)

Thankyou!

Super User
Posts: 19,090

Re: Data entry, format and dll

I'm not sure formatting dates checks anything. Check for valid dates are built into many languages. If the date is valid then as long as you don't change your process you can convert it for the database. 

 

Formats are lookup tables, whether that's a list, dictionary or other object in a diff language depends on what's available. 

Super User
Posts: 19,090

Re: Data entry, format and dll


kawakami_densuke_jp wrote:

very thanks for reply and coding.

 

But I want to implement without run SAS or sas process because of for quick response in my applicaiton.=(

 

 

 

 


Then why are you asking about this in a SAS forum?

Occasional Contributor
Posts: 7

Re: Data entry, format and dll

I'm sorry for the information to dispensing.

I use Delphi to develop interface as substitution of SAS/AF more ease to handle and cheeper.

Making formatted data is a part of data checking.
Because entered data is going to converted to sas datasets finally.

So I look for anyone knows information about sas format dlls and how to use.
Super User
Posts: 7,422

Re: Data entry, format and dll

I would never use somebody else's .dll.

The interface to the dll is internal to their software and might (will!) change without further notice.

The interface for the SAS system is Base SAS, and one should use that.

STPs are documented and supported. The STP infrastructure is the replacement for SAS/AF IMO. We have converted all our AF applications to STPs by now.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Super User
Super User
Posts: 7,711

Re: Data entry, format and dll

If you have an application for data entry, regardles of implementation, then that is not a question for this forum which is SAS software specific.  I would imagine, that if you try to call bits of the SAS system - assuming you have them at all which isn't clear from your post - might actually invalidate your licence. 

 

What I would suggest is, if you want to write your own application, then use open source formatted data as its output - CSV is simplest, or XML.  Then your SAS programs can load that data as part of thier processes.  The two systems can then exchange data without needing to interfere with each other.  This is the normal method of transfer.

Super User
Posts: 5,383

Re: Data entry, format and dll

Is your data even in SAS?

If not, go somewhere else for 3rd party objects.

If your aim is to update/store data in SAS, STP has already been mentioned. Also, there is a possibility to use OLEDB. Search SAS doc for guidance.

Data never sleeps
Valued Guide
Posts: 505

Re: Data entry, format and dll

SAS FORUM: Data entry, format and dll

Probably need 'old text editor' DMS(circa 1980) and full SAS.
Does not work in EE, UE, EG or SAS Studio

This does not exactly answer your question but may be helpfull

see
https://listserv.uga.edu/cgi-bin/wa?A2=SAS-L;cea3bbff.1701d

This post
https://goo.gl/y4Ad0Q
https://communities.sas.com/t5/General-SAS-Programming/Data-entry-format-and-dll/m-p/326961

You can also call R (Rshiny?) from SAS/IML
This is an oversimplified example
look at PMENU and datastep Window and 'proc fsedit'


HAVE A DATE
===========

  010101

WANT   (interactive windows -  010101 <enter> and the converted date will popup)
====

   Enter data mmddyy

   010101
   ------

   Converted Date

   01JAN2001
   ---------

FULL SOLUTION
============

%macro datecon;

   %window choose  irow=4 rows=25

    #4 @12 "enter data mmddyy"
    #5 @12  choice 6 attr=underline;
   ;
   %display choose;

   %let date=%sysfunc(putn(%sysfunc(inputn(&choice,mmddyy6)),date9));
   %put &=date;

   %window result  irow=4 rows=25

    #4 @12 "Converted mmddyy"
    #5 @12  "&date" attr=underline;

   %display result;;

%mend datecon;

%datecon;

Community Manager
Posts: 2,889

Re: Data entry, format and dll

If you're application is connected to a SAS session (using IOM), then you might be able to use the IOM FormatService.

 

Sorry, I don't have a ready example.  But the FormatService can be used by another app to return a formatted value, given a raw value (or array of them) and a known SAS format.

 

It's not clear from your question that you are connected via IOM though -- it sounds like you're wanting to use SAS code libraries (DLLs) directly.  This is not supported or documented.  The only reliable method is to supply your data values into a SAS session (using IOM or another method) and get SAS to format them.

Ask a Question
Discussion stats
  • 15 replies
  • 205 views
  • 3 likes
  • 8 in conversation