Page 1 of 1

Creation of cobol subroutine on MVS DataStage

Posted: Wed Feb 08, 2006 3:51 pm
by ferds999
I was trying to make an external subroutine cobol program on MVS but I was having problem with source and target. What would be my source stage and target stage. You see, I am a cobol programmer before and I know the data have to be passed thru linkage section in and out. Do I have to manually code this subroutine.

I have no problem calling an subroutine from the calling program. I can use the external routine stage or I can use external source and external stage. The only problem as I said would be how to create the sub-routine in the MVS. Please help.

Posted: Wed Feb 08, 2006 4:47 pm
by dls
As you said, the External Routine stage can be used to invoke an existing routine.

As I understood your question, though, you want to use DS390 to generate the code for a subroutine.

Although I've never done it, it's conceivable to do so. There are 4 or 5 points in the program that the tool allows you to insert copy statements; e.g, at the end of WS, at the beginning of the Procedure Division, and at the end of the Procedure Division, etc.

If I recall, there are several copy members that are installed with the product for this purpose.

Sorry, I don't have access to DS390 to experiment. I will take a look at the documentation later, though, and let you know if I find any further references.

Posted: Wed Feb 08, 2006 4:55 pm
by dls
I found the documentation.

Check the Code Customization topic (esp. the use of the ARDT.... copy members) in the Mainframe Job Developers Guide.

I hope this helps.

If you're a cobol programmer, you may opt to create and test your subroutine outside of DS.

Posted: Wed Feb 08, 2006 11:15 pm
by ray.wurlod
To the best of my knowledge DataStage EE MVS does not have the ability to create COBOL subroutines. The External Routine stage allows existing routines to be called. One of its properties is the library containing that routine. I believe you're seeking like Create mainframe routine (to go with Create server routine or Create parallel routine). Bed news, I'm afraid.