Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Call to CICS_COBOL program
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
View previous topic :: :: View next topic  
Author Message
ami777us

New User


Joined: 06 Apr 2007
Posts: 33
Location: USA

PostPosted: Wed Aug 15, 2007 1:32 am    Post subject: Call to CICS_COBOL program
Reply with quote

Hi,

Can you pls help on the syntax of a cobol call.

PRGA has to call a PRGB whose linkage is as below:

LINKAGE SECTION. (PRGB)

01 DFHCOMMAREA.
05 LS-shipment-PTR USAGE IS POINTER.

01 DOCUMENT PIC X(150).

PRGA:

01 WS-COMMAREA1.
05 WS-shipment-PTR USAGE IS POINTER.

PRGA calls PRGB as follows:

call PRGB using DFHEIBLK,ws-commarea1.

PRGB has the procedure as;

PROCEDURE DIVISION USING DFHEIBLK,DFHCOMMAREA.

Please let me know what am i doing wrong.I am sure I am missig something.
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Aug 15, 2007 1:41 am    Post subject:
Reply with quote

Hello,

What kind of problem are you having?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Aug 15, 2007 1:45 am    Post subject:
Reply with quote

Why use a COBOL CALL from one CICS pgm to another CICS pgm.

Why not use CICS LINK?
Back to top
View user's profile Send private message
ami777us

New User


Joined: 06 Apr 2007
Posts: 33
Location: USA

PostPosted: Wed Aug 15, 2007 2:14 am    Post subject: Reply to: Call to CICS_COBOL program
Reply with quote

PRGB is invoked hundreds of time.So I am thinking of using CALL as I think that wud improve performance.

I am getting ASRA abend because of my syntax being wrong I guess.

Please let me know the syntax.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Aug 15, 2007 2:28 am    Post subject:
Reply with quote

Hello,

Have you tried to follow where your program abends with CEDF?

What (if any) warnings were presented by your compilation jobs?

As DBZ mentioned, you might want to look at using LINK.
Back to top
View user's profile Send private message
ami777us

New User


Joined: 06 Apr 2007
Posts: 33
Location: USA

PostPosted: Wed Aug 15, 2007 2:37 am    Post subject: Reply to: Call to CICS_COBOL program
Reply with quote

My question is still not answered on the syntax.Based on the info provided ,can you please be more to the point and tell me if PRGA is correctly calling PRGB.The need of the hour is the syntax of CALL.


I am trying to change from LINK to a CALL in order to reduce CPU.To test this with Mainview I need to get my syntax right.If CALL doesnot give me a significant change I will switch back to a LINK.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Aug 15, 2007 3:54 am    Post subject:
Reply with quote

If the CALLed program is a CICS program, you are defeating your purpose by using a COBOL CALL. You only use a COBOL CALL in CICS to CALL a module that is NOT a CICS module.

Changing the tranfer-of-control mechanism from a CICS LINK to a COBOL Call will only slow down performance.

You say performance problem. Unless you have a really really old version of CICS, you are not losing time with a CICS LINK. CICS is designed to be an on-line, high performance system - the transfer-of-control mechanism has been shaken out over the years (since the 70's) and I think that IBM has a handle on optimum performance there.

If you have a performance problem it lies either in the design of your logic in the two programs or --- the CICS Region setup - which could be an opportunity.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Wed Aug 15, 2007 4:16 am    Post subject: Re: Reply to: Call to CICS_COBOL program
Reply with quote

ami777us wrote:
Please let me know what am i doing wrong.I am sure I am missig something.
Yes, at least the EIB in the PRGA.
ami777us wrote:
PRGB is invoked hundreds of time.So I am thinking of using CALL as I think that wud improve performance.
Only hundreds?....looking to save a few milliseconds a day...Wow!
Quote:
I am getting ASRA abend because of my syntax being wrong I guess.
Oh, my God, actual information about a problem....Double Wow!!!
ami777us wrote:
My question is still not answered on the syntax.Based on the info provided ,can you please be more to the point and tell me if PRGA is correctly calling PRGB.The need of the hour is the syntax of CALL.
More to the point, yes, if it ain't broke, AND you don't know how to fix it, learn how to ask the correct questions.
Quote:
I am trying to change from LINK to a CALL in order to reduce CPU.To test this with Mainview I need to get my syntax right.If CALL doesnot give me a significant change I will switch back to a LINK.
Like dbz says, it won't buy you much.
If you want hints, look at what a COBOL CICS program does when it is first entered, look at the assembly listing (what we used to call the PMAP) and learn what is needed to emulate that.
Being flippant and dis-courteous to posters on online forum boards will only cause you grief.
Tone down your impatience or one of those "Moderators" will send you away......
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Aug 15, 2007 4:19 am    Post subject:
Reply with quote

Hello,

How many "main" programs use the sub-program?

If you want to see if a substantial amount of cpu is being spent invoking the sub-program, i'd put the code directly into the main program, PERFORM it, and see if performance improves. Usually, loading a module into storage causes i/o but not so much cpu utilization.

Quote:
PRGB is invoked hundreds of time
Are there hundreds of invocations per execution of the main program?

What was used to determine that the cpu time used is excessive? How long has this been running in your production system (or is this a fairly new transaction)? When did the cpu time required raise a red flag?

What kind of processing is going on in this transaction? How many users might execute this at the same time?

If your real issue is performance, continued effort and discussion about how to make the call work will be less productive. If you really want to debug the code with the call, i'd re-suggest running your transaction via CEDF and see when/where it falls down.

If you post how the process works, we may be able to offer suggestions on ways to reduce the time used.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Wed Aug 15, 2007 4:22 am    Post subject: Re: Reply to: Call to CICS_COBOL program
Reply with quote

ami777us wrote:
I am getting ASRA abend because of my syntax being wrong I guess.
And why did you consider THAT information not important enough to include up front?
Do you, as a "programmer", know how to solve computer related problems?
Back to top
View user's profile Send private message
stodolas

Active Member


Joined: 13 Jun 2007
Posts: 632
Location: Wisconsin

PostPosted: Wed Aug 15, 2007 4:36 am    Post subject:
Reply with quote

Get rid of the commas in the CALL statement. They don't belong there. They also don't belong in the USING statement.
Back to top
View user's profile Send private message
stodolas

Active Member


Joined: 13 Jun 2007
Posts: 632
Location: Wisconsin

PostPosted: Wed Aug 15, 2007 4:39 am    Post subject:
Reply with quote

dbzTHEdinosauer: As to CALL vs CICS LINK. I ran into that at my shop. I can't use CICS LINK because of size limits. My CICS program uses the Cobol XML GENERATE command. It creates a record of ~ PIC X(520000). I need to reformat this record using a subprogram. The reformated record is ~ PIC X(600000). If I use CICS LINK I am limited to 32K in the COMMAREA... so I need to use call in my current situation.

I know that a newer CICS (3.2?) allows for larger data transfers between programs.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Wed Aug 15, 2007 4:45 am    Post subject:
Reply with quote

stodolas wrote:
Get rid of the commas in the CALL statement. They don't belong there. They also don't belong in the USING statement.
You have got to be kidding....a comma in COBOL syntax is nothing more than static.....
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Wed Aug 15, 2007 4:48 am    Post subject:
Reply with quote

stodolas wrote:
I can't use CICS LINK because of size limits. My CICS program uses the Cobol XML GENERATE command. It creates a record of ~ PIC X(520000). I need to reformat this record using a subprogram. The reformated record is ~ PIC X(600000). If I use CICS LINK I am limited to 32K in the COMMAREA... so I need to use call in my current situation.
Wow, do you think a "pointer" might be that big?
Back to top
View user's profile Send private message
stodolas

Active Member


Joined: 13 Jun 2007
Posts: 632
Location: Wisconsin

PostPosted: Wed Aug 15, 2007 4:52 am    Post subject:
Reply with quote

Can you point me to the pointer documentation on a call? This is my first foray into coding for something like this in COBOL.
Back to top
View user's profile Send private message
stodolas

Active Member


Joined: 13 Jun 2007
Posts: 632
Location: Wisconsin

PostPosted: Wed Aug 15, 2007 4:53 am    Post subject:
Reply with quote

Also if a comma is static are you telling me that this would work without problems?

Code:

MOVE , zeros , to , ws-numeric
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Wed Aug 15, 2007 5:44 am    Post subject:
Reply with quote

stodolas wrote:
Also if a comma is static are you telling me that this would work without problems?
Code:

MOVE , zeros , to , ws-numeric
Have you tried it....The only value I have found in commas (other than where they are required) is for pause in the punctuation....
And the commas (and periods) interfer with scans for a dataname.....
Back to top
View user's profile Send private message
ami777us

New User


Joined: 06 Apr 2007
Posts: 33
Location: USA

PostPosted: Wed Aug 15, 2007 7:05 am    Post subject: Reply to: Call to CICS_COBOL program
Reply with quote

Dick--You are right.PRGB is invoked few hundred times per execution of the main program.PRGB is really a parser program that parses thru name/value pairs to do the processing.the parser program primarily has cobol statements like move,add,subtract etc.

From what I see from the posts is CALL is not going to save me much time compared to link.Any other suggestions would really help.

CICS GUY---IN UR WHOLE MSG U HAVENT TOLD ME IF MY SYNTAX WAS RIGHT.IF U DONOT UNDERSTAND MY PROBLEM THEN U BETTER DONT RESPOND.LET THE MORE INTELLIGENT GUYS LIKE DICK AND OTHERS ANSWER.OK!!
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Aug 15, 2007 7:13 am    Post subject:
Reply with quote

Hello,

If the code (called or inline) is parsing fields to validate or re-construct the values, that will take a lot of cpu time.

If you post your fields that are being parsed and the output field(s) expected from some representative sample inputs, we may be able to offer alternate schemes for implementing.

From an earlier reply
Quote:
What was used to determine that the cpu time used is excessive? How long has this been running in your production system (or is this a fairly new transaction)? When did the cpu time required raise a red flag?
The answers to these questions may help - may not, but couldn't hurt. . .

From your most recent reply, i suspect that most of the cpu time is spent running the parsing code.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Aug 15, 2007 12:40 pm    Post subject:
Reply with quote

By the way, a CICS module is a module that uses CICS Commands for VSAM I/O, TS Queue I/O, etc. If you are not using the CICS API (CICS pre-compiler) for anything in your program, then it can be a CALLed with a simple COBOL CALL; the using parms should only be those data areas being passed to the CALLed program. Data areas such as the DFHEIBLK are that are not needed, do not have to be passed or declared in the CALLed module.

Since this CALLed module is only parsing data, I expect that it only needs two areas, an input and an output.

But this kind of thing is design. As Dick Scherrer said, the suspect culprit for cpu consumption is probably the parsing code. Give us examples of input and expected output and I imagine the bit-fiddlers here will give you some pointers, if any are needed.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS All times are GMT + 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts I can not compile my program PL1 V3.R... Miguel Fernandez PL/I & Assembler 12 Tue Dec 06, 2016 8:30 pm
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
No new posts Cobol EZASOKET call to SETSOCKOPT fails Andi1982 COBOL Programming 6 Thu Oct 06, 2016 7:12 pm
No new posts Strange EXEC function call in z/VM Willy Jensen CLIST & REXX 3 Wed Oct 05, 2016 2:07 pm
No new posts A sample of exit program for exit XMN... lind sh CICS 2 Mon Oct 03, 2016 5:07 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us