Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     CODE Help : Calling COBOL Module

Read-Only Read-Only Topic
Go
Search
Notify
Tools
CODE Help : Calling COBOL Module
 Login/Join
 
Gold member
posted
Hi All-

Is that possible to call COBOL modules by using focus?

Please let me know the steps to follow..

Thanks in advance...

This message has been edited. Last edited by: Poryes,


WebFOCUS 7.6.13

Mainframe
all output (Report in mainframe)
 
Posts: 64 | Registered: February 24, 2010Report This Post
Expert
posted Hide Post
Yes it is.

Have you checked out the documentation yet ?

Have a look here.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Gold member
posted Hide Post
Thank you Waz.

Would highly appreciate can anyone pls post some sample code.

Can anyone pls throw some light on this???

Thanks in advance...

This message has been edited. Last edited by: Poryes,


WebFOCUS 7.6.13

Mainframe
all output (Report in mainframe)
 
Posts: 64 | Registered: February 24, 2010Report This Post
Expert
posted Hide Post
What does the COBOL program do ?

Will it be used as a User Written Subroutine, or will it be called outside a TABLE request ?


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Gold member
posted Hide Post
quote:
will

Thanks for your response Waz.

The cobol module (Cobol+DB2) validates the i/p file against the field value(TBR-ID) with a query to retrieve the row for the file.


WebFOCUS 7.6.13

Mainframe
all output (Report in mainframe)
 
Posts: 64 | Registered: February 24, 2010Report This Post
Gold member
posted Hide Post
Below is the code I used to Compile and link edit the COBOL module.

//COMPILE EXEC PGM=IGYCRCTL,
// PARM='APOST,RES,RENT'
//STEPLIB DD DSN=IGY.V1R2M0.SIGYCOMP,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSLIN DD DSNAME=&&LOADSET,UNIT=SYSDA,DISP=(MOD,PASS),
// SPACE=(TRK,(3,3))
//SYSUT1 DD UNIT=SYSDA,SPACE=(CYL,(1,1))
//SYSUT2 DD UNIT=SYSDA,SPACE=(CYL,(1,1))
//SYSUT3 DD UNIT=SYSDA,SPACE=(CYL,(1,1))
//SYSUT4 DD UNIT=SYSDA,SPACE=(CYL,(1,1))
//SYSUT5 DD UNIT=SYSDA,SPACE=(CYL,(1,1))
//SYSUT6 DD UNIT=SYSDA,SPACE=(CYL,(1,1))
//SYSUT7 DD UNIT=SYSDA,SPACE=(CYL,(1,1))
//SYSIN DD *
/*
/* The subroutine source code goes here
/* Alternatively, your DD statement can point to a data set
/* that contains the source code.
/*
//*
//LINKEDIT EXEC PGM=IEWL,
// PARM='REUS,MAP,LIST'
//STEPLIB DD DSN=CEE.SCEELKED,DISP=SHR
//OBJECT DD DSNAME=&&LOADSET,DISP=(OLD,DELETE)
// DD DDNAME=SYSIN <<<<<------------------------- Here I have given DSN where my COBOL code resides.
//SYSLIB DD DSN=CEE.SCEELKED,DISP=SHR
//SYSUT1 DD UNIT=SYSDA,SPACE=(CYL,(1,1))
//SYSPRINT DD SYSOUT=*
//SYSLMOD DD DSN=AAAA.TSO.LOAD,DISP=SHR
//SYSLIN DD *
MODE AMODE(31),RMODE(ANY)
INCLUDE OBJECT
ENTRY AAAA1000
NAME AAAA1000(R)
/*
//*

But I'm getting the below error.

During compile:
---------------
IGYOS4046-I The "RESIDENT" option specification is no longer required The resident runtime library support is always
used.


IGYOS4007-U Unexpected end of file was encountered on "SYSIN". The compilation was terminated.

During Linkedit:
----------------
BATCH EMULATOR JOB(SAMTEST1) STEP(LINKEDIT) PGM= IEWL
IEW2278I B352 INVOCATION PARAMETERS - REUS,MAP,LIST
IEW2322I 1220 1 MODE AMODE(31),RMODE(ANY)
IEW2326E 1221 THE FOLLOWING INVALID RECORD HAS BEEN SEEN: MODE AMODE(31),RMODE
IEW2322I 1220 2 INCLUDE OBJECT
IEW2326E 1221 THE FOLLOWING INVALID RECORD HAS BEEN SEEN: INCLUDE OBJECT
IEW2322I 1220 3 ENTRY AAAA1000
IEW2326E 1221 THE FOLLOWING INVALID RECORD HAS BEEN SEEN: ENTRY AAAA1000
IEW2322I 1220 4 NAME AAAA1000(R)
IEW2326E 1221 THE FOLLOWING INVALID RECORD HAS BEEN SEEN: NAME AAAA1000(R)
IEW2230S 0414 MODULE HAS NO TEXT.
IEW2677S 5130 A VALID ENTRY POINT COULD NOT BE DETERMINED.
IEW2012I 0F09 ALL TEMPNAMES HAVE BEEN USED. THE MODULE CANNOT BE SAVED.
IEW2008I 0F03 PROCESSING COMPLETED. RETURN CODE = 12.

Please help me to resolve the error ASAP...


WebFOCUS 7.6.13

Mainframe
all output (Report in mainframe)
 
Posts: 64 | Registered: February 24, 2010Report This Post
Expert
posted Hide Post
Do you even need to use COBOL ?

WebFOCUS can read DB2, flat files, and many others.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Gold member
posted Hide Post
Yes Waz. I need to use the cobol module.


WebFOCUS 7.6.13

Mainframe
all output (Report in mainframe)
 
Posts: 64 | Registered: February 24, 2010Report This Post
Platinum Member
posted Hide Post
quote:
//SYSIN DD *
/*
/* The subroutine source code goes here
/* Alternatively, your DD statement can point to a data set
/* that contains the source code.
/*
//*


This is your problem. You have not provided any source code. You must find someone in your shop to get the compile and link to run. Give them the documentation listed above.


Jim Morrow
Web Focus 7.6.10 under Windows 2003
MVS 7.3.3



 
Posts: 129 | Registered: June 01, 2005Report This Post
Gold member
posted Hide Post
Hi Jim,

I have mentioned my source code here..

// DD DDNAME=SYSIN <<<<<------------------------- Here I have given DSN where my COBOL code resides.


WebFOCUS 7.6.13

Mainframe
all output (Report in mainframe)
 
Posts: 64 | Registered: February 24, 2010Report This Post
Member
posted Hide Post
Hi. Try removing the // DD DDNAME=SYSIN <<<<<
line, and put your DSN in the sysin statement as follows:

Instead of this:
//SYSIN DD *
/*
/* The subroutine source code goes here
/* Alternatively, your DD statement can point to a data set
/* that contains the source code.
/*
//*
//LINKEDIT EXEC PGM=IEWL,
// PARM='REUS,MAP,LIST'
//STEPLIB DD DSN=CEE.SCEELKED,DISP=SHR
//OBJECT DD DSNAME=&&LOADSET,DISP=(OLD,DELETE)
// DD DDNAME=SYSIN <<<<<------------------------- Here I have given DSN where my COBOL code resides

Change it to this:

//SYSIN DD DSN=DDNAME(your DSN name)
//LINKEDIT EXEC PGM=IEWL,
// PARM='REUS,MAP,LIST'
//STEPLIB DD DSN=CEE.SCEELKED,DISP=SHR
//OBJECT DD DSNAME=&&LOADSET,DISP=(OLD,DELETE)


Ann Dudley

WebFOCUS 76
Windows XP
Excel and AHTML
 
Posts: 1 | Registered: July 01, 2009Report This Post
Platinum Member
posted Hide Post
quote:
//SYSLIN DD *
MODE AMODE(31),RMODE(ANY)
INCLUDE OBJECT
ENTRY AAAA1000
NAME AAAA1000(R)
/*
//*

But I'm getting the below error.

During compile:
---------------
IGYOS4046-I The "RESIDENT" option specification is no longer required The resident runtime library support is always
used.


IGYOS4007-U Unexpected end of file was encountered on "SYSIN". The compilation was terminated.

During Linkedit:
----------------
BATCH EMULATOR JOB(SAMTEST1) STEP(LINKEDIT) PGM= IEWL
IEW2278I B352 INVOCATION PARAMETERS - REUS,MAP,LIST
IEW2322I 1220 1 MODE AMODE(31),RMODE(ANY)
IEW2326E 1221 THE FOLLOWING INVALID RECORD HAS BEEN SEEN: MODE AMODE(31),RMODE
IEW2322I 1220 2 INCLUDE OBJECT
IEW2326E 1221 THE FOLLOWING INVALID RECORD HAS BEEN SEEN: INCLUDE OBJECT
IEW2322I 1220 3 ENTRY AAAA1000
IEW2326E 1221 THE FOLLOWING INVALID RECORD HAS BEEN SEEN: ENTRY AAAA1000
IEW2322I 1220 4 NAME AAAA1000(R)
IEW2326E 1221 THE FOLLOWING INVALID RECORD HAS BEEN SEEN: NAME AAAA1000(R)
IEW2230S 0414 MODULE HAS NO TEXT.
IEW2677S 5130 A VALID ENTRY POINT COULD NOT BE DETERMINED.
IEW2012I 0F09 ALL TEMPNAMES HAVE BEEN USED. THE MODULE CANNOT BE SAVED.
IEW2008I 0F03 PROCESSING COMPLETED. RETURN CODE = 12.

Please help me to resolve the error ASAP...


The link card should start from 2nd column.

//SYSLIN DD *
start below code in second column.
MODE AMODE(31),RMODE(ANY)
INCLUDE OBJECT
ENTRY AAAA1000
NAME AAAA1000(R)
/*
//*

Try this let me know whether you have got your code clean compiled or not.


WebFOCUS 7.6.4, Mainframe Focus
Windows XP, All Output Formats
 
Posts: 135 | Registered: November 30, 2010Report This Post
Gold member
posted Hide Post
Thanks Ann and Vinay.

I made the corrections and ran the job and getting few compilation error.

Below are few errors.



==000001==> IGYDS0002-E A character other than "*", "D", "/" or "-" was found iin column 7. A
blank was assumed.

==000001==> IGYDS0027-S Non-COBOL character(s) were found starting with "." in column 11. The
characters were discarded.
Non-COBOL character(s) were found starting with "." in
characters were discarded.

Non-COBOL character(s) were found starting with "ø" in
characters were discarded.
.
.
.
A "IDENTIFICATION DIVISION" header was not found in this program. It was ***

A "PROGRAM-ID" paragraph was not found. Program-name "CBLNAM01" was assumed.

A severe error was found in the program. The "OPTIMIZE" compiler option was

A character other than "*", "D", "/" or "-" was found in column 7. A blank w

Same message on line: 2 3 4

Non-COBOL character(s) were found starting with "." in column 11. The charac


WebFOCUS 7.6.13

Mainframe
all output (Report in mainframe)
 
Posts: 64 | Registered: February 24, 2010Report This Post
Platinum Member
posted Hide Post
COBOL code is "old fashioned" and it is column dependent.
It seems like you code is not properly aligned.

1:6 are card number
7 is for the comments character / continuation.
8:11 (A Area)for the start of labels and reversed names
12:72 (B Area) are for the "code"

I hope I remember these right. It has been a while since I set up a "drum card" for a key punch. For you newbies that was machine with a keyboard. It made holes in pieces of cardboard, which a computer read. Big Grin

If you are using IBM TSO ISPF edit you can set the edit profile to be COBOL. I believe the command is "NUM ON COB" This will help you get hings right.


Jim Morrow
Web Focus 7.6.10 under Windows 2003
MVS 7.3.3



 
Posts: 129 | Registered: June 01, 2005Report This Post
Platinum Member
posted Hide Post
Poryes, if you could post your code then we could solve your errors soon.


WebFOCUS 7.6.4, Mainframe Focus
Windows XP, All Output Formats
 
Posts: 135 | Registered: November 30, 2010Report This Post
Gold member
posted Hide Post
I have corrected my profile but still I'm facing the errors.

IGYDS1000-E A "IDENTIFICATION DIVISION" header was not found in this program. It was assumed present.
IGYDS1003-E A "PROGRAM-ID" paragraph was not found. Program-name "CBLNAM01" was assumed.
IGYSC3002-I A severe error was found in the program. The "OPTIMIZE"compiler option was cancelled.
IGYDS0027-S Non-COBOL character(s) were found starting with "." in column 11. The characters were discarded.
IGYDS1089-S was invalid. Scanning was resumed at the next
clause.
IGYDS0027-S Non-COBOL character(s) were found starting with "." in column 53. The characters were discarded.
IGYDS0002-E A character other than "*", "D", "/" or "-" was found in column 7. A blank was assumed.
Same message on line: 3 4


WebFOCUS 7.6.13

Mainframe
all output (Report in mainframe)
 
Posts: 64 | Registered: February 24, 2010Report This Post
Platinum Member
posted Hide Post
Do you have the following code in your program?
The below code should start in column 8.
IDENTIFICATION DIVISION.
PROGRAM-ID.   CBLNAME01.


For other errors, please find the commands below.

f all '.' 11 --> this will give you the '.' present in 11th column

f all '.' 53 --> this will give you the '.' present in 53rd column


Make the changes and let me know if there are any more errors.


WebFOCUS 7.6.4, Mainframe Focus
Windows XP, All Output Formats
 
Posts: 135 | Registered: November 30, 2010Report This Post
Gold member
posted Hide Post
Thanks Vinay for the prompt response.

But If I have a load module for the cobol program, Is there any way I can use that in focus?

Any one pls provide the sample code.

Thanks!


WebFOCUS 7.6.13

Mainframe
all output (Report in mainframe)
 
Posts: 64 | Registered: February 24, 2010Report This Post
Platinum Member
posted Hide Post
Is your program got clean compiled?


WebFOCUS 7.6.4, Mainframe Focus
Windows XP, All Output Formats
 
Posts: 135 | Registered: November 30, 2010Report This Post
Gold member
posted Hide Post
Poryes:
One way we have done what you want to do (many years ago), is by putting a copy of the COBOL load module in the FUSELIB PDS (you'd have to find teh actual PDS name in your installation), thus making the COBOL program act like a User written subroutine. We called the COBOL program from within a DEFINE block. A piece of sample code that I have is:

DEFINE FILE HOLD3
OUT_DATE/A15 = ' ' | M570T000(RPT_DATE);
END

Here, the COBOL load module is M570T000 and RPT_DATE was the 01 level of the Linkage section in the program.

Hopefully this helps, or points out some possibilities for you.

- Diptesh


Diptesh
WF 7.1.7 - AIX, MVS
 
Posts: 79 | Location: Warren, NJ, USA | Registered: October 25, 2006Report This Post
Platinum Member
posted Hide Post
Everything you need to know can be found in
"FOCUS for THE IBM Mainframe"
User-Written Subroutine Library The one I have here at home ancient (IBI Document number DN1000026.0291) I do have newer ones but on my desk at work (Unless it been borrowed by a someone Smiler)

You need to study appendix B

I would recommend putting your modules in a separate library and concatenating the two. This way you can keep track of your modules when you upgrade FOCUS.


Jim Morrow
Web Focus 7.6.10 under Windows 2003
MVS 7.3.3



 
Posts: 129 | Registered: June 01, 2005Report This Post
Gold member
posted Hide Post
Thanks all.

I'm going to use the existing load modules in my focexec.

Any sample code pls.


WebFOCUS 7.6.13

Mainframe
all output (Report in mainframe)
 
Posts: 64 | Registered: February 24, 2010Report This Post
Platinum Member
posted Hide Post
The call is the same as for any other function from WebFocus. However the parameters in the call must match the linkage section in YOUR program, you must work out the syntax for yourself.


Jim Morrow
Web Focus 7.6.10 under Windows 2003
MVS 7.3.3



 
Posts: 129 | Registered: June 01, 2005Report This Post
Platinum Member
posted Hide Post
Poyres, any updates? got the output?


WebFOCUS 7.6.4, Mainframe Focus
Windows XP, All Output Formats
 
Posts: 135 | Registered: November 30, 2010Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     CODE Help : Calling COBOL Module

Copyright © 1996-2020 Information Builders