Help with grep

 6 Replies
 0 Subscribed to this topic
 27 Subscribed to this forum
Sort:
Author
Messages
mikeP
Veteran Member
Posts: 151
Veteran Member
    Lawson 9 on Windows 2008 Server.

    I have a Lid session open and would like to use grep.  There's no docs for syntax in anything I could find at Inforxtreme, but I was hoping for it to throw me a bone and display a bit more that the one line "Usage" sytax that's displayed when invoked it with no arguments.

    I tried "help grep" which did't work, but Lid graciously suggested I try "grep /?".  This puts it in mode where keeps accepting keyboard input, including CR/LF.

    It wants something to terminate that mode,  but apparently I don't have anything it likes, because nothing I tried works.  I found Unix manuals that say Ctrl-Z should work, but not for me.

    Can someone point me to a syntax reference for Lawson grep?

    Thanks
    EricS
    Veteran Member
    Posts: 80
    Veteran Member
      Ctrl-d should end the input. Just Google grep you'll find the man pages out there. This is, though I could be wrong, a cut down version of Unix. Last I tried it grep did not work anything like what it did on AIX or HP/UX.
      The.Sam.Groves
      Veteran Member
      Posts: 89
      Veteran Member
        My understanding is that on Windows servers, the unix utils being used by Lawson are essentially stock cygwin. So if you are looking for documentation that should help.

        Cntl-D is the EOF signal in Unix environments and Cygwin consoles. In Windows/DOS it's Cntl-Z followed by an enter, Cntl-Z on it's own doesn't cut it.
        mikeP
        Veteran Member
        Posts: 151
        Veteran Member
          Thanks guys. Neither Ctrl-D not Ctrl-Z [Enter] seems to work. Maybe I could approach this another way. What I'd like to do is find the source for copybooks and libraries in order to trace out some program logic. I'm looking at the cobol source PR278PD. I makes several procedure calls that I can't find under the prod or pdlib folders, and I was trying to use grep to find them. One example is

          PERFORM 840-FIND-PRSSET1

          I've already tried creating the program shell with bldsh, but it barfs with errors like this:
          open(D:\lawdev\law/dev/prsrc/PR278.lkf) failed - Permission denied

          We're hosted by Lawson Manged Services, and they keep us pretty well locked out of anything fragile.

          Any ideas as to where this type of source might be located?

          Greg Moeller
          Veteran Member
          Posts: 1498
          Veteran Member
            Here's the output that I get when running bldsh on PR278 - Hopefully this will help.

            bldsh lprod pr pr278
            rptgen -t LPROD PR PR278
            Processing /lawson/apps/lprod/prsrc/PR278.rpt
            Created RptMap: PR278 and Archive RptMap: PR278.1379903169.rmp
            Created rd File: /lawson/apps/lprod/prsrc/PR278.rd
            Building COBOL Shell

            Processing PgmInfo Request ...
            bismark LPROD PR PR278
            Syntax Check /lawson/apps/lprod/prsrc/PR278WS
            Syntax Check /lawson/apps/lprod/prsrc/PR278PD
            Syntax Check /lawson/apps/lprod/hrsrc/hrpdlib/HRFN70CP
            Syntax Check /lawson/apps/lprod/hrsrc/hrwslib/HRCOMWS
            Syntax Check /lawson/apps/lprod/hrsrc/hrwslib/HRDICTWS
            Syntax Check /lawson/apps/lprod/hrsrc/hrwslib/HREMPWS
            Syntax Check /lawson/apps/lprod/pasrc/pawslib/PAPOSEMPWS
            Building Int From PR278PD, PR278WS, PR278SD, PR278.rd, wslibs & workfiles
            Building /lawson/apps/lprod/sdlib/PR278SD
            Build Of Int Complete For PR278
            bismark -PHRFN70CP lprod
            Syntax Check /lawson/apps/lprod/hrsrc/hrpdlib/HRFN70CP
            Syntax Check /lawson/apps/lprod/hrsrc/hrwslib/HRCOMWS
            Syntax Check /lawson/apps/lprod/hrsrc/hrwslib/HRDICTWS
            Syntax Check /lawson/apps/lprod/hrsrc/hrwslib/HREMPWS
            Syntax Check /lawson/apps/lprod/pasrc/pawslib/PAPOSEMPWS
            Syntax Check /lawson/apps/lprod/hrsrc/hrpdlib/HRFN70CP
            Building Int From HRFN70CP, wslibs & workfiles
            Build Of Int Complete For HRFN70CP
            Editing PGM: PR278
            Editing PD: HRFN70CP
            Building /lawson/apps/lprod/prsrc/PR278.cbl
            Building /lawson/apps/lprod/prsrc/PR278.etb
            mikeP
            Veteran Member
            Posts: 151
            Veteran Member
              Thanks Greg.

              Managed serivces made a security change, and I was able to build the shell, and got similar output. I searched the files that were "syntax checked" and none include the source for some of the routines that were included in the built .cbl file, so that's still a mystery, but the main thing is that I can examine the full source. Now the fun begins.

              Stuart Perkins
              Basic Member
              Posts: 18
              Basic Member
                The 800 series routines are database io routines. 800-create-tablename, 810-recreate-tablename 820-store-tablename 830-delete-tablename 840-find-indexname 850-find-nlt-indexname 860-find-next-indexname etc...

                The "source code" for these is not stored anywhere that I know of, and is generated on the fly.  These routines are built into the build shell routine (bismark), and into the runtime monitor (lapm).