MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

how to know the calling program

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
enge
Beginner


Joined: 12 Oct 2004
Posts: 78
Topics: 39

PostPosted: Mon Oct 18, 2004 3:38 am    Post subject: how to know the calling program Reply with quote

hello,
i need to know in a var pic x(8 ) ,internal in my routine cobol, the program or routine that called me.

- the calling program is tp or batch.
- no pass in linkage section

is there a way?
thanks
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12372
Topics: 75
Location: San Jose

PostPosted: Mon Oct 18, 2004 7:49 am    Post subject: Reply with quote

Enge,

Please search before posting. Check this link which disucusses the same issue.

http://www.mvsforums.com/helpboards/viewtopic.php?t=145&highlight=External

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
enge
Beginner


Joined: 12 Oct 2004
Posts: 78
Topics: 39

PostPosted: Tue Oct 19, 2004 5:12 am    Post subject: Reply with quote

kolosu,
can you give me an exemple ( code cobol) to invoke CSVQUERY macro?
thank you very much.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12372
Topics: 75
Location: San Jose

PostPosted: Tue Oct 19, 2004 6:54 am    Post subject: Reply with quote

Enge,

Why do you want to take a tough route when an easier solution is readily avaialable? Did you read Hari_uss post in the above link?

Kolusu

Btw my name is spelled as KOLUSU , not kolosu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
enge
Beginner


Joined: 12 Oct 2004
Posts: 78
Topics: 39

PostPosted: Tue Oct 19, 2004 8:24 am    Post subject: Reply with quote

well,
i have a routine that is invoked from 2 distinct programs (pgmA, pgmB).The programs are develop by 2 distinct programmers .
if the first programmer move 'pgmA' in linkage section it's all ok, but if the second programmer move 'pgmA' of pgmB in linkage, i don't want! j must discovered this!
j'd like to want wha call me.
thank you very much.
Back to top
View user's profile Send private message
enge
Beginner


Joined: 12 Oct 2004
Posts: 78
Topics: 39

PostPosted: Wed Nov 24, 2004 5:55 am    Post subject: Reply with quote

eureka!
[code:1:aabe9d3dac]
PRINT NOGEN
**********************************************************************
*
* A0RBCALL - RETURNS THE NAME OF THE CALLER PROGRAM
*
* AUTHOR : FRIENDS
* DATE : NOVEMBRE 2004
*
*
**********************************************************************
*
* INVOKING SYNTAX IN COBOL:
*
* CALL A0RBCALL-NOME USING PROGRAM-NAME RETCODE
*
* WHERE:
*
* 01 A0RBCALL-NAME PIC X(8) VALUE 'A0RBCALL'.
*-----------
* 01 PROGRAM-NAME PIC X(7).
*
* IS THE NAME OF THE CALLER PROGRAM EXCEPT AT THE FIRST LEVEL
* WHERE THIS PARAMETER IS ALL BLANKS
*-----------
* 01 RETCODE PIC S9(8) COMP.
*
* RETURN CODES FROM THE MACRO CSVQUERY
*
* ***[ NOTE ]*******************************************************
*
* * USE ONLY BETWEEN DYNAMIC CALLS IN BATCH MODE
* * FUNZIONA SOLO NEL FORMATO BATCH.
* nel formato attuale riesco a rintracciare il programma cobol "A"
* chiamante al 2
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group