I received a cobol cics program for maintenance and found an EXEC CICS RECEIVE that seems unnecessary. The program receives a communications area via PROCEDURE USING. It executes an EXEC CICS RECEIVE command whose existence seems unnecessary to me. Just below this command it destroys the content of the variable used in INTO.
Another question:
The program is only executed through a LINK command executed by another program. So I ask what this RECEIVE command receives?
Below is the code snippet in question.
PROCEDURE DIVISION USING DFHCOMMAREA. <------------------------------ USING in te PROCEDURE DIVISION
/
*----------------------------------------------------------------*
0000-PRINCIPAL SECTION.
*----------------------------------------------------------------*
/
PERFORM 1000-INICIALIZA.
/
PERFORM 2000-PROCESSA UNTIL WS-IDY EQUAL 100 OR
WS-EIBR EQUAL 20.
/
IF WS-IDZ EQUAL 100 OR
WS-EIBR NOT EQUAL 20
PERFORM 2500-PROCESSA UNTIL
WS-EIBR EQUAL 20
END-IF.
/
PERFORM 9000-FINALIZA.
/
*--------------------*
0000-99-FIM. EXIT.
*--------------------*
*
*----------------------------------------------------------------*
1000-INICIALIZA SECTION.
*----------------------------------------------------------------*
/
EXEC CICS RECEIVE <------- command that seems to be unnecessary
INTO (W096-COMMAREA)
LENGTH (WS-LGT-COM)
NOHANDLE
END-EXEC.
/
IF EIBCALEN NOT GREATER ZEROS
MOVE ZEROS TO O-096-OPERATIONSTATUS
O-096-QTD-OCORRENCIA
MOVE 3 TO O-096-OPERATIONSTATUSMESSAGE(01:01)
MOVE WS-MSG01 TO O-096-OPERATIONSTATUSMESSAGE(02:79)
PERFORM 9999-FINALIZA
END-IF.
/
MOVE DFHCOMMAREA(01:59) TO IN-ENTRA-JAVA-096(01:59). <-------------- Here the content of W096-COMMAREA is destroyed
/
MOVE SPACE TO WS-SEL-NIS
WS-SEL-PGM
WS-SEL-DTA
WS-SEL-HRA
WS-SEL-TRM
WS-SEL-PV.
/
PERFORM 1100-VALIDA-INPUT.
PERFORM 1200-INITIALIZE-OUTPUT.
/
MOVE IN-ENTRA-JAVA-096 TO WS-ENTRA-JAVA-096-O.
/
MOVE ZEROS TO WS-RIDFLD.
/
EXEC CICS STARTBR DATASET(WS-FDSERR)
RIDFLD (WS-RIDFLD)
Cheers
Arí Ricardo
São Paulo - Brazil
Cobol cics command that seems out of context
-
- Posts: 8
- Joined: Thu May 05, 2022 7:46 pm
- Skillset: About 50 years of experience in Mainframe Programming
- Referer: Google
- prino
- Posts: 641
- Joined: Wed Mar 11, 2009 12:22 am
- Skillset: PL/I - CICS - DB2 - IDMS - REXX - JCL, most in excess of three decades
- Referer: Google
- Location: Vilnius, Lithuania
- Contact:
Re: Cobol cics command that seems out of context
Comment it out, and watch it crash, or not?
How hard would it have been to think of that yourself?
How hard would it have been to think of that yourself?
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
robert.ah.prins @ the.17+Gb.Google thingy
-
- Posts: 8
- Joined: Thu May 05, 2022 7:46 pm
- Skillset: About 50 years of experience in Mainframe Programming
- Referer: Google
Re: Cobol cics command that seems out of context
I'm sorry, but I don't think I understood your answer because I still don't know the things I asked about in the original post.
-
- Global moderator
- Posts: 3006
- Joined: Fri Apr 18, 2008 11:25 pm
- Skillset: tso,rexx,assembler,pl/i,storage,mvs,os/390,z/os,
- Referer: www.ibmmainframes.com
Re: Cobol cics command that seems out of context
I received a cobol cics program for maintenance and found an EXEC CICS RECEIVE that seems unnecessary.
comment the RECEIVE statement and see what happens
nobody will go thru the program logic to find out !
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
-
- Posts: 8
- Joined: Thu May 05, 2022 7:46 pm
- Skillset: About 50 years of experience in Mainframe Programming
- Referer: Google
Re: Cobol cics command that seems out of context
I had thought that someone with a good knowledge of CICS could interpret the logic and answer me.
I apologize for bothering you. I don't have the necessary debugging tools at my disposal. If I imagined that the answer would be to debug the code I wouldn't have wasted time. Sorry again.
I apologize for bothering you. I don't have the necessary debugging tools at my disposal. If I imagined that the answer would be to debug the code I wouldn't have wasted time. Sorry again.
- sergeyken
- Posts: 458
- Joined: Wed Jul 24, 2019 10:12 pm
- Skillset: Assembler, JCL, Utilities, PL/I, C/C++, DB2, SQL, REXX, COBOL, etc. etc. etc.
- Referer: Internet search
Re: Cobol cics command that seems out of context
This is not a DO-MY-JOB-FOR-ME forum.
Sorry for misunderstanding.
Sorry for misunderstanding.
Javas and Pythons come and go, but JCL and SORT stay forever.
-
- Posts: 8
- Joined: Thu May 05, 2022 7:46 pm
- Skillset: About 50 years of experience in Mainframe Programming
- Referer: Google
Re: Cobol cics command that seems out of context
I don't see my statements this way, my friend. I don't have the necessary tools and asked for help from someone who might know the answer. I wanted to simplify the source program. I believe this is what the people who hire us expect from us. If it were the other way around, that is, someone asking me and I knew, I wouldn't see it as doing this person's service but rather helping them.
But, okay, I'll stop waiting for help on this issue.
I confess that I did not expect this result. I apologize again if I upset anyone.
But, okay, I'll stop waiting for help on this issue.
I confess that I did not expect this result. I apologize again if I upset anyone.
-
- Global moderator
- Posts: 3006
- Joined: Fri Apr 18, 2008 11:25 pm
- Skillset: tso,rexx,assembler,pl/i,storage,mvs,os/390,z/os,
- Referer: www.ibmmainframes.com
Re: Cobol cics command that seems out of context
I don't see my statements this way, my friend. I don't have the necessary tools and asked for help from someone who might know the answer.
we are not your friends ...

and you do not need any debugging tool...
just compile and test the program whithout the RECEIVE cics command
and see what happens.
you just need the basic tools any decent programmer needs to know and be proficient with
I wonder how somebody assigned a maintenance task to somebody with such low understanding of the basic programming tasks
( how to comment a cobol statement for example, recompile the program an look at what happens )
the topic is going to be locked and deleted after a while
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
-
- Posts: 8
- Joined: Thu May 05, 2022 7:46 pm
- Skillset: About 50 years of experience in Mainframe Programming
- Referer: Google
Re: Cobol cics command that seems out of context
ok I give up.
-
- Global moderator
- Posts: 3006
- Joined: Fri Apr 18, 2008 11:25 pm
- Skillset: tso,rexx,assembler,pl/i,storage,mvs,os/390,z/os,
- Referer: www.ibmmainframes.com
Re: Cobol cics command that seems out of context
ok I give up.
Thanks &deity
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
-
- Similar Topics
- Replies
- Views
- Last post
-
- 4
- 3202
-
by prino
View the latest post
Tue Nov 24, 2020 6:12 pm
-
- 0
- 1491
-
by zbius
View the latest post
Wed Nov 06, 2024 7:19 pm
-
-
Calling Java program on UNIX/USS from a COBOL CICS program?
by zbius » Tue Nov 05, 2024 2:37 pm » in IBM Cobol - 2
- 2548
-
by zbius
View the latest post
Wed Nov 06, 2024 6:02 pm
-
-
- 1
- 2023
-
by prino
View the latest post
Mon Sep 05, 2022 2:12 am
-
- 4
- 1392
-
by futohomok
View the latest post
Mon Oct 16, 2023 9:01 pm