ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

runqry *n

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • runqry *n

    hi all,

    i know its the dumbest of all questions... but i agree i dont know this:

    what does '*n' stand for in 'runqry *n lib/file'?

    Regards,
    Ruma

  • #2
    Re: runqry *n

    Hi

    It should be
    RUNQRY QRY(*NONE) QRYFILE((SOMELIB/SOMEFILE))
    In this way you get list of records in a desired file.
    This is very usefull, yust to overwiev data.

    LP Zdenko
    LP Zdenko

    Comment


    • #3
      Re: runqry *n

      thanks Zdenko

      i know the purpose of runqry command. just that, i was wondering why is it necessary to have *n when we issue the command from command line, while if you take the prompt F4, it is'nt mandatory to wirte *none for Query option.
      Regards,
      Ruma

      Comment


      • #4
        Re: runqry *n

        Thats a great question....I have no idea..But it works just the same *N = *NONE

        Code:
         *NONE                                                   
             No existing query definition is used.  Instead, a   
             default query (or quick query) is used to get       
             information from the file specified on the QRYFILE  
             parameter.
        All my answers were extracted from the "Big Dummy's Guide to the As400"
        and I take no responsibility for any of them.

        www.code400.com

        Comment


        • #5
          Re: runqry *n

          Originally posted by ruma
          thanks Zdenko

          i know the purpose of runqry command. just that, i was wondering why is it necessary to have *n when we issue the command from command line, while if you take the prompt F4, it is'nt mandatory to wirte *none for Query option.
          It has to do with how the OS reads and parses the command line. If you use the convention of qualifying your parameters, like this:

          RUNQRY QRYFILE(mylib/myfile)

          then the OS knows to use the value "mylib/myfile" for the parm QRYFILE. However, you can also use a technique called positional parameters. This is when you type the parms on the command line in the same order as they appear on the prompt (F4) screen. If you used positional parameters and typed this:

          RUNQRY mylib/myfile

          then the OS would think you wanted to use "mylib/myfile as the value for the first parm in the command, which is the query name (QRY). In order to default the first parm of this command to *NONE, you are required (when using positional parameters) to type *N as a place holder on the command line.

          Michael
          "Time passes, but sometimes it beats the <crap> out of you as it goes."

          Comment


          • #6
            Re: runqry *n

            thanks Michael!
            Regards,
            Ruma

            Comment


            • #7
              Re: runqry *n

              Originally posted by ruma
              thanks Michael!
              You're welcome.
              "Time passes, but sometimes it beats the <crap> out of you as it goes."

              Comment

              Working...
              X