View previous topic :: View next topic
|
Author |
Message |
ami777us
New User
Joined: 06 Apr 2007 Posts: 33 Location: USA
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
What kind of problem are you having? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Why use a COBOL CALL from one CICS pgm to another CICS pgm.
Why not use CICS LINK? |
|
Back to top |
|
|
ami777us
New User
Joined: 06 Apr 2007 Posts: 33 Location: USA
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
|
ami777us
New User
Joined: 06 Apr 2007 Posts: 33 Location: USA
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
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 |
|
|
stodolas
Active Member
Joined: 13 Jun 2007 Posts: 631 Location: Wisconsin
|
|
|
|
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 |
|
|
stodolas
Active Member
Joined: 13 Jun 2007 Posts: 631 Location: Wisconsin
|
|
|
|
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 |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
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 |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
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 |
|
|
stodolas
Active Member
Joined: 13 Jun 2007 Posts: 631 Location: Wisconsin
|
|
|
|
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 |
|
|
stodolas
Active Member
Joined: 13 Jun 2007 Posts: 631 Location: Wisconsin
|
|
|
|
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 |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
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 |
|
|
ami777us
New User
Joined: 06 Apr 2007 Posts: 33 Location: USA
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
ami777us wrote: |
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!! |
You don't have to yell....
CICS Guy wrote: |
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. |
|
|
Back to top |
|
|
ami777us
New User
Joined: 06 Apr 2007 Posts: 33 Location: USA
|
|
|
|
Dick-I have used Strobe to determine that the parser is consuming a high CPU.I hae learnt that by changing subscript to index within the parser the performance can be improved.I have a doubt on the index now.
There are MOVE statements for the subscript value to another working storage variable for some length calculation.
My Quesion is "Can I just move the Index to the working storage or there is any other way to get around it"?? I think that Index values cannot be just moved.Can you please confirm. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
use a SET statement to populate a numeric variable with the 'occur #' of an index.
Code: |
05 SAVE-OCCURANCE-NUMBER PIC S9(9) COMP.
SET SAVE-OCCURANCE-NUMBER TO INDEX-1
|
you can use any numeric PIC clause, but COMP converts faster. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
I hae learnt that by changing subscript to index within the parser the performance can be improved |
While this may be true in some cases, i expect that the parsing approach the code uses currently will not significantly change cpu utilization by switching from subscript to index.
If you work with an index, you would use SET rather than MOVE.
As i mentioned previously
Quote: |
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.
|
|
|
Back to top |
|
|
|