Is it possible to declare a GDA for an external subroutine?
Answer Posted / jamil ahmad
YES. A GDA can be used in an external subroutine. Thats
where a GDA comes in real handy. I personally rather use a
subprogram but developers use subroutine and like it. You
dont have to pass any parameter but you must use the GDA.
Upon returning from the subroutine you can interrogate the
glbal fields for your edits. Here is an example of an
external subroutine (chopped off to fit here): (I didnt
write this but use it all the time, works perfect)
DEFINE DATA
GLOBAL USING DSLGLOB
LOCAL
1 #NAME (A15) INIT <' '>
1 REDEFINE #NAME
2 #ARRAY (A1/15)
1 #X (N2)
1 #LENGTH (N2)
1 #BLANK (A1) INIT <'N'>
END-DEFINE
***********************************************
DEFINE SUBROUTINE NAME-EDIT
***********************************************
ETC ETC
END-SUBROUTINE
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
Explain is it possible to code goto statement in natural? If yes please provide the syntax of the same?
Explain why do we use file-aid for seqential files?
What is the quality process in development?
How to receive data passed through jcl parm parameter in a natural program?
What happens when you issue a escape routine in a program? Will there be any compilation /run time erro?
Explain how many work file we can code in jcl?
Explain how to move cursor to a particular field when position is not known?
In a Natural program i used the below code for report FORMAT LS=132 PS=60 And down the line I want to change either LS/PS like FORMAT LS=120 PS=50, is it possible? How it will work?
Explain difference between read(1) and read work file once?
Explain control variable in online screens?
What is cobol coding sheet?
How are you going to remove duplicates from the file that is being read?
Explain the like inverted list?
How to receive data passed through jcl parm parameter in a natural program? How data definition is defined in the program?
The natural file converted to PDF file if Yes then explain ?