Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7819211
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T06:51:00+00:00 2026-06-02T06:51:00+00:00

I have a map in which the user enter two values which are to

  • 0

I have a map in which the user enter two values which are to be updated in the database table. I wrote both the programs but i am unable to know how to pass the two field values entered in the map to another program. I came to knew that i can use Linkage Section. But don’t know the syntax or any details on it. Can anyone help me with the syntax. Thank you

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T06:51:01+00:00Added an answer on June 2, 2026 at 6:51 am

    There should be some WORKING-STORAGE in the program where values retrieved from CICS maps is held. For example:

    01 SCREEN-DATA.
        05 SOME-FIELD         PIC X(10).
        05 SOME-OTHER-FIELD   PIC 9(4).
    
    77  PROGRAM-NAME          PIC X(8) VALUE 'PROG2'.
    

    Suppose this program is called PROG1 and you want to pass these values a second COBOL program called PROG2.
    Generally, this is done in COBOL using
    a dynamic subroutine call. The typical way of accomplishing a dynamic call is to put the name of the
    called program into a WORKING-STORAGE variable. I declared PROGRAM-NAME for this purpose. Data may be
    passed to the called program as individual items:

    CALL PROGRAM-NAME USING SOME-FIELD, SOME-OTHER-FIELD
    

    Above is a dynamic call to PROG2 which passes SOME-FILED and SOME-OTHER-FIELD by reference.

    PROG2 receives these data through its linkage section as follows:

      LINKAGE SECTION.
      01 LINKAGE-DATA.
         05 FIELD1          PIC X(10).
         05 FILED2          PIC 9(4).
    

    The PROCEDURE DIVISION of PROG2 would look something like this:

      PROCEDURE DIVISION USING FIELD1, FIELD2.
    

    Alternatively, you could pass the whole record as a single parameter from PROG1:

      CALL PROGRAM-NAME USING SCREEN-DATA
    

    and in PROG2

      PROCEDURE DIVISION USING LINKAGE-DATA.
    

    Finally, when PROG2 has completed its work it should terminate with a GOBACK or EXIT PROGRAM. Do not use STOP RUN as
    this will exit the main program (PROG1) as well.

    COBOL calling conventions are similar to most other procedural languages. Parameters may be passed
    by reference (the default), by value or by content. Most COBOL vendors support all of these parameter passing
    mechanisms but may have minor differenes in implementation. The above examples are for IBM Enterprise COBOL. If you
    are using a different version of COBOL it would be a good idea to check your COBOL Reference Guide and COBOL Programming Guide.

    You can get the IBM Enterprise COBOL guides on line: Language Reference Guide
    and Programming Reference Guide

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a bean which I map to the database using Hibernate. I'm using
I have the following hsqldb table, in which I map UUIDs to auto incremented
I have created a map which allows the user to plot multiple markers with
I have a map which has only one input field where the user will
I have a Google V3 map which uses steetView and some map markers. The
I have made a map with jQuery which is split up in many regions,
I have a Map model, which defines the details for an ASCII-art map for
Is it preferred to have one depot with multiple folders which map to different
I have an unordered map: class O(val a: Int) Map[String, List[O]] which I'd like
I have an App which launches the google Map App. The code is: UIApplication

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.