• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Determining Whether a User Is Already Signed On, Take Three

    June 28, 2002 Timothy Prickett Morgan

    Hey, Ted:

    When it comes to determining whether a user was signed on to more than one session, I’d do it a little differently .

    I’d try to allocate the user’s message queue.

    That would eliminate a data area in the mix.

    — Tim

    Several people wrote in with the same suggestion, Tim.

    Most objected to creating the data area, saying it was unnecessary.

    Here is the code to do it your way:

    DCL        VAR(&FIRSTSESSN) TYPE(*LGL) VALUE('1')         
    DCL        VAR(&MSGQ) TYPE(*CHAR) LEN(10)                 
    DCL        VAR(&MSGQLIB) TYPE(*CHAR) LEN(10)              
                                                               
    RTVUSRPRF  USRPRF(*CURRENT) MSGQ(&MSGQ) MSGQLIB(&MSGQLIB) 
    ALCOBJ     OBJ((&MSGQLIB/&MSGQ *MSGQ *EXCL)) WAIT(0)      
    MONMSG     MSGID(CPF1002 CPF1085) EXEC(DO)                
       CHGVAR     VAR(&FIRSTSESSN) 
    …

    Read more
  • Easy Subfile Windowing

    June 28, 2002 Timothy Prickett Morgan

    Hey, Ted:

    I have a subfile application that requires more than 80 columns to display all the necessary information.

    I don’t want the information folded to a second line but would like to window left and right, as the Display Physical File Member (DSPPFM) command does.

    It would be better if I could lock into place the far-left side of a screen to allow a selection field, even when panning left or right.

    Can this be done easily with a subfile?

    — David

    Yes, David. You only need to think of building subfiles in a way that you’re probably not

    …

    Read more
  • Distinct File and Record Names with SQL

    June 28, 2002 Timothy Prickett Morgan

    Hey, Ted:

    When I create a physical file using the SQL CREATE TABLE command, the system gives the same name to the file and record format.

    This means that I have to remember to rename the record format in every RPG program I write that defines the file in an F spec. Is there a way to make SQL give the record format some other name?

    — Dan

    I know of one way.

    Let’s say you want to create a file called MYFILE in library MYLIB and name the record format MYREC.

    Run the following SQL commands in an interactive

    …

    Read more

Content archive

  • The Four Hundred
  • Four Hundred Stuff
  • Four Hundred Guru

Recent Posts

  • POWERUp 2025 –Your Source For IBM i 7.6 Information
  • Maxava Consulting Services Does More Than HA/DR Project Management – A Lot More
  • Guru: Creating An SQL Stored Procedure That Returns A Result Set
  • As I See It: At Any Cost
  • IBM i PTF Guide, Volume 27, Number 19
  • IBM Unveils Manzan, A New Open Source Event Monitor For IBM i
  • Say Goodbye To Downtime: Update Your Database Without Taking Your Business Offline
  • i-Rays Brings Observability To IBM i Performance Problems
  • Another Non-TR “Technology Refresh” Happens With IBM i TR6
  • IBM i PTF Guide, Volume 27, Number 18

Subscribe

To get news from IT Jungle sent to your inbox every week, subscribe to our newsletter.

Pages

  • About Us
  • Contact
  • Contributors
  • Four Hundred Monitor
  • IBM i PTF Guide
  • Media Kit
  • Subscribe

Search

Copyright © 2025 IT Jungle