×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

CISC PROGRAM TO CALL BY CTG COBOL PROGS

CISC PROGRAM TO CALL BY CTG COBOL PROGS

CISC PROGRAM TO CALL BY CTG COBOL PROGS

(OP)
The problem is:

Invoke by Java-CTG e CICS program and by this prog call other cobol programs.

The java part is solved.
The problem is how to build a unique CICS program Driver to call other cobol progs:

This is the CICS Driver PRog:

LINKAGE SECTION.
01 DFHCOMMAREA.
02 PROG-NAME PIC X(8).
02 PROG-AREA-LEN PIC 9(5).
02 PROG-AREA PIC X(32000).

PROG-NAME is the name of cobol program to CALL
PROG-AREA-NAME is the size of COMMAREA of PROG-NAME

How to call PROG-TO-CALL using the PROG-AREA with size PROG-AREA-LEN ???

this is not working:
CALL NOME-PROGRAMMA USING AREA-PROGRAMMA(1:LEN-AREA-PROGRAMMA)


what to do ?

thanks...

RE: CISC PROGRAM TO CALL BY CTG COBOL PROGS

Unfortunately, this is a pretty awkward requirement given how a mainframe environment works.  Generally specific sizes are expected in calls (which is why your reference modification fails, probably in compilation) and range/size checking exists for good reasons.  Add to that the fact that the environment expects fixed sizes for parameters, and you're going to have a huge problem.  Generally, you'll have to pass the largest value possible to this driver program and through to your subroutine.

Possible ideas:
1) Recode the driver program to handle specific programs.  But if you do that, you might as well have the main code call the COBOL programs instead of the CICS one.

2) Play around with the idea of passing pointers.  I haven't done this with COBOL, but with other languages you pass the pointer, and the subprogram has to resolve that to its known data block.  But that kind of obfuscates things and the other group/team members might not like it.

3) Probably the most straight forward and acceptable to most solution if the main has to have a CICS program is to write a stub program which takes the data and then passes it to the COBOL sub and then handles the data on return (if necessary).  Not much dev time (copy/paste), but probably a catalogue nightmare if you have very many of these COBOL subroutines.

Good luck, sounds like you could use it.

It is not possible for anyone to acknowledge truth when their salary depends on them not doing it.

RE: CISC PROGRAM TO CALL BY CTG COBOL PROGS

CODE

WORKING-STORAGE.
01  WS-PROG-AREA PIC X(32000).
LINKAGE SECTION.
01 DFHCOMMAREA.
02 PROG-NAME PIC X(8).
02 PROG-AREA-LEN PIC 9(5).
02 PROG-AREA PIC X(32000).

MOVE PROG-AREA (1:PROG-AREA-LEN) TO WS-PROG-AREA  
CALL PROG-NAME USING WS-PROG-AREA
MOVE WS-PROG-AREA TO PROG-AREA (1:PROG-AREA-LEN)  
Remember, data is not passed, just the address when you use the default BY REFERENCE. If you pass BY CONTENT, you can not get any changes.
 

www.moldyoldy.com/VBComparedemo - free online Compare/Diff of snippets

RE: CISC PROGRAM TO CALL BY CTG COBOL PROGS

in an IBM environment, it is possible to use the option EXTERNAL on a 01 working-storage definition. Can this help you out? It is sometimes much easier to use...

 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close