Creation of cobol subroutine on MVS DataStage

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
ferds999
Premium Member
Premium Member
Posts: 5
Joined: Sun Jan 08, 2006 8:30 pm

Creation of cobol subroutine on MVS DataStage

Post 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.
fgg
dls
Premium Member
Premium Member
Posts: 96
Joined: Tue Sep 09, 2003 5:15 pm

Post 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.
dls
Premium Member
Premium Member
Posts: 96
Joined: Tue Sep 09, 2003 5:15 pm

Post 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.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply