• 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

  • IBM Tweaks Some Power Systems Prices Down, Others Up
  • Disaster Recovery: From OS/400 V5R3 To IBM i 7.4 In 36 Hours
  • The Disconnect In Modernization Planning And Execution
  • Superior Support: One Of The Reasons You Pay The Power Systems Premium
  • IBM i PTF Guide, Volume 25, Number 13
  • IBM i Has a Future ‘If Kept Up To Date,’ IDC Says
  • When You Need Us, We Are Ready To Do Grunt Work
  • Generative AI: Coming to an ERP Near You
  • Four Hundred Monitor, March 22
  • IBM i PTF Guide, Volume 25, Number 12

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 © 2023 IT Jungle