How to give value for a variable while debugging RPG/400 program

Tags:
AS/400
RPG
Hi, I need to insert values to DB file. For that, I have created 2 rpg/400 programs(rpg(A),rpg(B)) and I'm receiving values from user through screen- this concept is there in RPG(A) program and by calling RPG(B) from RPG(A). I'm doing insert operation in that DB file - this concept is there in RPG(B) program. Now DB file is not getting populated so I have to find out the solution by debugging the RPG(B) program.(bcoz insert part is there in RPG(B) ) but if I try to debug RPG(B) I got a message '' ERROR RPG0221 CAUSED PROGRAM RPG(B) TO STOP'', since no values received for that input fields.because the screen is connected with rpg(A). So I tried to give values for that variable manually in eval operation. That time it shows message like"identifer does not exist"means, this input field could not be recognized by RPG(B) program..so please tell me what should I do now?
0

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question: 6  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.
  • philpl1jb
    It sounds to me like you're not passing the required parameters when you call program B.
    54,090 pointsBadges:
    report
  • pdraebel
    The field should also be used in Pgm B in order to use it there.

    7,545 pointsBadges:
    report
  • pdraebel
    Does your debug session allow update of Production Files ?
    7,545 pointsBadges:
    report
  • ToddN2000
    When calling your program to debug, are you passing the correct number of parameters and in the correct format?

    example passing 1 text and 1 packed field

    call pgmb ('textparm'  x'00001F')

    and make sure you allow update like pdraebel mentioned.
    133,790 pointsBadges:
    report
  • philpl1jb
    RPG0221 99 &1 &2 referenced to a parameter not passed
    54,090 pointsBadges:
    report
  • TheRealRaven
    When debugging PGMB, you might still CALL PGMA and let it call PGMB as it normally would. Otherwise you need to call PGMB from a command line and pass properly formatted parms. We can't tell you how to do that until you show us the correct prototype for PGMB.

    Also, you can't use the debug EVAL statement for a variable until that variable is "in scope". And we can't guess when that will be until we see the source for PGMB.
    35,660 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.

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

Following

Share this item with your network: