× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I will update the file but here it is in the meantime.

TNAPI should work well for what you are trying to do.

Thank,

Al


On Fri, Mar 21, 2014 at 1:25 PM, Jack Tucky <jacktucky@xxxxxxxxx> wrote:

No. But Mark W. sent me the file via attachment.

We have an inventory system that was written by another software
consultant.
We have one customer that sends adjustments via a CSV. (public warehouse)

In order to write to the DB I have to do a lot of coding. I'm thinking I
might be able to crank out the TNAPI code in a few hours and just use the
green screen to do the adjustments.

Thanks.

Jack

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Jack Kingsley
Sent: Friday, March 21, 2014 6:05 AM
To: Midrange Systems Technical Discussion
Subject: Re: TNAPI example

Is this it.


http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CCgQFjAA

&url=http%3A%2F%2Fwww.think400.dk%2Ffiles%2Ftnapi.txt&ei=XA4sU9m4NsK0ygHtvYH

YCA&usg=AFQjCNFEjILHiJvsbBCghJNVe_UgeNO_fg&sig2=hMl4dZ0-Q3njEAkSxPyvmA&bvm=b
v.62922401,d.aWc&cad=rja




On Thu, Mar 20, 2014 at 9:03 PM, Jack Tucky <jacktucky@xxxxxxxxx> wrote:

I wanted to try out Albert York's TNAPI. I got it downloaded and
installed but my download was missing a file with an example of how to
use the API called TNAPIEX.TXT.



Does anyone have this file they could share or some sample code?



Thanks, Jack





--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take
a moment to review the archives at
http://archive.midrange.com/midrange-l.


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe,
unsubscribe,
or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at http://archive.midrange.com/midrange-l.


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.


* TNAPIEX
* Example of TNAPI use
*
D ParmWaitArr ds
D WaitArr 37 dim(20)

D ParmScrnChar ds
D Row 80 dim(24)

C *entry plist
C parm UserID 10
C parm Password 10

/free

// Send user ID and password (do not log password)
ParmSendBuff = UserID + '%L0' + Password;
ParmFctKey = 'ENTER';
exsr TNAPICALL;

// Press ENTER key twice
ParmFctKey = 'ENTER';
exsr TNAPICALL;
ParmFctKey = 'ENTER';
exsr TNAPICALL;

// Position the cursor to 10,23 (for demonstration purposes only)
ParmSendBuff = '10,23';
ParmFctKey = 'POSCSR';
exsr TNAPICALL;

// Get any waiting data (for demonstration purposes only)
ParmFctKey = 'GETDTA';
exsr TNAPICALL;

// Check contents of row 1, column 20
if %subst(Row(1):20) = 'Menu ';
ParmFctKey = 'F12';
exsr TNAPICALL;
endif;

// Send TAB key
ParmSendBuff = '%TB';
exsr TNAPICALL;

// Command entry (wait for 'Command' to appear on line 1)
ParmSendBuff = 'CALL QCMD';
ParmFctKey = 'ENTER';
WaitArr(1) = 'O0134Command';
exsr TNAPICALL;

// Send 'DSPSYSTS' and wait for 'Display to appear on line 1
ParmSendBuff = 'DSPSYSSTS';
ParmFctKey = 'ENTER';
// WaitArr(1) = 'O0130Display';
exsr TNAPICALL;

// Exit the application
ParmFctKey = 'F3';
exsr TNAPICALL;

// Signoff
ParmSendBuff = 'SIGNOFF';
ParmFctKey = 'ENTER';
exsr TNAPICALL;

// End the session
ParmFctKey = 'EOJ';
exsr TNAPICALL;

/end-free
*
*******************************************************************
*
C TNAPICALL begsr

C call 'TNAPI'
C parm ParmSendbuff 256
C parm ParmFctKey 6
C parm 30 ParmWaitTime 5 1
C parm ParmWaitArr
C parm ParmSystem 64
C parm 'Y' ParmDisplay 1
C parm 'N' ParmAttr 1

C parm ParmLogFile 10
C parm ParmWaitPtr 2 0
C parm ParmReturn 1
C parm ParmScrnChar 1920
C parm ParmScrnAttr 1920
C parm ParmCurrRow 2 0
C parm ParmCurrcol 2 0

C ParmReturn ifgt '1'
C move *on *inlr
C return
C endif

C eval ParmSendBuff = *blanks
C eval ParmFctKey = *blanks
C eval ParmWaitArr = *blanks

C endsr

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.