BookmarkSubscribeRSS Feed
kawakami_densuke_jp
Fluorite | Level 6

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

15 REPLIES 15
LinusH
Tourmaline | Level 20

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
kawakami_densuke_jp
Fluorite | Level 6

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
Kurt_Bremser
Super User

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;
kawakami_densuke_jp
Fluorite | Level 6

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.=(

 

 

 

 

Kurt_Bremser
Super User

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.

kawakami_densuke_jp
Fluorite | Level 6

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!

Reeza
Super User

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. 

Reeza
Super User

@japelin_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?

kawakami_densuke_jp
Fluorite | Level 6
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.
Kurt_Bremser
Super User

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.

RW9
Diamond | Level 26 RW9
Diamond | Level 26

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.

LinusH
Tourmaline | Level 20

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
rogerjdeangelis
Barite | Level 11
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;

ChrisHemedinger
Community Manager

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.

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 15 replies
  • 1177 views
  • 3 likes
  • 8 in conversation