Progress OpenEdge simple utility with input parameter

Discussão em 'StackOverflow' iniciado por fdantas, Junho 28, 2016.

  1. fdantas

    fdantas Administrator Moderador

    I have a .p file and I run it in unix console. and i love it . because it just a simple utility to run. It is simple and helps me learn.

    Now I started to get more fancy. I am wondering if I can do an input parameter to a .p file?

    this is how I usually run my .p file. [​IMG]

    Now if test.p needs 2 parameter .. how do I do it in the .p? and how do I run it in the console?

    This is what I have in the test.p and dOrd and dLocation is the input parameter I want.

    output to /usr2/appsrv/test/test.txt.
    def var dOrd like Ord.Ord.
    def var dLocation like Ord.Ord.
    find OrdCSRef no-lock where OrdCSRef.Ord = dOrd and OrdCSRef.Loc = dLocation no-error.
    if available OrdCSRef then do:
    put unformatted OrdCSRef.CSOrdRef skip.
    end.
    else
    put unformatted "Create CSOrdRef" skip.
    end.
    output close.


    I have tried the following syntax in the unix console. but obviously it will not work.

    [​IMG]

    Continue reading...

Compartilhe esta Página