home *** CD-ROM | disk | FTP | other *** search
/ Boston 2 / boston-2.iso / DOS / PROGRAM / CLIPPER / NFTROFF / 12.TR < prev    next >
Text File  |  1993-12-01  |  29KB  |  1,749 lines

  1. .de }n
  2. .bp
  3. .sp .5i
  4. ..
  5. .wh -.8i }n
  6. .sp .5i
  7. .po -.4i
  8. .ll 7.5i
  9. .ps 9
  10. .vs 9
  11. .in 0i
  12. .ta 1.63265i
  13. .sp 2
  14. .ne 20
  15. .ps +3
  16. .vs +3
  17. FT_ENDCAP()    Cancel a specific NetWare print queue capture
  18. .br
  19. .ta
  20. .in 0.08i
  21. .ps -3
  22. .vs -3
  23. .sp 2
  24. \fBFT_ENDCAP()
  25. Cancel a specific NetWare print queue capture
  26. .in 0i
  27. .br
  28. \l'6.24i'
  29. .br
  30. .sp
  31. .in 0.08i
  32. \fBSyntax
  33. .sp
  34. .in 0.4i
  35. \fBFT_ENDCAP( [ <nLPTPortNumber> ] ) -> lResult
  36. .sp
  37. .in 0.08i
  38. \fBArguments
  39. .sp
  40. .in 0.4i
  41. \fB<nLPTPortNumber>\fR is the captured LPT port to cancel\.  If the
  42. parameter is omitted, the default port of LPT1: is used\.
  43. .sp
  44. .in 0.08i
  45. \fBReturns
  46. .sp
  47. .in 0.4i
  48. \.T\. if successful
  49. .sp
  50. .in 0.08i
  51. \fBDescription
  52. .sp
  53. .in 0.32i
  54. This routine is used to close a specific capture on the specified LPT
  55. port\.  When this command is issued, the LPT port is no longer redirected
  56. to the print queue, and any information waiting in queue to be printed
  57. will be printed\.
  58. .sp
  59. This routine was designed and written for Advanced NetWare 286 v 2\.1 or
  60. NetWare 386 v 3\.0 or better\.  It has been tested on Advanced NetWare 286
  61. v 2\.15 rev A & C and NetWare 386 v 3\.0\.
  62. .sp
  63. This source code was written for Microsoft Macro Assembler v 5\.1\.  It
  64. should work with any assembler with minor modifications\.
  65. .sp
  66. .in 0.08i
  67. \fBExamples
  68. .sp
  69. .in 0.32i
  70. .br
  71. (in DOS)
  72. .br
  73. F:>CAPTURE S=ServerName Q=PrintQueueName T=0 L=2
  74. .br
  75. Device LPT2: re-routed to queue PrintQueueName on server ServerName\.
  76. .br
  77. F:>CAPTURE S=ServerName Q=PrintQueueName T=0 L=1
  78. .br
  79. Device LPT1: re-routed to queue PrintQueueName on server ServerName\.
  80. .sp
  81. .br
  82. (in your Clipper application)
  83. .br
  84. FT_ENDCAP(2) // Closes LPT2: capture, and flushes print buffer
  85. .br
  86. \.\.\.
  87. .br
  88. \.\.\.
  89. .ta 1.04i
  90. .br
  91. FT_ENDCAP()    // Closes LPT1: (default) capture, and flushes
  92. .br
  93. .ta
  94. .in 1.36i
  95. .ta 0.48i
  96. .br
  97. //    print buffer
  98. .br
  99. .ta
  100. .sp
  101. .in 0.08i
  102. \fBSource:\fR ENDCAP\.ASM
  103. .sp
  104. \fBAuthor:\fR James R\. Zack
  105. .in 0i
  106. .ta 1.63265i
  107. .sp 2
  108. .ne 20
  109. .ps +3
  110. .vs +3
  111. FT_LOGOUT()    Logout from all currently connected NetWare file servers
  112. .br
  113. .ta
  114. .in 0.08i
  115. .ps -3
  116. .vs -3
  117. .sp 2
  118. \fBFT_LOGOUT()
  119. Logout from all currently connected NetWare file servers
  120. .in 0i
  121. .br
  122. \l'6.24i'
  123. .br
  124. .sp
  125. .in 0.08i
  126. \fBSyntax
  127. .sp
  128. .in 0.4i
  129. \fBFT_LOGOUT() -> NIL
  130. .sp
  131. .in 0.08i
  132. \fBArguments
  133. .sp
  134. .in 0.4i
  135. None
  136. .sp
  137. .in 0.08i
  138. \fBReturns
  139. .sp
  140. .in 0.4i
  141. NIL
  142. .sp
  143. .in 0.08i
  144. \fBDescription
  145. .sp
  146. .in 0.32i
  147. This routine is used to log the current user out of all connected file
  148. servers and return control back to Clipper\.  This is handy for writing
  149. your own login screens in Clipper\.  After the FT_LOGOUT() function is
  150. called, you could have a login screen come up, and the users would
  151. never see the DOS prompt again!
  152. .sp
  153. This routine was designed and written for Advanced NetWare 286 v 2\.0 or
  154. NetWare 386 v 3\.0 or better\.  It has been tested on Advanced NetWare 286
  155. v 2\.15 rev A & C, NetWare 386 v 3\.0\.
  156. .sp
  157. Written in Microsoft MASM v5\.1
  158. .sp
  159. .in 0.08i
  160. \fBExamples
  161. .sp
  162. .in 0.32i
  163. .br
  164. FT_LOGOUT()
  165. .br
  166. DO LOGINPRG
  167. .sp
  168. .in 0.08i
  169. \fBSource:\fR LOGOUT\.ASM
  170. .sp
  171. \fBAuthor:\fR James R\. Zack
  172. .in 0i
  173. .ta 1.63265i
  174. .sp 2
  175. .ne 20
  176. .ps +3
  177. .vs +3
  178. FT_NOVDMP2()    Determine Novell server\'s dynamic memory area 2 availability
  179. .br
  180. .ta
  181. .in 0.08i
  182. .ps -3
  183. .vs -3
  184. .sp 2
  185. \fBFT_NOVDMP2()
  186. Determine Novell server\'s dynamic memory area 2 availability
  187. .in 0i
  188. .br
  189. \l'6.24i'
  190. .br
  191. .sp
  192. .in 0.08i
  193. \fBSyntax
  194. .sp
  195. .in 0.32i
  196. \fBFT_NOVDMP2() -> nDMP2
  197. .sp
  198. .in 0.08i
  199. \fBArguments
  200. .sp
  201. .in 0.32i
  202. None
  203. .sp
  204. .in 0.08i
  205. \fBReturns
  206. .sp
  207. .in 0.32i
  208. The total available dynamic memory area 2 on current server, in bytes\.
  209. .sp
  210. .in 0.08i
  211. \fBDescription
  212. .sp
  213. .in 0.24i
  214. This function is used primarily on Novell 2\.15 TTS Servers\.  Dynamic
  215. Memory area 2 is where the transaction tracking takes place\.  This
  216. function allows you to query the ability of the server to handle any
  217. transactions you may wish to start\.  (I personally don\'t let the area
  218. fall below 8K)\.  It is generally only useful in large batch situations
  219. and if you are using NETLIB\'s TTS capability\.
  220. .sp
  221. .sp
  222. .in 0.08i
  223. \fBExamples
  224. .sp
  225. .in 0.24i
  226. .ta 1.44i
  227. .br
  228. t_trans(ON)    // Netlib function
  229. .br
  230. .ta
  231. .br
  232. DO WHILE FT_NOVDMP2() > 8000 \.AND\. ! Eof()
  233. .sp
  234. .in 0.48i
  235. .br
  236. REPLACE foo WITH \'bar\'
  237. .br
  238. SKIP
  239. .sp
  240. .in 0.24i
  241. .br
  242. ENDDO
  243. .br
  244. t_trans(OFF)
  245. .sp
  246. .sp
  247. .in 0.08i
  248. \fBSource:\fR NOVDMP2\.ASM
  249. .sp
  250. \fBAuthor:\fR David Minter
  251. .in 0i
  252. .ta 1.63265i
  253. .sp 2
  254. .ne 20
  255. .ps +3
  256. .vs +3
  257. FT_NOVPURGE()    Purge all deleted files on a Novell server
  258. .br
  259. .ta
  260. .in 0.08i
  261. .ps -3
  262. .vs -3
  263. .sp 2
  264. \fBFT_NOVPURGE()
  265. Purge all deleted files on a Novell server
  266. .in 0i
  267. .br
  268. \l'6.24i'
  269. .br
  270. .sp
  271. .in 0.08i
  272. \fBSyntax
  273. .sp
  274. .in 0.32i
  275. \fBFT_NOVPURGE() -> lTemp
  276. .sp
  277. .in 0.08i
  278. \fBArguments
  279. .sp
  280. .in 0.32i
  281. None
  282. .sp
  283. .in 0.08i
  284. \fBReturns
  285. .sp
  286. .in 0.32i
  287. \.T\. if successful, otherwise \.F\.
  288. .sp
  289. .in 0.08i
  290. \fBDescription
  291. .sp
  292. .in 0.24i
  293. This function is to purge those files that a workstation has
  294. previously deleted\.  This function only works on a Novell network\.
  295. .sp
  296. .in 0.08i
  297. \fBExamples
  298. .sp
  299. .in 0.24i
  300. .br
  301. ERASE FILE foo\.bar
  302. .br
  303. ERASE FILE foo2\.bar
  304. .br
  305. ERASE FILE foo3\.bar
  306. .br
  307. ? FT_NOVPURGE()
  308. .sp
  309. .in 0.08i
  310. \fBSource:\fR NOVPURGE\.ASM
  311. .sp
  312. \fBAuthor:\fR David Minter
  313. .in 0i
  314. .ta 1.63265i
  315. .sp 2
  316. .ne 20
  317. .ps +3
  318. .vs +3
  319. FT_NWLSTAT()    Return the current Novell NetWare logical station number
  320. .br
  321. .ta
  322. .in 0.08i
  323. .ps -3
  324. .vs -3
  325. .sp 2
  326. \fBFT_NWLSTAT()
  327. Return the current Novell NetWare logical station number
  328. .in 0i
  329. .br
  330. \l'6.24i'
  331. .br
  332. .sp
  333. .in 0.08i
  334. \fBSyntax
  335. .sp
  336. .in 0.4i
  337. \fBFT_NWLSTAT() -> nStatNum
  338. .sp
  339. .in 0.08i
  340. \fBArguments
  341. .sp
  342. .in 0.4i
  343. None
  344. .sp
  345. .in 0.08i
  346. \fBReturns
  347. .sp
  348. .in 0.4i
  349. A numeric corresponding to the current logical station number
  350. assigned by NetWare\.
  351. .sp
  352. .in 0.08i
  353. \fBDescription
  354. .sp
  355. .in 0.4i
  356. In order to find out information about a particular node logged
  357. in to a NetWare server, you will need the logical
  358. .ta 4.32i
  359. station number, also known as a "connection number\."    This
  360. .br
  361. .ta
  362. function will return that number\.  This will be a number from 1 to 100
  363. under NetWare 286, or from 1 to 250 under NetWare 386\.  This is *not*
  364. the same as a physical station number\.
  365. .sp
  366. This function requires FT_INT86()\.
  367. .sp
  368. This function does NOT test for the existence of the NetWare shell\.
  369. The behavior is undefined if no shell is loaded\.
  370. .sp
  371. .in 0.08i
  372. \fBExamples
  373. .sp
  374. .in 0.4i
  375. QOut( "Logical station: " + str( FT_NWLSTAT() ) )
  376. .sp
  377. .in 0.08i
  378. \fBSource:\fR NWLSTAT\.PRG
  379. .sp
  380. \fBAuthor:\fR Glenn Scott
  381. .in 0i
  382. .sp 2
  383. .ne 20
  384. .ps +3
  385. .vs +3
  386. FT_NWSEMCLOSE() Close a NetWare semaphore
  387. .br
  388. .in 0.08i
  389. .ps -3
  390. .vs -3
  391. .sp 2
  392. \fBFT_NWSEMCLOSE()
  393. Close a NetWare semaphore
  394. .in 0i
  395. .br
  396. \l'6.24i'
  397. .br
  398. .sp
  399. .in 0.08i
  400. \fBSyntax
  401. .sp
  402. .in 0.4i
  403. .ta 2.24i
  404. \fBFT_NWSEMCLOSE( <nHandle> )    -> nRc
  405. .br
  406. .ta
  407. .sp
  408. .in 0.08i
  409. \fBArguments
  410. .sp
  411. .in 0.4i
  412. \fB<nHandle>\fR is the semaphore handle, returned from a previous call
  413. to FT_NWSEMOPEN()\.
  414. .sp
  415. .in 0.08i
  416. \fBReturns
  417. .sp
  418. .in 0.4i
  419. nRc, a numeric, as follows:
  420. .sp
  421. .in 0.96i
  422. 0 - success
  423. .in 0.8i
  424. 255 - invalid semaphore handle
  425. .sp
  426. .in 0.08i
  427. \fBDescription
  428. .sp
  429. .in 0.4i
  430. Call FT_NWSEMCLOSE() when the app is finished\.  This decrements
  431. the open count for the semaphore\.  If the open count hits zero,
  432. the semaphore is deleted by NetWare\.
  433. .sp
  434. .in 0.08i
  435. \fBExamples
  436. .sp
  437. .in 0.4i
  438. QOUT( "Close returns:  " + STR( FT_NWSEMCLOSE( nHandle ) ) )
  439. .sp
  440. .in 0.08i
  441. \fBSource:\fR NWSEM\.PRG
  442. .sp
  443. \fBAuthor:\fR Glenn Scott
  444. .in 0i
  445. .sp
  446. .in 1.5i
  447. .ti -1.5i
  448. .ta 1.5i
  449. .ft B
  450. See Also:    
  451. .ft R
  452. FT_NWSEMOPEN()
  453. , FT_NWSEMEX()
  454. , FT_NWSEMWAIT()
  455. , FT_NWSEMSIG()
  456. , FT_NWSEMLOCK()
  457. .ta 1.63265i
  458. .in 0i
  459. .sp 2
  460. .ne 20
  461. .ps +3
  462. .vs +3
  463. FT_NWSEMEX()    Examine a NetWare semaphore\'s value and open count
  464. .br
  465. .ta
  466. .in 0.08i
  467. .ps -3
  468. .vs -3
  469. .sp 2
  470. \fBFT_NWSEMEX()
  471. Examine a NetWare semaphore\'s value and open count
  472. .in 0i
  473. .br
  474. \l'6.24i'
  475. .br
  476. .sp
  477. .in 0.08i
  478. \fBSyntax
  479. .sp
  480. .in 0.48i
  481. \fBFT_NWSEMEX( <nHandle>, <@nValue>, <@nOpenCnt> ) -> nRc
  482. .sp
  483. .in 0.08i
  484. \fBArguments
  485. .sp
  486. .in 0.48i
  487. \fB<nHandle>\fR is the semaphore handle, returned from a previous call
  488. to FT_NWSEMOPEN()\.
  489. .sp
  490. \fB<@nValue>\fR will get the current semaphore value\.  THIS NUMERIC
  491. ARGUMENT MUST BE PASSED BY REFERENCE!
  492. .sp
  493. \fB<@nOpenCnt>\fR will get the current number of workstations
  494. that have opened the semaphore\.  THIS NUMERIC ARGUMENT MUST BE
  495. PASSED BY REFERENCE!
  496. .sp
  497. .in 0.08i
  498. \fBReturns
  499. .sp
  500. .in 0.48i
  501. nRc, a numeric, as follows:
  502. .sp
  503. .in 0.96i
  504. 0 - success
  505. .in 0.8i
  506. 255 - invalid semaphore handle
  507. .sp
  508. .in 0.48i
  509. In addition, nValue will be set to the semaphore\'s current value,
  510. and nOpenCnt will be set to the number of stations that have
  511. opened the semaphore\.
  512. .sp
  513. .in 0.08i
  514. \fBDescription
  515. .sp
  516. .in 0.48i
  517. See the description for FT_NWSEMOPEN()\.
  518. .sp
  519. .in 0.08i
  520. \fBExamples
  521. .sp
  522. .in 0.32i
  523. .br
  524. nInitVal := 2
  525. .ta 0.72i
  526. .br
  527. nHandle    := 0
  528. .br
  529. .ta
  530. .br
  531. nOpenCnt := 0
  532. .sp
  533. .br
  534. FT_NWSEMOPEN( "Semaphore Test", nInitVal, @nHandle, @nOpenCnt )
  535. .sp
  536. .br
  537. nRc := FT_NWSEMWAIT( nHandle )
  538. .in 0.64i
  539. .br
  540. IF nRc == 254
  541. .in 0.56i
  542. .br
  543. QOUT( "All slots for this resource are currently in use" )
  544. .br
  545. QUIT
  546. .in 0.32i
  547. .br
  548. ENDIF
  549. .sp
  550. .br
  551. FT_NWSEMEX( nHandle, @nValue, @nOpenCnt )
  552. .br
  553. QOUT( "Semaphore test -> Open at [" + ;
  554. .in 0.8i
  555. .ta 2.4i
  556. .br
  557. ALLTRIM(STR(nOpenCnt))    + ;
  558. .br
  559. .ta
  560. .ta 2.4i
  561. .br
  562. "] stations, value is ["    + ;
  563. .br
  564. .ta
  565. .br
  566. ALLTRIM(STR(nValue)) + "]" )
  567. .sp
  568. .in 0.08i
  569. \fBSource:\fR NWSEM\.PRG
  570. .sp
  571. \fBAuthor:\fR Glenn Scott
  572. .in 0i
  573. .sp
  574. .in 1.5i
  575. .ti -1.5i
  576. .ta 1.5i
  577. .ft B
  578. See Also:    
  579. .ft R
  580. FT_NWSEMOPEN()
  581. , FT_NWSEMWAIT()
  582. , FT_NWSEMSIG()
  583. , FT_NWSEMCLOSE()
  584. , FT_NWSEMLOCK()
  585. .ta 1.63265i
  586. .in 0i
  587. .sp 2
  588. .ne 20
  589. .ps +3
  590. .vs +3
  591. FT_NWSEMLOCK()    Perform a semaphore "lock"
  592. .br
  593. .ta
  594. .in 0.08i
  595. .ps -3
  596. .vs -3
  597. .sp 2
  598. \fBFT_NWSEMLOCK()
  599. Perform a semaphore "lock"
  600. .in 0i
  601. .br
  602. \l'6.24i'
  603. .br
  604. .sp
  605. .in 0.08i
  606. \fBSyntax
  607. .sp
  608. .in 0.4i
  609. \fBFT_NWSEMLOCK ( <cSemaphore> ) -> lRet
  610. .sp
  611. .in 0.08i
  612. \fBArguments
  613. .sp
  614. .in 0.4i
  615. \fB<cSemaphore>\fR is the name of a semaphore you want to "lock\."
  616. .sp
  617. .in 0.08i
  618. \fBReturns
  619. .sp
  620. .in 0.4i
  621. lRet == \.t\. if you get the lock, \.f\. if you don\'t\.
  622. .sp
  623. .in 0.08i
  624. \fBDescription
  625. .sp
  626. .in 0.4i
  627. FT_NWSEMLOCK() uses the Nanforum Toolkit\'s NetWare Semaphore API functions
  628. in order to provide a general purpose "lock" you can use in
  629. a NetWare environment\.
  630. .sp
  631. An interesting byproduct of NetWare\'s semaphore functions is
  632. the "open count" which tells you how many connections have this
  633. semaphore open\.  This is different from the semaphore\'s _value_,
  634. which is set when the semaphore is opened and changed with
  635. signal() and wait()\.
  636. .sp
  637. The point of semaphores is that you don\'t care how many users
  638. are using the resource; you merely wait on a semaphore until
  639. the resource becomes available or you give up\.  When you\'re done,
  640. you signal it and off you go\.
  641. .sp
  642. Back to the open count\.  FT_NWSEMLOCK() opens the semaphore
  643. as named in <cSemaphore>\.  After it is opened, the open count
  644. is checked\.  If it is anything other than 1, that means someone
  645. else has it (or you failed in your open) so the semaphore is
  646. closed and the "lock" is refused\.  If the value is 1, then your
  647. app is that 1 station so the "lock" is granted\.
  648. .sp
  649. You can use a semaphore lock to control access to anything
  650. that Clipper\'s RLOCK() and FLOCK() can\'t help you with, such
  651. as text files written with the low level file i/o functions,
  652. etc\.
  653. .sp
  654. .in 0.08i
  655. \fBExamples
  656. .sp
  657. .in 0.4i
  658. .br
  659. IF FT_NWSEMLOCK( "k:\\apps\\error\.log" )
  660. .in 0.72i
  661. .br
  662. // Note, you aren\'t actually LOCKING this file, you are
  663. .br
  664. // just locking a semaphore by the same name\.  As long as
  665. .br
  666. // all apps that might be using this file are cooperating
  667. .br
  668. // with the same kind of semaphore lock, you can effectively
  669. .br
  670. // control access to the file\.
  671. .in 0.56i
  672. .br
  673. ELSE
  674. .in 0.72i
  675. .br
  676. QOUT("Couldn\'t lock file\.")
  677. .in 0.56i
  678. .br
  679. ENDIF
  680. .sp
  681. .in 0.08i
  682. \fBSource:\fR NWSEM\.PRG
  683. .sp
  684. \fBAuthor:\fR Glenn Scott
  685. .in 0i
  686. .sp
  687. .in 1.5i
  688. .ti -1.5i
  689. .ta 1.5i
  690. .ft B
  691. See Also:    
  692. .ft R
  693. FT_NWSEMOPEN()
  694. , FT_NWSEMEX()
  695. , FT_NWSEMWAIT()
  696. , FT_NWSEMSIG()
  697. .ta 1.63265i
  698. .in 0i
  699. .sp 2
  700. .ne 20
  701. .ps +3
  702. .vs +3
  703. FT_NWSEMOPEN()    Open or create a NetWare semaphore
  704. .br
  705. .ta
  706. .in 0.08i
  707. .ps -3
  708. .vs -3
  709. .sp 2
  710. \fBFT_NWSEMOPEN()
  711. Open or create a NetWare semaphore
  712. .in 0i
  713. .br
  714. \l'6.24i'
  715. .br
  716. .sp
  717. .in 0.08i
  718. \fBSyntax
  719. .sp
  720. .in 0.48i
  721. \fBFT_NWSEMOPEN( <cName>, <nInitVal>, <@nHandle>, <@nOpenCnt> ) -> nRc
  722. .sp
  723. .in 0.08i
  724. \fBArguments
  725. .sp
  726. .in 0.48i
  727. \fB<cName>\fR is the semaphore name, maximum length is 127 characters\.
  728. .sp
  729. \fB<nInitVal>\fR is the initial value for the semaphore\.  It must start
  730. as a positive number, to a maximum of 127\.
  731. .sp
  732. \fB<@nHandle>\fR is the semaphore handle\.  THIS MUST BE PASSED BY
  733. .ta 0.96i
  734. REFERENCE!    On exit, \fB<nHandle>\fR will contain a numeric value that
  735. .br
  736. .ta
  737. refers to the opened semaphore\.  You will need it to pass to
  738. .ta 2.24i
  739. other semaphore functions!    PASS IT BY REFERENCE!
  740. .br
  741. .ta
  742. .sp
  743. \fB<@nOpenCnt>\fR is the number of stations that have opened the
  744. semaphore\.  THIS MUST BE PASSED BY REFERENCE! On exit, \fB<nOpenCnt>
  745. will contain a numeric value\.
  746. .sp
  747. .in 0.08i
  748. \fBReturns
  749. .sp
  750. .in 0.48i
  751. nRc, a numeric result code, as follows:
  752. .sp
  753. .in 0.96i
  754. .br
  755. 0 - success
  756. .in 0.8i
  757. .br
  758. 254 - Invalid semaphore name length
  759. .br
  760. 255 - Invalid semaphore value
  761. .sp
  762. .in 0.48i
  763. <nHandle> will contain the semaphore handle, and
  764. <nOpenCnt> will contain the number of stations that have opened
  765. the semaphore\.
  766. .sp
  767. .in 0.08i
  768. \fBDescription
  769. .sp
  770. .in 0.48i
  771. A semaphore is simply a label that indirectly controls network
  772. activity\.  There is a semaphore name, which can be up to 127
  773. characters, and an associated value, which can range from 0 to
  774. 127\.
  775. .sp
  776. A semaphore can be used for many things, but is most often used
  777. to limit the number of users in an application, and to control
  778. access to a network resource\.
  779. .sp
  780. A semaphore essentially allows you to place locks on resources
  781. other than files\.
  782. .sp
  783. An application begins the process by calling FT_NWSEMOPEN()\.
  784. If the semaphore doesn\'t exist, NetWare will create it\.
  785. FT_NWSEMOPEN() returns a handle that is used in other semaphore
  786. calls\.
  787. .sp
  788. Applications use FT_NWSEMWAIT() to wait for a semaphore to
  789. become available\.  FT_NWSEMWAIT() decrements the semaphore\'s
  790. value by 1\.  If the value > 0, then the application should
  791. be allowed to access the semaphore\'s resource\.  If the value
  792. goes negative, then the application is placed in a queue\.
  793. How long your app is in the queue is determined by how you
  794. set the timeout parameter\.  If you can\'t get the resource in
  795. the time you allot, you\'re let out of the queue and the
  796. value increments by 1 again\.
  797. .sp
  798. When an application finishes with a semaphore, it should
  799. call FT_NWSEMSIG() to increment the value, and then
  800. FT_NWSEMCLOSE() to close the semaphore\.  When the semaphore\'s
  801. open count goes to 0, NetWare deletes it\.
  802. .sp
  803. FT_NWSEMEX() can be used to examine the value and open count
  804. without affecting them\.
  805. .sp
  806. For an interesting discussion on the operating system aspects
  807. of semaphores, check "Operating Systems Design and Implementation"
  808. by A\. Tanenbaum, page 60\.  For more details on NetWare\'s
  809. semaphore facilities, refer to Charles Rose\'s "Programmer\'s
  810. Guide to NetWare"\.  The "Programmer\'s Guide" will make an
  811. excellent companion guide to the source code for all NetWare
  812. functions in the Nanforum Toolkit\.
  813. .sp
  814. .in 0.08i
  815. \fBExamples
  816. .sp
  817. .in 0.48i
  818. .br
  819. LOCAL nInitVal, nRc, nHandle, nOpenCnt
  820. .sp
  821. .br
  822. nInitVal := 2
  823. .ta 0.72i
  824. .br
  825. nRc    := FT_NWSEMOPEN( "Semaphore Test", nInitVal, ;
  826. .br
  827. .ta
  828. .in 2.56i
  829. .br
  830. @nHandle, @nOpenCnt )
  831. .sp
  832. .in 0.48i
  833. .br
  834. IF nRc != 0
  835. .in 0.64i
  836. .br
  837. QOUT =: "Error: " + STR( nRc ) )
  838. .br
  839. QUIT
  840. .in 0.48i
  841. .br
  842. ENDIF
  843. .sp
  844. .in 0.08i
  845. \fBSource:\fR NWSEM\.PRG
  846. .sp
  847. \fBAuthor:\fR Glenn Scott
  848. .in 0i
  849. .sp
  850. .in 1.5i
  851. .ti -1.5i
  852. .ta 1.5i
  853. .ft B
  854. See Also:    
  855. .ft R
  856. FT_NWSEMEX()
  857. , FT_NWSEMWAIT()
  858. , FT_NWSEMSIG()
  859. , FT_NWSEMCLOSE()
  860. , FT_NWSEMLOCK()
  861. .ta 1.63265i
  862. .in 0i
  863. .sp 2
  864. .ne 20
  865. .ps +3
  866. .vs +3
  867. FT_NWSEMSIG()    Signal a NetWare semaphore (increment)
  868. .br
  869. .ta
  870. .in 0.08i
  871. .ps -3
  872. .vs -3
  873. .sp 2
  874. \fBFT_NWSEMSIG()
  875. Signal a NetWare semaphore (increment)
  876. .in 0i
  877. .br
  878. \l'6.24i'
  879. .br
  880. .sp
  881. .in 0.08i
  882. \fBSyntax
  883. .sp
  884. .in 0.4i
  885. \fBFT_NWSEMSIG( nHandle ) -> nRc
  886. .sp
  887. .in 0.08i
  888. \fBArguments
  889. .sp
  890. .in 0.4i
  891. \fB<nHandle>\fR is the semaphore handle, returned from a previous call
  892. to FT_NWSEMOPEN()\.
  893. .sp
  894. .in 0.08i
  895. \fBReturns
  896. .sp
  897. .in 0.4i
  898. nRc, a numeric, as follows
  899. .sp
  900. .in 0.8i
  901. .br
  902. 0 - success
  903. .br
  904. 1 - semaphore overflow ( value > 127 )
  905. .in 0.64i
  906. .br
  907. 255 - invalid semaphore handle
  908. .sp
  909. .in 0.08i
  910. \fBDescription
  911. .sp
  912. .in 0.48i
  913. Use FT_NWSEMSIG() when your app has finished with the resource
  914. locked by a semaphore\.  This will increase the value (thus
  915. making a slot available to another app)\.
  916. .sp
  917. For more information, see the description under FT_NWSEMOPEN()\.
  918. .sp
  919. .in 0.08i
  920. \fBExamples
  921. .sp
  922. .in 0.48i
  923. QOUT( "Signal returns: " + STR( FT_NWSEMSIG( nHandle ) ) )
  924. .sp
  925. .in 0.08i
  926. \fBSource:\fR NWSEM\.PRG
  927. .sp
  928. \fBAuthor:\fR Glenn Scott
  929. .in 0i
  930. .sp
  931. .in 1.5i
  932. .ti -1.5i
  933. .ta 1.5i
  934. .ft B
  935. See Also:    
  936. .ft R
  937. FT_NWSEMOPEN()
  938. , FT_NWSEMEX()
  939. , FT_NWSEMWAIT()
  940. , FT_NWSEMCLOSE()
  941. , FT_NWSEMLOCK()
  942. .ta 1.63265i
  943. .in 0i
  944. .sp 2
  945. .ne 20
  946. .ps +3
  947. .vs +3
  948. FT_NWSEMWAIT()    Wait on a NetWare semaphore (decrement)
  949. .br
  950. .ta
  951. .in 0.08i
  952. .ps -3
  953. .vs -3
  954. .sp 2
  955. \fBFT_NWSEMWAIT()
  956. Wait on a NetWare semaphore (decrement)
  957. .in 0i
  958. .br
  959. \l'6.24i'
  960. .br
  961. .sp
  962. .in 0.08i
  963. \fBSyntax
  964. .sp
  965. .in 0.4i
  966. \fBFT_NWSEMWAIT( <nHandle> [, nTimeout ] ) -> nRc
  967. .sp
  968. .in 0.08i
  969. \fBArguments
  970. .sp
  971. .in 0.4i
  972. \fB<nHandle>\fR is the semaphore handle, returned from a previous call
  973. to FT_NWSEMOPEN()\.
  974. .sp
  975. \fB<nTimeOut>\fR is an optional parameter telling how long you wish to
  976. wait on this semaphore\.  This is a numeric indicating the number
  977. of clock ticks (approx 1/18 sec ) to wait\.  A zero (the default)
  978. means "don\'t wait\."
  979. .sp
  980. .in 0.08i
  981. \fBReturns
  982. .sp
  983. .in 0.4i
  984. nRc, a numeric, as follows:
  985. .sp
  986. .in 0.88i
  987. .br
  988. 0 - success
  989. .in 0.72i
  990. .br
  991. 254 - timeout failure
  992. .br
  993. 255 - invalid semaphore handle
  994. .sp
  995. .in 0.08i
  996. \fBDescription
  997. .sp
  998. .in 0.4i
  999. See the description for the FT_NWSEMOPEN() function\.
  1000. .sp
  1001. .in 0.08i
  1002. \fBExamples
  1003. .sp
  1004. .in 0.32i
  1005. .br
  1006. FT_NWSEMOPEN( "Semaphore Test", nInitVal, @nHandle, @nOpenCnt )
  1007. .sp
  1008. .br
  1009. nRc := FT_NWSEMWAIT( nHandle )
  1010. .br
  1011. IF nRc == 254
  1012. .in 0.56i
  1013. .br
  1014. QOUT( "All slots for this resource are currently in use" )
  1015. .br
  1016. QUIT
  1017. .in 0.32i
  1018. .br
  1019. ENDIF
  1020. .sp
  1021. .in 0.08i
  1022. \fBSource:\fR NWSEM\.PRG
  1023. .sp
  1024. \fBAuthor:\fR Glenn Scott
  1025. .in 0i
  1026. .sp
  1027. .in 1.5i
  1028. .ti -1.5i
  1029. .ta 1.5i
  1030. .ft B
  1031. See Also:    
  1032. .ft R
  1033. FT_NWSEMOPEN()
  1034. , FT_NWSEMEX()
  1035. , FT_NWSEMSIG()
  1036. , FT_NWSEMCLOSE()
  1037. , FT_NWSEMLOCK()
  1038. .ta 1.63265i
  1039. .in 0i
  1040. .sp 2
  1041. .ne 20
  1042. .ps +3
  1043. .vs +3
  1044. FT_NWUID()    Return the current Novell NetWare User ID
  1045. .br
  1046. .ta
  1047. .in 0.08i
  1048. .ps -3
  1049. .vs -3
  1050. .sp 2
  1051. \fBFT_NWUID()
  1052. Return the current Novell NetWare User ID
  1053. .in 0i
  1054. .br
  1055. \l'6.24i'
  1056. .br
  1057. .sp
  1058. .in 0.08i
  1059. \fBSyntax
  1060. .sp
  1061. .in 0.4i
  1062. \fBFT_NWUID( [ <nConnection> ] ) -> cUid
  1063. .sp
  1064. .in 0.08i
  1065. \fBArguments
  1066. .sp
  1067. .in 0.4i
  1068. \fB<nConnection>\fR is a connection number, or logical station number,
  1069. to find a userid for\.  Under NetWare 286, this number can be from
  1070. 1 to 100\.  Under NetWare 386, 1-250\.  If not supplied, FT_NWUID()
  1071. defaults to the current connection (i\.e\., the connection running
  1072. the application)\.
  1073. .sp
  1074. .in 0.08i
  1075. \fBReturns
  1076. .sp
  1077. .in 0.4i
  1078. A string containing the userid, or "login name\."
  1079. The maximum length of this string, as defined by current
  1080. versions of Novell NetWare, is 48 characters\.
  1081. .sp
  1082. .in 0.08i
  1083. \fBDescription
  1084. .sp
  1085. .in 0.4i
  1086. FT_NWUID() returns the current NetWare userid, or "login
  1087. .ta 0.64i
  1088. name\."    This is useful for implementing security or audit
  1089. .br
  1090. .ta
  1091. trail procedures within your programs\.
  1092. .sp
  1093. There is no simple way a user can "fool" this function into
  1094. retrieving an incorrect value, provided a NetWare shell is loaded\.
  1095. .sp
  1096. This function requires FT_INT86() and FT_NWLSTAT()
  1097. .sp
  1098. This function does NOT test for the existence of the NetWare shell\.
  1099. The behavior is undefined if no shell is loaded\. You\'ll usually get
  1100. garbage\.  This function has not been tested on NetWare 386\.
  1101. .sp
  1102. .in 0.08i
  1103. \fBExamples
  1104. .sp
  1105. .in 0.4i
  1106. .br
  1107. QOut( "I am: " + FT_NWUID() )
  1108. .sp
  1109. .br
  1110. FOR x := 1 TO 100
  1111. .in 0.56i
  1112. .br
  1113. cUid := FT_NWUID( x )
  1114. .br
  1115. IF \.NOT Empty( cUid )
  1116. .in 0.72i
  1117. .br
  1118. QOut( Str( x, 3 ) + Space(3) + cUid )
  1119. .in 0.56i
  1120. .br
  1121. ENDIF
  1122. .in 0.4i
  1123. .br
  1124. NEXT
  1125. .sp
  1126. .in 0.08i
  1127. \fBSource:\fR NWUID\.PRG
  1128. .sp
  1129. \fBAuthor:\fR Glenn Scott
  1130. .in 0i
  1131. .ta 1.63265i
  1132. .sp 2
  1133. .ne 20
  1134. .ps +3
  1135. .vs +3
  1136. FT_PFLUSH()    Flush a NetWare capture buffer
  1137. .br
  1138. .ta
  1139. .in 0.08i
  1140. .ps -3
  1141. .vs -3
  1142. .sp 2
  1143. \fBFT_PFLUSH()
  1144. Flush a NetWare capture buffer
  1145. .in 0i
  1146. .br
  1147. \l'6.24i'
  1148. .br
  1149. .sp
  1150. .in 0.08i
  1151. \fBSyntax
  1152. .sp
  1153. .in 0.4i
  1154. \fBFT_PFLUSH( [ <nLPTPortNumber> ] ) -> NIL
  1155. .sp
  1156. .in 0.08i
  1157. \fBArguments
  1158. .sp
  1159. .in 0.4i
  1160. \fB<nLPTPortNumber>\fR is the captured LPT port number to flush\.  If the
  1161. parameter is omitted, the default port or LPT1: is used\.
  1162. .sp
  1163. .in 0.08i
  1164. \fBReturns
  1165. .sp
  1166. .in 0.4i
  1167. NIL
  1168. .sp
  1169. .in 0.08i
  1170. \fBDescription
  1171. .sp
  1172. .in 0.32i
  1173. This routine is used to force a Novell NetWare capture buffer to print
  1174. it\'s contents\.  This is useful for printing reports with a filter set
  1175. and you don\'t know how long it will be between print statements\.  With
  1176. a FT_PFLUSH() function at the end of any printing, you can have the
  1177. timeout value for any capture set to 0 (zero)\.
  1178. .sp
  1179. This routine was designed and written for Advanced NetWare 286 v 2\.0 or
  1180. NetWare 386 v 3\.0 or better\.  It has been tested on Advanced NetWare 286
  1181. v 2\.15 rev A & C, NetWare 386 v 3\.0\.
  1182. .sp
  1183. This source code was written for Microsoft Macro Assembler v5\.1\.
  1184. .sp
  1185. .in 0.08i
  1186. \fBExamples
  1187. .sp
  1188. .in 0.32i
  1189. .br
  1190. (in DOS)
  1191. .br
  1192. F:>CAPTURE S=ServerName Q=PrintQueueName TI=0 L=1
  1193. .sp
  1194. .br
  1195. (in your Clipper application)
  1196. .br
  1197. SET FILTER TO Left( FONELIST->PHONENUM, 3 ) == "415"
  1198. .br
  1199. GO TOP
  1200. .br
  1201. SET PRINT ON
  1202. .br
  1203. DO WHILE \.NOT\. Eof()
  1204. .in 0.48i
  1205. .br
  1206. ? fonelist->lastname\.\.\.
  1207. .br
  1208. SKIP
  1209. .in 0.32i
  1210. .br
  1211. ENDDO
  1212. .ta 1.36i
  1213. .br
  1214. FT_PFLUSH(1)    && I could just say FT_PFLUSH() here as well\.
  1215. .br
  1216. .ta
  1217. .sp
  1218. .in 0.08i
  1219. \fBSource:\fR FLUSHCAP\.ASM
  1220. .sp
  1221. \fBAuthor:\fR James R\. Zack
  1222. .in 0i
  1223. .ta 1.63265i
  1224. .sp 2
  1225. .ne 20
  1226. .ps +3
  1227. .vs +3
  1228. FT_TTSABORT()    Abort explicit and implicit NetWare TTS transactions
  1229. .br
  1230. .ta
  1231. .in 0.08i
  1232. .ps -3
  1233. .vs -3
  1234. .sp 2
  1235. \fBFT_TTSABORT()
  1236. Abort explicit and implicit NetWare TTS transactions
  1237. .in 0i
  1238. .br
  1239. \l'6.24i'
  1240. .br
  1241. .sp
  1242. .in 0.08i
  1243. \fBSyntax
  1244. .sp
  1245. .in 0.4i
  1246. \fBFT_TTSABORT() -> nResult
  1247. .sp
  1248. .in 0.08i
  1249. \fBArguments
  1250. .sp
  1251. .in 0.4i
  1252. None
  1253. .sp
  1254. .in 0.08i
  1255. \fBReturns
  1256. .sp
  1257. .in 0.56i
  1258. .br
  1259. 0 - Abort Successful (backout completed)
  1260. .in 0.4i
  1261. .br
  1262. 253 - Transaction Tracking disabled (no backout performed)
  1263. .br
  1264. 254 - Transaction ended, records locked (No backout performed)
  1265. .br
  1266. 255 - No explicit transactions active
  1267. .sp
  1268. .in 0.08i
  1269. \fBDescription
  1270. .sp
  1271. .in 0.32i
  1272. Consult your NetWare documentation for details on the NetWare
  1273. Transaction Tracking System\.
  1274. .sp
  1275. .in 0.08i
  1276. \fBExamples
  1277. .sp
  1278. .in 0.32i
  1279. .br
  1280. nResult := FT_TTSABORT()
  1281. .br
  1282. DO CASE
  1283. .in 0.56i
  1284. .br
  1285. CASE nResult == 0
  1286. .in 0.8i
  1287. .br
  1288. ? "TTS aborted"
  1289. .in 0.56i
  1290. .br
  1291. CASE nResult == 253
  1292. .in 0.8i
  1293. .br
  1294. ? "Transction tracking, no backout performed"
  1295. .in 0.56i
  1296. .br
  1297. CASE nResult == 254
  1298. .in 0.8i
  1299. .br
  1300. ? "Transaction ended, records locked, no backout performed"
  1301. .in 0.56i
  1302. .br
  1303. CASE nResult == 255
  1304. .in 0.8i
  1305. .br
  1306. ? "No transactions active"
  1307. .in 0.56i
  1308. .br
  1309. OTHERWISE
  1310. .in 0.8i
  1311. .br
  1312. ? "Unknown result"
  1313. .in 0.32i
  1314. .br
  1315. ENDCASE
  1316. .sp
  1317. .in 0.08i
  1318. \fBSource:\fR NWTTS2\.ASM
  1319. .sp
  1320. \fBAuthor:\fR James R\. Zack
  1321. .in 0i
  1322. .sp
  1323. .in 1.5i
  1324. .ti -1.5i
  1325. .ta 1.5i
  1326. .ft B
  1327. See Also:    
  1328. .ft R
  1329. FT_TTSAVAIL()
  1330. , FT_TTSBEGIN()
  1331. , FT_TTSEND()
  1332. , FT_TTSSTAT()
  1333. .ta 1.63265i
  1334. .in 0i
  1335. .sp 2
  1336. .ne 20
  1337. .ps +3
  1338. .vs +3
  1339. FT_TTSAVAIL()    Check whether default Novell file server supports TTS
  1340. .br
  1341. .ta
  1342. .in 0.08i
  1343. .ps -3
  1344. .vs -3
  1345. .sp 2
  1346. \fBFT_TTSAVAIL()
  1347. Check whether default Novell file server supports TTS
  1348. .in 0i
  1349. .br
  1350. \l'6.24i'
  1351. .br
  1352. .sp
  1353. .in 0.08i
  1354. \fBSyntax
  1355. .sp
  1356. .in 0.4i
  1357. \fBFT_TTSAVAIL() -> nResult
  1358. .sp
  1359. .in 0.08i
  1360. \fBArguments
  1361. .sp
  1362. .in 0.4i
  1363. None
  1364. .sp
  1365. .in 0.08i
  1366. \fBReturns
  1367. .sp
  1368. .in 0.64i
  1369. .br
  1370. 0 - TTS unavailable or not supported\.
  1371. .br
  1372. 1 - TTS is installed and available\.
  1373. .in 0.48i
  1374. .br
  1375. 253 - TTS is disabled\.
  1376. .sp
  1377. .in 0.08i
  1378. \fBDescription
  1379. .sp
  1380. .in 0.32i
  1381. This routine is used to check the default NetWare file server for TTS
  1382. availability\.  You must have Novell NetWare SFT Level II or above to
  1383. use these functions\.  Using these functions on a non SFT II file server
  1384. will return unsuccessful values\.  You must have TTS installed on your
  1385. file server\.
  1386. .sp
  1387. This routine was designed and written for Novell Advanced NetWare 2\.15
  1388. SFT Level II and Novell NetWare 386 v 3\.0 and above\.
  1389. .sp
  1390. This source code was written for Microsoft Macro Assembler v5\.1\.
  1391. .sp
  1392. .in 0.08i
  1393. \fBExamples
  1394. .sp
  1395. .in 0.32i
  1396. .ta 1.92i
  1397. .br
  1398. IF FT_TTSAVAIL() == 1    // If TTS is available
  1399. .br
  1400. .ta
  1401. .in 0.48i
  1402. .ta 1.76i
  1403. .br
  1404. FT_TTSBEGIN()    // Begin transaction
  1405. .br
  1406. .ta
  1407. .in 0.32i
  1408. .br
  1409. ENDIF
  1410. .sp
  1411. .in 0.08i
  1412. \fBSource:\fR NWTTS1\.ASM
  1413. .sp
  1414. \fBAuthor:\fR James R\. Zack
  1415. .in 0i
  1416. .sp
  1417. .in 1.5i
  1418. .ti -1.5i
  1419. .ta 1.5i
  1420. .ft B
  1421. See Also:    
  1422. .ft R
  1423. FT_TTSABORT()
  1424. , FT_TTSBEGIN()
  1425. , FT_TTSEND()
  1426. , FT_TTSSTAT()
  1427. .ta 1.63265i
  1428. .in 0i
  1429. .sp 2
  1430. .ne 20
  1431. .ps +3
  1432. .vs +3
  1433. FT_TTSBEGIN()    Begin explicit transaction under NetWare\'s TTS
  1434. .br
  1435. .ta
  1436. .in 0.08i
  1437. .ps -3
  1438. .vs -3
  1439. .sp 2
  1440. \fBFT_TTSBEGIN()
  1441. Begin explicit transaction under NetWare\'s TTS
  1442. .in 0i
  1443. .br
  1444. \l'6.24i'
  1445. .br
  1446. .sp
  1447. .in 0.08i
  1448. \fBSyntax
  1449. .sp
  1450. .in 0.4i
  1451. \fBFT_TTSBEGIN() -> nResult
  1452. .sp
  1453. .in 0.08i
  1454. \fBArguments
  1455. .sp
  1456. .in 0.4i
  1457. None
  1458. .sp
  1459. .in 0.08i
  1460. \fBReturns
  1461. .sp
  1462. .in 0.56i
  1463. 0 - Success (transaction begun)
  1464. .in 0.4i
  1465. .br
  1466. 150 - Out of dynamic workspace (not begun)
  1467. .br
  1468. 254 - Implicit Transaction already active
  1469. .in 1.12i
  1470. (active implicit transaction now converted to
  1471. explicit transaction)
  1472. .in 0.4i
  1473. 255 - Explicit transaction already active
  1474. .in 1.12i
  1475. (existing explicit transaction continues normally)
  1476. .sp
  1477. .in 0.08i
  1478. \fBDescription
  1479. .sp
  1480. .in 0.32i
  1481. See your NetWare documentation for further information about the
  1482. Transaction Tracking System (TTS)\.
  1483. .sp
  1484. .in 0.08i
  1485. \fBExamples
  1486. .sp
  1487. .in 0.32i
  1488. .br
  1489. nResult := FT_TTSBEGIN()
  1490. .br
  1491. DO CASE
  1492. .in 0.56i
  1493. .br
  1494. CASE nResult == 0
  1495. .in 0.8i
  1496. .br
  1497. ? "Transaction begun"
  1498. .in 0.56i
  1499. .br
  1500. CASE nResult == 150
  1501. .in 0.8i
  1502. .br
  1503. ? "Out of dynamic workspace, transaction not begun"
  1504. .in 0.56i
  1505. .br
  1506. CASE nResult == 254
  1507. .in 0.8i
  1508. .br
  1509. ? "Implicit transaction already active"
  1510. .in 0.56i
  1511. .br
  1512. CASE nResult == 255
  1513. .in 0.8i
  1514. .br
  1515. ? "Explicit transaction already active"
  1516. .in 0.56i
  1517. .br
  1518. OTHERWISE
  1519. .in 0.8i
  1520. .br
  1521. ? "Unknown result"
  1522. .in 0.32i
  1523. .br
  1524. ENDCASE
  1525. .sp
  1526. .in 0.08i
  1527. \fBSource:\fR NWTTS3\.ASM
  1528. .sp
  1529. \fBAuthor:\fR James R\. Zack
  1530. .in 0i
  1531. .sp
  1532. .in 1.5i
  1533. .ti -1.5i
  1534. .ta 1.5i
  1535. .ft B
  1536. See Also:    
  1537. .ft R
  1538. FT_TTSABORT()
  1539. , FT_TTSAVAIL()
  1540. , FT_TTSEND()
  1541. , FT_TTSSTAT()
  1542. .ta 1.63265i
  1543. .in 0i
  1544. .sp 2
  1545. .ne 20
  1546. .ps +3
  1547. .vs +3
  1548. FT_TTSEND()    End explicit or implicit transaction under NetWare\'s TTS
  1549. .br
  1550. .ta
  1551. .in 0.08i
  1552. .ps -3
  1553. .vs -3
  1554. .sp 2
  1555. \fBFT_TTSEND()
  1556. End explicit or implicit transaction under NetWare\'s TTS
  1557. .in 0i
  1558. .br
  1559. \l'6.24i'
  1560. .br
  1561. .sp
  1562. .in 0.08i
  1563. \fBSyntax
  1564. .sp
  1565. .in 0.4i
  1566. \fBFT_TTSEND() -> nResult
  1567. .sp
  1568. .in 0.08i
  1569. \fBArguments
  1570. .sp
  1571. .in 0.4i
  1572. None
  1573. .sp
  1574. .in 0.08i
  1575. \fBReturns
  1576. .sp
  1577. .in 0.72i
  1578. .br
  1579. 0 - Transaction tracking finished (Success)
  1580. .in 0.56i
  1581. .br
  1582. 253 - Transaction tracking disabled
  1583. .br
  1584. 254 - Transaction ended, records locked
  1585. .br
  1586. 255 - No explicit transactions active
  1587. .in 0.4i
  1588. .br
  1589. > 255 - Transaction number
  1590. .sp
  1591. .in 0.08i
  1592. \fBDescription
  1593. .sp
  1594. .in 0.32i
  1595. For further information on NetWare\'s Transaction Tracking System (TTS),
  1596. consult your NetWare manuals\.
  1597. .sp
  1598. .in 0.08i
  1599. \fBExamples
  1600. .sp
  1601. .in 0.32i
  1602. .br
  1603. nResult := FT_TTSEND()
  1604. .br
  1605. DO CASE
  1606. .in 0.56i
  1607. .br
  1608. CASE nResult == 0
  1609. .in 0.8i
  1610. .br
  1611. ? "Transaction ended"
  1612. .in 0.56i
  1613. .br
  1614. CASE nResult == 253
  1615. .in 0.8i
  1616. .br
  1617. ? "Transaction tracking disabled"
  1618. .in 0.56i
  1619. .br
  1620. CASE nResult == 254
  1621. .in 0.8i
  1622. .br
  1623. ? "Transaction ended, records locked"
  1624. .in 0.56i
  1625. .br
  1626. CASE nResult == 255
  1627. .in 0.8i
  1628. .br
  1629. ? "No explicit transactions active"
  1630. .in 0.56i
  1631. .br
  1632. OTHERWISE
  1633. .in 0.8i
  1634. .br
  1635. ? "Transaction number " + Ltrim(Str(nResult))
  1636. .in 0.32i
  1637. .br
  1638. ENDCASE
  1639. .sp
  1640. .in 0.08i
  1641. \fBSource:\fR NWTTS4\.ASM
  1642. .sp
  1643. \fBAuthor:\fR James R\. Zack
  1644. .in 0i
  1645. .sp
  1646. .in 1.5i
  1647. .ti -1.5i
  1648. .ta 1.5i
  1649. .ft B
  1650. See Also:    
  1651. .ft R
  1652. FT_TTSABORT()
  1653. , FT_TTSAVAIL()
  1654. , FT_TTSBEGIN()
  1655. , FT_TTSSTAT()
  1656. .ta 1.63265i
  1657. .in 0i
  1658. .sp 2
  1659. .ne 20
  1660. .ps +3
  1661. .vs +3
  1662. FT_TTSSTAT()    Verify if TTS transaction has been written to disk
  1663. .br
  1664. .ta
  1665. .in 0.08i
  1666. .ps -3
  1667. .vs -3
  1668. .sp 2
  1669. \fBFT_TTSSTAT()
  1670. Verify if TTS transaction has been written to disk
  1671. .in 0i
  1672. .br
  1673. \l'6.24i'
  1674. .br
  1675. .sp
  1676. .in 0.08i
  1677. \fBSyntax
  1678. .sp
  1679. .in 0.32i
  1680. \fBFT_TTSSTAT( <nTransNumber> ) -> nResult
  1681. .sp
  1682. .in 0.08i
  1683. \fBArguments
  1684. .sp
  1685. .in 0.32i
  1686. \fB<nTransNumber>\fR is the transaction number, returned from FT_TTSEND()\.
  1687. .sp
  1688. .in 0.08i
  1689. \fBReturns
  1690. .sp
  1691. .in 0.48i
  1692. 0 - Success, transaction written to disk
  1693. .in 0.32i
  1694. 255 - Transaction not yet written to disk
  1695. .sp
  1696. .in 0.08i
  1697. \fBDescription
  1698. .sp
  1699. .in 0.32i
  1700. For further information on NetWare\'s Transaction Tracking System (TTS),
  1701. consult Novell\'s documentation\.
  1702. .sp
  1703. .in 0.08i
  1704. \fBExamples
  1705. .sp
  1706. .in 0.32i
  1707. .br
  1708. nResult := FT_TTSSTAT()
  1709. .br
  1710. DO CASE
  1711. .in 0.56i
  1712. .br
  1713. CASE nResult == 0
  1714. .in 0.8i
  1715. .br
  1716. ? "Transaction wrttten to disk"
  1717. .in 0.56i
  1718. .br
  1719. CASE nResult == 255
  1720. .in 0.8i
  1721. .br
  1722. ? "Transaction not yet written to disk"
  1723. .in 0.56i
  1724. .br
  1725. OTHERWISE
  1726. .in 0.8i
  1727. .br
  1728. ? "Unknown result code"
  1729. .in 0.32i
  1730. .br
  1731. ENDCASE
  1732. .sp
  1733. .in 0.08i
  1734. \fBSource:\fR NWTTS5\.ASM
  1735. .sp
  1736. \fBAuthor:\fR James R\. Zack
  1737. .in 0i
  1738. .sp
  1739. .in 1.5i
  1740. .ti -1.5i
  1741. .ta 1.5i
  1742. .ft B
  1743. See Also:    
  1744. .ft R
  1745. FT_TTSABORT()
  1746. , FT_TTSAVAIL()
  1747. , FT_TTSBEGIN()
  1748. , FT_TTSEND()
  1749.