× 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.


  • Subject: Re: Cursor location.
  • From: "James W. Kilgore" <qappdsn@xxxxxxxxxxxxx>
  • Date: Thu, 28 Sep 2000 00:51:26 -0700
  • Organization: Progressive Data Systems, Inc.

Arnaldo,

While the Earth's crust was still cooling and the S/36 was being replaced by 
the AS/400
IBM published a Redbook on how to handle such things.  The answer was to create 
this
program that you would call from your RPG36 program:

*************** Beginning of data ************************************
     H
     F*  SUBRCP  CONVERT BINARY CURSOR LOCATION TO DECIMAL
     F*
     F*  COPIED FROM IBM 'RED BOOK' SYS/36 MIGRATION
     F*
     ICSR##       DS
     I                                    B   1   20CSRBIN
     IROWA        DS
     I                                        1   20ROW
     ICOLA        DS
     I                                        1   30COL
     I* DEFINE PROGRAM ATTRIBUTES
     IATTR        DS                          3
     I                                        1   1 TYPE
     I                                        2   50LEN
     I                                        6   70DEC
     I                                        8  110ARRLEN
     C* ENTRY PARAMETER LIST, RECEIVE CURSOR AND RETURN ROW/COLUMN
     C           *ENTRY    PLIST
     C                     PARM           CSR##   2        BINARY INPUT
     C                     PARM           ROWA    2        ROW OUTPUT
     C                     PARM           COLA    3        COLUMN OUTPU*
     C                     PARM           ATTR
     C* CALCULATE ROW/COL
     C           CSRBIN    DIV  256       ROW
     C           ROW       MULT 256       WRK050  50
     C           CSRBIN    SUB  WRK050    COL
     C                     RETRN
****************** End of data ****************************************

Your RPG36 program might have something like this:

1....+....2....+....3....+....4....+....5....+....6....+....7....+
  FWORKSTN CP  F     512            WORKSTN
  F                                              KINFDS $INFDS

  I* --------------------------------------------------------
  I$INFDS      DS
  I                                      370 371 WSCSR$

  C*
  C                     EXIT SUBRCP
  C                     RLABL          WSCSR$
  C                     RLABL          WSROW   20
  C                     RLABL          WSCOL   30

HTH




Arnaldo Gaudenzi wrote:

> Hi!
>
> For a customer having still Advanced36 and RPGII I need to write some 
>programs for
> which a cursor location would be nice. I remember there was something in the 
>old
> Text Manager coming from S34, and suppose the an assembler routine should be 
>called.
>

+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

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.