Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


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



What is the Linkage section? What is the Use and Why the parm length use alway "PARM-LENGTH ..

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 ?    19 Yes 4 No

What is the Linkage section? What is the Use and Why the parm length use alway "PARM-LENGTH ..

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 2 No

What is the Linkage section? What is the Use and Why the parm length use alway "PARM-LENGTH ..

Answer / kavya

Linkage section is one of the section of Data
division.Linkage section is used to access external data.

With respect to length above ans is right...

Is This Answer Correct ?    8 Yes 3 No

What is the Linkage section? What is the Use and Why the parm length use alway "PARM-LENGTH ..

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

What is the Linkage section? What is the Use and Why the parm length use alway "PARM-LENGTH ..

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

What is the Linkage section? What is the Use and Why the parm length use alway "PARM-LENGTH ..

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

What is the Linkage section? What is the Use and Why the parm length use alway "PARM-LENGTH ..

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 Linkage section? What is the Use and Why the parm length use alway "PARM-LENGTH ..

Answer / harish

hi,

above answers r absolutely right..........

Is This Answer Correct ?    5 Yes 9 No

Post New Answer



More COBOL Interview Questions

What is the difference between a binary search and a sequential search?

3 Answers  


I know my query will return more than one row but I don't want cursor what should I do?

1 Answers  


what is amode(24), amode(31), rmode(24) and rmode(any)?

0 Answers  


Hi pls anybody tell me about " ANALYSIS DOCUMENT PREPARATION AND ESTIMATION OF TASK " (in real time project)."I want to update a sequential file in my project" for that purpose i need both structures i mean analysis document and estimation of task.

0 Answers  


Can anyone explain me CALL procedure in COBOL.Does it carries similarities like call by reference in C.

1 Answers  






) How do u handle errors in BMS macro?

0 Answers   IBM,


CAN ANY ONE HELP WHAT IS QTP? why it is nessery AND WEN IT IS USED?

1 Answers  


IDENTIFICATION DIVISION. PROGRAM-ID. UPDT. AUTHOR.anbu. DATE-WRITTEN. AUG 13. ENVIRONMENT DIVISION. INPUT-OUTPUT SECTION. FILE-CONTROL. SELECT CMSTR ASSIGN TO CINP1 ORGANIZATION IS INDEXED ACCESS IS SEQUENTIAL RECORD KEY CM2-KEY FILE STATUS IS WS-CMSTR-FST. SELECT CTAB ASSIGN TO CINP2 ORGANIZATION IS ACCESS IS SEQUENTIAL RECORD KEY VSAM-WHSE- KEY FILE STATUS IS WS-CTAB- FST. DATA DIVISION. FILE SECTION. FD CMSTR. COPY RXCYFC20. FD CTAB. COPY AITYWHSE. ************************************************************ ****** *** WORKING STORAGE VARIABLES *** ************************************************************ ****** WORKING-STORAGE SECTION. 01 WS- VARIABLES. 05 WS-EB PIC X(02) VALUE ZEROES. 05 WS-DIV PIC 9(03) VALUE ZEROES. 05 WS-CMF-RECS-REWRITTEN PIC 9(01) VALUE ZERO. *** FILE STATUS VARIABLES *** 05 WS- FILESTATUS. 10 WS-CMSTR-FST PIC 9(02) VALUE ZEROES. 10 WS-CTAB-FST PIC 9(02) VALUE ZEROES. *** END OF FILE VARIABLES *** 05 WS-CMSTR-EOF PIC X(01) VALUE 'N'. 88 WS-CMSTR-EOF-YES VALUE 'Y'. 88 WS-CMSTR-EOF-NO VALUE 'N'. 05 WS-CTAB-EOF PIC X(01) VALUE 'N'. 88 WS-CTAB-EOF-YES VALUE 'Y'. 88 WS-CTAB-EOF-NO VALUE 'N'. **** ERROR VARIABLES **** 05 WC-ABEND-900 PIC 9(03) VALUE 900. 05 WE-ERR-CODE PIC 9(02) VALUE ZEROES. 05 WE-ABEND-CODE PIC 9(03) VALUE ZEROES. ************************************************************ **** ********* PROCEDURE DIVISON ********** ************************************************************ **** PROCEDURE DIVISION. 0000- BEGIN. PERFORM 1000-INITIALISE THRU 1000- EXIT. PERFORM 2000-PROCESS THRU 2000- EXIT UNTIL WS-CMSTR-EOF- YES. DISPLAY 'WS-CMF-RECS-REWRITTEN :' WS-CMF-RECS- REWRITTEN. PERFORM 5000-CLOSE THRU 5000- EXIT. GOBACK. 0000- EXIT. EXIT. 1000- INITIALISE. OPEN I-O CMSTR. EVALUATE WS-CMSTR- FST WHEN 00 WHEN 97 CONTINUE WHEN OTHER DISPLAY 'ERROR IN READING INPUT FILE: ' DISPLAY WS-CMSTR-FST MOVE WS-CMSTR-FST TO WE-ERR-CODE PERFORM 9999-ABEND-PARA THRU 9999-EXIT END-EVALUATE. OPEN INPUT CTAB. EVALUATE WS-CTAB-FST WHEN 00 WHEN 97 CONTINUE WHEN OTHER DISPLAY 'ERROR IN READING INPUT FILE: ' DISPLAY WS-CTAB-FST MOVE WS-CTAB-FST TO WE-ERR-CODE PERFORM 9999-ABEND-PARA THRU 9999-EXIT END-EVALUATE. 1000-EXIT. EXIT. 2000-PROCESS. READ CMSTR. EVALUATE WS-CMSTR-FST WHEN 00 CONTINUE WHEN 10 SET WS-CMSTR-EOF-YES TO TRUE GO TO 2000-EXIT WHEN OTHER DISPLAY 'ERROR IN READING INPUT FILE: ' DISPLAY WS-CMSTR-FST MOVE WS-CMSTR-FST TO WE-ERR-CODE PERFORM 9999-ABEND-PARA THRU 9999-EXIT END-EVALUATE IF CM2-RECORD-TYPE-SOLD-TO MOVE CM2-ENTERING-BRANCH TO WS-EB PERFORM 3000-READ THRU 3000-EXIT UNTIL WS-CTAB-EOF-YES END-IF. 2000-EXIT. EXIT. 3000-READ. MOVE WS-EB TO VSAM-WHSE-CD. MOVE 'WHSE' TO VSAM-WHSE-ID. READ CTAB. EVALUATE WS-CTAB-FST WHEN 00 MOVE WHSE-DIV-CODE TO WS-DIV PERFORM 4000-REWRITE-CMF THRU 4000-EXIT WHEN 10 SET WS-CTAB-EOF-YES TO TRUE GO TO 3000-EXIT WHEN OTHER DISPLAY 'ERROR IN READING TABLE FILE: ' DISPLAY WS-CTAB-FST MOVE WS-CTAB-FST TO WE-ERR-CODE PERFORM 9999-ABEND-PARA THRU 9999-EXIT END- EVALUATE. 3000- EXIT. EXIT. 4000-REWRITE- CMF. IF WS-DIV = 250 OR 252 MOVE 'F' TO CM2-FREIGHT- TYPE MOVE 1 TO CM2-FREIGHT-THRESHOLD- AMT ADD +1 TO WS-CMF-RECS- REWRITTEN REWRITE CM2-SOLD-TO- RECORD DISPLAY 'RECORD UPDATED' END- IF. * EVALUATE WS-CMSTR- FST * WHEN 00 * CONTINUE * WHEN OTHER * DISPLAY 'FILE NOT UPDATED' * DISPLAY WS-CMSTR- FST * MOVE WS-CMSTR-FST TO WE-ERR-CODE * PERFORM 9999-ABEND-PARA THRU 9999-EXIT * GO TO 4000-EXIT * END-EVALUATE. 4000-EXIT. EXIT. 5000-CLOSE. CLOSE CMSTR CTAB. 5000-EXIT. EXIT. 9999-ABEND-PARA. COMPUTE WE-ABEND-CODE = WC-ABEND-900 + WE-ERR-CODE CALL 'ILBOABN0' USING WE-ABEND-CODE GO TO 5000-CLOSE. 9999-EXIT. EXIT. 5000-CLOSE. CLOSE CMSTR CTAB. 5000-EXIT. EXIT. 9999-ABEND-PARA. COMPUTE WE-ABEND-CODE = WC-ABEND-900 + WE-ERR-CODE CALL 'ILBOABN0' USING WE-ABEND-CODE GO TO 5000-CLOSE. 9999-EXIT. EXIT. //this program is giving maxcc=0, but not updating..

0 Answers  


How to Pass table from a cobol program to another cobol program and how to use that table in called program

8 Answers   Patni, SunGard,


How can you add a particular field in copybook?

2 Answers   L&T,


What is XDC ?

3 Answers   Cap Gemini, IBM,


What are all the divisions of a COBOL program?

0 Answers  






Categories