finding parameters in as/400 program objects

130 pts.
Tags:
AS/400 development
how do you find the parameters passed to a program if we dont have source and we have only object and cannot debug it

Software/Hardware used:
as/400 - OS/400

Answer Wiki

Thanks. We'll let you know when a new response is added.

Hi TNKR,

ts possible, u can get the details aboutthe Parameters using the folllowing command.

DSPPGMREF PGM(LIB/OBJ)

Thanks

Discuss This Question: 7  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • ten2008
    i think this is wrong answer. We can only receive info about the program and file objects referred in that program with the command "dsppgmref" and not he parameters. If any can anybody give me the correct answer plz?
    1,150 pointsBadges:
    report
  • bvining
    Please define what you mean by "find the parameters" and your intended use of the information. it would also be beneficial to know if the *PGM is OPM or ILE.
    6,485 pointsBadges:
    report
  • TNKR
    This command does not give the parameters details of the program
    130 pointsBadges:
    report
  • TNKR
    Hi Bvining Here "find the parameters" are nothing but passing parameters to the object. In the case both OPM and ILE TNKR
    130 pointsBadges:
    report
  • DanTheDane
    Have you considered the potential option to set the pgm into debug-mode? - You might be lucky ... DanF
    2,555 pointsBadges:
    report
  • bvining
    ONE possible definition for "find the parameters" is that you want to know the parameter values being passed. IF that's your desire: 1. Pick an OPM program (we'll assume it's name is THEPGM) 2. Run DSPPGM THEPGM and page to the third panel 3. Record the Number of parameters (X) 4. Write a program (MYPGM) accepting X parameters. Define each parameter as character for whatever length you feel is greater than the actual length being passed. Optionally MYPGM, as part of its running, calls THEPGM (see step 5, the call is to THEPGM2) passing all of the defined parameters (so that whatever function THEPGM does, gets done) 5. Rename THEPGM to THEPGM2 6. Compile MYPGM as THEPGM 7. STRDBG on THEPGM setting a breakpoint on the first executable 8. Run your job 9. At the breakpoint in THEPGM debug the parameter variables to see what they are 10. Resume running of THEPGM (which will then call THEPGM2, which will do its thing, return to THEPGM, which returns to the caller of THEPGM). 11. You now know the parameters and their values If you are looking for something "else", please define what it is. Bruce Vining
    6,485 pointsBadges:
    report
  • TNKR
    Hi Bvining Here my desire is not to see the values present in the parameters instead I need to check what are the parameters to be passed, I mean the SIZE and DATATYPE of all the parameters which are required to run the object. TNKR
    130 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following