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
 

 

PL/I calling subprogram from main program

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
View previous topic :: :: View next topic  
Author Message
satya123
Warnings : 1

New User


Joined: 18 Aug 2006
Posts: 57

PostPosted: Tue Jul 17, 2007 1:49 pm    Post subject: PL/I calling subprogram from main program
Reply with quote

No i am submitting sub program first and return code is 0

step-1 ---- compiling the subprogram first

SUB2:PROCEDURE OPTIONS(MAIN);
DCL A FIXED BIN EXT;
A=200;
PUT SKIP LIST('INSIDE SUB2',A);
END SUB2;

with following JCL

//DOPROC EXEC PROC=PLICOMP
//PLI.SYSIN DD DSN=X.PLI.JCL(SUB2),DISP=SHR
//LKED.SYSLMOD DD DSN=X.PLI.LOAD(SUB2),DISP=SHR
//LKED.SYSLIB DD
// DD DSN=X.PLI.OBJ,DISP=SHR
//*
//

step-2 ------compiling the main program next

Main Program is

SEC1:PROCEDURE OPTIONS(MAIN);

DCL SUB2 ENTRY;

SUB:PROCEDURE;
DCL A FIXED BIN EXT;
A=100;
PUT SKIP LIST('INSIDE SUB',A);
END SUB;
/* */
CALL SUB;
CALL SUB2;
END SEC1;

with following JCL

//DOPROC EXEC PROC=PLICOMP
//PLI.SYSIN DD DSN=X.PLI.JCL(SEC1),DISP=SHR
//LKED.SYSLMOD DD DSN=X.PLI.LOAD(SEC1),DISP=SHR
//LKED.SYSLIB DD
// DD DSN=X.PLI.OBJ,DISP=SHR
//*
//

WHEN I SUBMIT THIS IT IS SHOWING follwing error

IEW2456E 9207 SYMBOL SUB2 UNRESOLVED. MEMBER COULD NOT BE INCLUDED FROM THE DESIGNATED CALL LIBRARY

IEW2638S 4321 AN EXECUTABLE VERSION OF MODULE SEC1 EXISTS AND CANNOT BE REPLACED BY THE NON-EXECUTABLE MODULE JUST
CREATED.

IEW2008I 0F03 PROCESSING COMPLETED. RETURN CODE = 12.

thanks please guide me
Back to top
View user's profile Send private message

maks

New User


Joined: 22 Jun 2007
Posts: 7
Location: bangalore

PostPosted: Wed Aug 29, 2007 4:34 pm    Post subject: Reply to: PL/I calling subprogram from main program
Reply with quote

how come sub2 is a subprogram when u r specifying OPTIONS(MAIN) for it..
one main program cannot call another main program.
Back to top
View user's profile Send private message
satya123
Warnings : 1

New User


Joined: 18 Aug 2006
Posts: 57

PostPosted: Wed Aug 29, 2007 5:07 pm    Post subject:
Reply with quote

in my subprogram i can call another sub program then what do i write??

please correct me...

satya123
Back to top
View user's profile Send private message
maks

New User


Joined: 22 Jun 2007
Posts: 7
Location: bangalore

PostPosted: Thu Aug 30, 2007 10:51 am    Post subject: Reply to: PL/I calling subprogram from main program
Reply with quote

please remove MAIN from ur subprogram and then try.
Back to top
View user's profile Send private message
satya123
Warnings : 1

New User


Joined: 18 Aug 2006
Posts: 57

PostPosted: Thu Aug 30, 2007 1:52 pm    Post subject:
Reply with quote

Thanks alot.... Yesterday i tried and it is working perfectly..

satya123
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 -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts I can not compile my program PL1 V3.R... Miguel Fernandez PL/I & Assembler 13 Tue Dec 06, 2016 8:30 pm
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm


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