What is the Linkage section? What is the Use and Why the
parm length use alway "PARM-LENGTH PIC S9(4) or PIC S9
(4) COMP." any reason?.Please let me know any one...
Cheers,Prasad
Answers were Sorted based on User's Feedback
Answer / srinivas.d
because in first two bytes it stores length.If u don't give
s9(4),then there are chances of two bytes data truncation.
Linkage section is used in main program when parm fiels is
used in jcl or in sub program when main program calls sub
program.
| Is This Answer Correct ? | 20 Yes | 4 No |
Answer / rahul dev
Q) May be the question is why code lenght in COMP only not
in COMP-3 or DISPLAY type!! If somebody know plz asnwer
A) The length of linkage is stored as Binary, hence COMP.
We cannot use COMP-3 because COMP-3 stores in Packed
decimal & not in Binary.
| Is This Answer Correct ? | 8 Yes | 3 No |
Answer / i go crazy
S9(4) COMP uses 2 bytes. where as S9(4) COMP-3 uses 3 bytes. As COMP needs less storage at word boundaries, we use COMP.
| Is This Answer Correct ? | 2 Yes | 2 No |
Answer / siri
LINKAGE SECTION:- IT IS SECTION OF THE DATA DIVISION..IT IS USED TO LINK BETWEEN THE TWO SUB PROGRAMS...PASS THE VALUE FROM JCL BY PARM PARAMETER...
DECLARE THE PARM PARAMETER IN COBOL PROGRRAM
LINKAGE SECTION.
01 PARM-FIELD.
05 PARM-LENGTH PIC S9(4) COMP.
05 PARM-VALUE PIC X(6)
PROCEDURE DIVISION USING PARM-FIELD.
THE PROGRAM CAN RECEIVE THEM USING LINKAGE SECTION.THE LINKAGE SECTION MUST BE CODED WITH HALF WORD BINARY FIELD AS FIRST FIELD.THIS IS POPULATED IS POPULATED WITH LENGTH OF THE PARM PASSED FROM THE JCL.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / viks
May be the question is why code lenght in COMP only not in
COMP-3 or DISPLAY type!! If somebody know plz asnwer
| Is This Answer Correct ? | 0 Yes | 3 No |
Answer / ramesh
could any one give better explaination.
for ex: parm='12345' in jcl
how to declare linkage section variable.
in linkage section.
01 parm
05 ls-var pic 9(05).
(or)
01 parm
05 ls-len pic s9(04) comp.
05 ls-var pic 9(05).
please explain why we hav to declare ls-len.
| Is This Answer Correct ? | 0 Yes | 3 No |
what is the difference between COBOL2 AND COBOL390?
What is a subscript ?
How can you declare the file ?
what is the difference between Plan & package
Program A (Normal COBBAT) calling a B Program (DB2COBOL, COBBATDB which is using a VSAM file. its a dynamic call. How we will handle VSAM file decleration in our from JCL from where we are running A PGM. And should we have PLAN for A pGM also. if possible can some one post a sample JCL. Thanks for help in advance.
What is the maximum length of a field you can define using COMP-3?
4 Answers Complex System, Infosys,
Discuss about changing dataset name in proc.
What is difference between static and dynamic call in cobol?
what are the paramater we cannot use in procedure?how many instream we can write in single jcl?can we call instream to catalog and ctalog to instream?
. How do we cast a variable in COBOL
what are decleratives in cobol?
Should I use STOP RUN in the sub program??why?