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
 

 

Pass a integer value from a cobol code to cics
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
View previous topic :: :: View next topic  
Author Message
ankit saxena

New User


Joined: 06 Oct 2010
Posts: 55
Location: india

PostPosted: Wed Oct 06, 2010 11:48 pm    Post subject: Pass a integer value from a cobol code to cics
Reply with quote

hi friends,
i need to pass a integer value from a cobol code to cics program,
i have tried call but it is giving SOC1,
i tried link also it is also giving SOC1...

when using call while i m compiling its working fine...
if anybody has any info regarding it then pls tell,
Back to top
View user's profile Send private message

ankit saxena

New User


Joined: 06 Oct 2010
Posts: 55
Location: india

PostPosted: Wed Oct 06, 2010 11:56 pm    Post subject:
Reply with quote

i m using this syntax pls check if it is correct, and also tell whether i need to do any changes in jcl ,coz my normal jcl is not working

999-PARA.
IF W IS EQUAL ZERO
DISPLAY ' NO MATCH FOUND '
END-IF.
CLOSE JCL-FILE1.
EXEC CICS XCTL
PROGRAM(CALLER)
END-EXEC.

jcl i m using is

//TRYANKIT JOB A123,'NAME',NOTIFY=&SYSUID
//STEP1 EXEC PROC=IGYWCL,PARM='DYNAM'
//COBOL.SYSIN DD DSN=TRNG.EDUC36.TRYHARD(THIRD),DISP=SHR
//LKED.SYSLMOD DD DSN=TRNG.LIB.LOAD(THIRD),DISP=SHR
//COBOL.SYSLIB DD DSN=TRNG.EDUC36.NEWSORT1(CALLED),DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
//

it is giving error as invalid exec
72 IGYPS2072-S "EXEC" was invalid. Skipped to the next verb,.....

the rest of my code is a simple cobol file handling program..
please help,if anybody having any idea.
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: Thu Oct 07, 2010 12:13 am    Post subject:
Reply with quote

Hello,

Is this the same as your other topic? Why did you believe posting a totally different topic would help?

Is this a batch cobol program?

Should the other topic be locked because this is really what you want to know?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Thu Oct 07, 2010 12:13 am    Post subject:
Reply with quote

If you're going to use EXEC CICS commands in your code, you either need to run the program through the CICS translator before the compile, or use the CICS option of the COBOL compiler (assuming your release of COBOL is recent enough to support the CICS option).

EXEC CICS XCTL is used for CICS programs to transfer control to other CICS programs. If you are wanting to invoke a CICS program from a batch COBOL program (which it appears you may be wanting to do), be aware that EXEC CICS XCTL is not the way to do so, and also be aware that this is not a simple process and you will need to use an interface specifically designed for doing so (read the CICS manuals for details).
Back to top
View user's profile Send private message
Earl Haigh

Active User


Joined: 25 Jul 2006
Posts: 475

PostPosted: Thu Oct 07, 2010 2:58 am    Post subject:
Reply with quote

http://cicswiki.org/cicswiki1/index.php?title=How_do_I_interact_with_a_transaction_from_a_batch_program%3F#3rd_party_Vendor_Software
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: Thu Oct 07, 2010 7:31 am    Post subject:
Reply with quote

Hello,

It may help someone help you if you describe exactly what needs to be accomplished.

Don't use a "generic" explanation - post what the batch job does and why it needs to somehow communicate with or start some CICS transaction(s). What does the cics code provide (what business functon(s)?
Back to top
View user's profile Send private message
ankit saxena

New User


Joined: 06 Oct 2010
Posts: 55
Location: india

PostPosted: Thu Oct 07, 2010 11:14 am    Post subject: Reply to: HOW TO CALL A CICS PROGRAM FROM COBOL PROGRAM
Reply with quote

the program is finding the row in which a particular 'word' was found in a PS file, that row number needs to be displayed at t terminal. is there any command to fullfill my this requirement.
Back to top
View user's profile Send private message
ankit saxena

New User


Joined: 06 Oct 2010
Posts: 55
Location: india

PostPosted: Thu Oct 07, 2010 11:30 am    Post subject: re:
Reply with quote

if i am using this jcl for running t cobol code with XCTL command then it is compiling and giving maxcc=0, but during run time its giving SOC1 abend...

//EDUC44NH JOB ,'CICS',NOTIFY=&SYSUID
// JCLLIB ORDER=TRNG.HARI.PROCLIB
//STEP1 EXEC CICSCMP
//CICSTRAN.SYSIN DD DSN=TRNG.EDUC36.TOOL(third),
// DISP=SHR
//COBOL.SYSLIB DD DSN=CICSTS12.SDFHCOB,DISP=SHR
// DD DSN=TRNG.EDUC36.COPYLIB,DISP=SHR
//LKED.SYSLMOD DD DSN=TRNG.LIB.LOAD(third),DISP=SHR
//LKED.SYSIN DD *
INCLUDE SYSLIB(DFHECI)
ORDER DFHECI
NAME third(R)
/*
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Thu Oct 07, 2010 4:38 pm    Post subject:
Reply with quote

The S0C1 abend means you're attempting to execute an instruction that the computer does not understand. This could be due to an addressing (AMODE / RMODE) error, overwriting your code with data due to table overflow, a Language Environment problem, or any number of other reasons. You are not providing anything helpful to decipher the cause of your error.

Quote:
the program is finding the row in which a particular 'word' was found in a PS file, that row number needs to be displayed at t terminal. is there any command to fullfill my this requirement.
Your statement of your "requirement" is absolute, utter nonsense. A file does not have rows -- it has records. Databases have rows. CICS does not handle sequential files easily -- you must use an extrapartition transient data queue to read the file (and such a file is read-only). Terminology is critical in IT, where similar terms may mean very different things -- and so far you are showing no grasp of terminology, which implies you may be better off on the student / beginner forum rather than here.

So why don't you go back to the beginning, tell us what you are trying to do, the environment you are attempting to do it in, with correct terminology, and let us help you determine the method to use.
Back to top
View user's profile Send private message
ankit saxena

New User


Joined: 06 Oct 2010
Posts: 55
Location: india

PostPosted: Thu Oct 07, 2010 5:20 pm    Post subject: re:
Reply with quote

look what i am doing is i m creating a tool to know on which line the data (which is a word) is present on a sequential file.
for this i m using a cics screen on which i m giving input a word(which is to be search) and dataset ( sequential file in which to search) i m submitting a jcl thru this cics program to run t cobol program which is doing this search and i m able to get desired result also but that result is in t SYSOUT in spool, i want to display this result on a cics screen, for this reason i want to transfer this data to a cics program.

i try using link but my compile jcl is giving error as invalid exec statement,
i dont know how to use EXCI and also what modification i need to incorporate in my jcl for that..

Actually this is mu 1st project in L&T Infotech. and they have given me a case study before that,
still thanks for trying to help me..
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: Thu Oct 07, 2010 8:16 pm    Post subject:
Reply with quote

Hello,

Load the sequential file into a vsam file or database table (or the previously mentoned extrapartition transient data queue). Then reference this from a cics program directly.

Even if you get something running as is currently being tried, i suspect it could become a support and maintenance nightmare.
Back to top
View user's profile Send private message
ankit saxena

New User


Joined: 06 Oct 2010
Posts: 55
Location: india

PostPosted: Fri Oct 08, 2010 6:35 pm    Post subject: re:
Reply with quote

how to load a sequential file in a TDQ...

i am unable to load into a vsam connected to cics as after getting an fct entry than that file can only be read by a cobol program, for any other operation it returns file code 93..

so if anyother way than please tell..
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Fri Oct 08, 2010 7:04 pm    Post subject:
Reply with quote

What does CEMT I FI show for the attributes of the file?

Furthermore, you don't load a sequential file into a TDQ -- if the TDQ is an extrapartition transient data queue, then merely issuing the READQ TD in CICS will bring in the first existing record of the file.
Back to top
View user's profile Send private message
ankit saxena

New User


Joined: 06 Oct 2010
Posts: 55
Location: india

PostPosted: Fri Oct 08, 2010 8:39 pm    Post subject: re:
Reply with quote

its showing( ope ena ..) thats y i m not able to use that file in a cobol code..
pls tell how will a TDQ know which file to read,
actually i have very less idea of TDQ,

and can u pls tell me if i m submitting a job 4m cics program(itdc region)
then is there any way to get notification on cics screw,

also how can i write jes msgs( JESJCL ,JESMSGLG..) to any file..
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Fri Oct 08, 2010 8:46 pm    Post subject:
Reply with quote

When your CICS systems programmer installs the TDQ, the data set name is provided on the CEDA definition screen along with the DD name.

The types of questions you are asking strongly indicate that you need to work with your site support group, not us. Most sites have some standard CICS TDQ pointing to the internal reader that can be used to submit jobs, but the precise name varies from site to site.
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 645
Location: Pennsylvania

PostPosted: Fri Oct 08, 2010 11:53 pm    Post subject:
Reply with quote

Is this a business requirement?

I find it hard to believe that the requirement is:
Start on a CICS Screen
Get a search value
Submit a batch job to read a sequential file
Return results to CICS screen

What exactly is the requirement?
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: Sat Oct 09, 2010 12:05 am    Post subject:
Reply with quote

Hi Dave,

Quote:
What exactly is the requirement?
If i've read this correctly, the online code needs to read some data that is currently not available online.

Rather than this kludge, the data needs to be made available online. . .

imho . . .
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 645
Location: Pennsylvania

PostPosted: Sat Oct 09, 2010 12:39 am    Post subject:
Reply with quote

Quote:
look what i am doing is i m creating a tool to know on which line the data (which is a word) is present on a sequential file.
for this i m using a cics screen on which i m giving input a word(which is to be search) and dataset ( sequential file in which to search) i m submitting a jcl thru this cics program to run t cobol program which is doing this search and i m able to get desired result also but that result is in t SYSOUT in spool, i want to display this result on a cics screen, for this reason i want to transfer this data to a cics program.

i try using link but my compile jcl is giving error as invalid exec statement,
i dont know how to use EXCI and also what modification i need to incorporate in my jcl for that..

Actually this is mu 1st project in L&T Infotech. and they have given me a case study before that,
still thanks for trying to help me..


If you were creating such a 'tool', would you use a CICS screen?

I would use things like TSO, Rexx, ISPF Panel, Edit Macro.

If this is some sort of training exercise (L&T Infotech?),
why train this method?

Just my own view
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: Sat Oct 09, 2010 2:00 am    Post subject:
Reply with quote

Hello,

Possibly because most/all users have cics logons while very few would have tso. . .
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Sat Oct 09, 2010 9:31 pm    Post subject:
Reply with quote

why write a cics application to perform the 3.14 ISPF function?

it must be nice to work at a shop where there is absolutely no supervision whatsoever by anyone that knows anything about computers.
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 CICS START AND CANCEL blayek CICS 1 Wed Dec 07, 2016 3:27 am
No new posts PL/I code tuning/Performance improvement Virendra Shambharkar PL/I & Assembler 4 Mon Dec 05, 2016 11:57 am
No new posts What is the code in CLIST to enable t... jackzhang75 CLIST & REXX 1 Fri Dec 02, 2016 3:02 am
No new posts How does a called pgm know if its cal... Graeme Westerman COBOL Programming 4 Tue Nov 29, 2016 9:25 pm
No new posts IDEAL - Code Retrieval yugendran CA Products 0 Fri Nov 25, 2016 3:27 pm


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