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 default value of DISP for temp datasets
Can the OCCURS clause be at the 01 level?
how the control comes back from subprogram to mainprogram
COMP?
I have a program with an Array of 5000 occurences which is being passed from 5 sub levels to the front end screen. Thess 5 programs using each 5*2 = 10 different arrays with size as 5000. This is causing the transaction to utilize more storage consupmtion. I am looking to reduce the storage consumption. As part of that initially i thought Dynamic array may solve my problem. After viewing the comments given i see its same as normal array. IS there any other way we can resolve this issue?
What is the difference between a binary search and a sequential search? What are the pertinent cobol commands?
Can printer files (having 133 characters) be of variable length?
How to change size of Initial number of records to *NOMAX for ALL PF files from perticular library, how can I do that
If i got a job on mainframe technology, will i have a bright future?. Some people are discouraging me. Let me know, is it true? Please bring back me from the confusion.
where do we use dyanamic call ? and where do we use static call pls give any example pls ?
Read a flat file and write last but one (I have n records in a file I have to write n-1th) record in another flat file. Could you please provide me the code in COBOL?
If A>B next sentence end-if display 1 display 2. display 3. If a>b, it will display only 3.(the next sentence, ie., after fullstop/period) ____________________________________ if a>b continue end-if display 1 display 2. display 3. If a>b, it Will display 1 2 3 (the next statement) ____________________________________ if a>b continue display 1 end-if display 2 display 3. display 4. If a>b, Will it display 2 3 4 (or) 1 2 3 4 ?