IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

program-id to be displayed


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
inbasekarmani
Warnings : 2

New User


Joined: 20 Apr 2007
Posts: 13
Location: chennai

PostPosted: Wed Jun 23, 2010 5:56 pm
Reply with quote

hi ,

I written following code.

IDENTIFICATION DIVISION.
PROGRAM-ID. HAI.
DATA DIVISION.
PROCEDURE DIVISION.
MAIN-PARA.
DISPLAY "MY PROGRAM-ID IS:" PROGRAM-ID.
STOP RUN.

its giving error,anyway is there to store the program-id in a variable and to display.I need "HAI" to be displayed.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Wed Jun 23, 2010 6:05 pm
Reply with quote

though there is a special register WHEN COMPILED
there is no special register for Program-ID.

my experience is that the programmer must create a working-storage field containing the Program name.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Wed Jun 23, 2010 6:08 pm
Reply with quote

In this topic from yesterday I posted code that can be used to obtain all sorts of runtime details, including the program name.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts DB2 Event passed to the Application P... DB2 1
No new posts How to pass the PARM value to my targ... COBOL Programming 8
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
No new posts EZT program to build a flat file with... All Other Mainframe Topics 9
Search our Forums:

Back to Top