how can a procedure will be added in to a srvpgm
Answers were Sorted based on User's Feedback
Answer / kapil kumar
UPDSRVPGM add the procedure/module then use the binder
language command as below
STRPGMEXP PGMLVL(*CURRENT)
EXPORT SYMBOL(NewProc)
EXPORT SYMBOL(pgm1)
EXPORT SYMBOL(pgm2)
STRPGMEXP PGMLVL(*PRV)
EXPORT SYMBOL(pgm1)
EXPORT SYMBOL(pgm2)
ENDPGMEXP
| Is This Answer Correct ? | 10 Yes | 3 No |
Answer / syam
If a module contained in a service program changes, the old
module can be replaced with the new module using the
UPDSRVPGM command.
| Is This Answer Correct ? | 5 Yes | 0 No |
Answer / nitin
I think most appropriate answer is to add new procedure or module to binder language, make sure that the new one should be added at the end.
Suppose we are adding two procedures GetDuration and LastDayOfMonth, the updated binder should be like this
STRPGMEXP PGMLVL(*CURRENT)
EXPORT SYMBOL(DayName)
EXPORT SYMBOL(DayOfWeek)
EXPORT SYMBOL(GetDuration)
EXPORT SYMBOL(LastDayOfMonth)
ENDPGMEXP
STRPGMEXP PGMLVL(*PRV)
EXPORT SYMBOL(DayName)
EXPORT SYMBOL(DayOfWeek)
ENDPGMEXP
then Update service program with export (*SRCFILE). This will added new procedure in service program without disturbing old definition and no need to recompile programs those are using service program with old or previous signature.
| Is This Answer Correct ? | 0 Yes | 0 No |
i have one physical file which is having two logical files. logical a have unique keyword and logical b doesnt have a unique keyword. can i give duplicate values while updating through physical file. if no why?
Q.How primary file can be defined in RPG/400?Please write the senario with opcode specification?
I have a display file with mandatory fields. Is there anyway that i can highlight those fields to bring attention to the user? The same behavior that AS400 makes when we attempt to execute a command without completing all the required parameters. Note: I have used DSPATR(HI) or DPSATR(RI) and they have different behaviors. Thanks.
How to create files dynamically without DDS?
How can the user implicitly open and close the files in RPG program ?
How to see all record formats used in a file?
what is procedure prototype and procedure interface.
1.what operation cannot be used in conjunction with file coded as divice type disk? 2.Difference between INCLUDE AND COPY?
what are the necessary keywords for the join logical file?
1. There is a file called Month. Month has 12 members called Jan, Feb, ..., Dec. How to design a rpg code which can access any member and show its content. (User can ask for any member when required)?
what are the uses of factor1, factor2 and result field for the rpg operation code parm?
How can we read file using curser? how to define a curser?