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

Using refer back in PROC


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
krsenthil85

New User


Joined: 31 Aug 2007
Posts: 55
Location: bangalore

PostPosted: Mon Aug 04, 2008 1:28 pm
Reply with quote

Hi,

I want to use the Refer back in dataset name as show below inside a PROC,


Code:
//PROCTEST PROC ENV=G
// PGMI=AB765,       
// DIVA=SORTED.AF,   
// DIVE=SORTED.GE,   
// DIVP=SORTED       



And inside the sorting step I am using those refer back as follows


Code:
//S100     EXEC PGM=SORT
//SORTIN1  DD  DSN=&ENV..AB.&PGMI..ABUGIV.B4.&DIVA(0), 
//                     DISP=SHR                                 
//         DD  DSN=&ENV..AB.&PGMI..ABUGIV.B4.&DIVE(0), 
//                     DISP=SHR                 
//SORTOUT  DD  DSN=GRT.XX.XX.GDG.OUT(+1),
//             DISP=(NEW,CATLG,DELETE),         
//             DCB=(LRECL=396,RECFM=FB),       
//             SPACE=(CYL,(200,200),RLSE),     
//             UNIT=SYSDA                                       
//SYSIN    DD  DSN=GRT.XXXX.XX,DISP=SHR


But the above code is not recognizing the Dataset. Please help me on this to proceed further.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Aug 04, 2008 2:27 pm
Reply with quote

How about posting

a) What you think the result should be
b) What the sysout says the result actually is
Back to top
View user's profile Send private message
ksk

Active User


Joined: 08 Jun 2006
Posts: 355
Location: New York

PostPosted: Mon Aug 04, 2008 2:56 pm
Reply with quote

You are using refer back concept or Symbolic parametrs?
Back to top
View user's profile Send private message
ruodeer

New User


Joined: 06 Jul 2007
Posts: 58
Location: home

PostPosted: Mon Aug 04, 2008 4:41 pm
Reply with quote

you are using the Symbolic parm.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Aug 04, 2008 7:15 pm
Reply with quote

Hello,

Quote:
I want to use the Refer back in dataset name
Why do you believe that you want to use referback? You have not posted a referback. . .

If you answer the questions Expat asked, your answer will soon follow. . .
Back to top
View user's profile Send private message
krsenthil85

New User


Joined: 31 Aug 2007
Posts: 55
Location: bangalore

PostPosted: Tue Aug 05, 2008 12:06 pm
Reply with quote

Hi All,

Sorry for the thing. I am using Symbolic Parm Concept here.

I am expecting just the sorted results in my output dataset, But i want to know whether can i use the multiple symbolic parameter to refer the dataset as shown in the code.

Code:
//SORTIN1  DD  DSN=&ENV..AB.&PGMI..ABUGIV.B4.&DIVA(0),
//                     DISP=SHR 


Thanks in advance to all,
Senthil.
Back to top
View user's profile Send private message
chandan.inst

Active User


Joined: 03 Nov 2005
Posts: 275
Location: Mumbai

PostPosted: Tue Aug 05, 2008 12:29 pm
Reply with quote

Yes you can use Multiple Symbolic parameters in Dataset names
Back to top
View user's profile Send private message
krsenthil85

New User


Joined: 31 Aug 2007
Posts: 55
Location: bangalore

PostPosted: Tue Aug 05, 2008 1:32 pm
Reply with quote

Hi Chandan,

Could you please let us know the syntax if i want to use the symbolic parameter in the middle of some stmt.

//SORTIN1 DD DSN=&ENV..AB.&PGMI..ABUGIV.B4.&DIVA,
// DISP=SHR

Here &PGMI is coming in the middle so i reffered is as &PGMI.(following by .), but jcl is not recoganizing it. So please let me know how to use this here.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Tue Aug 05, 2008 1:35 pm
Reply with quote

here is a link that may help:

publib.boulder.ibm.com/infocenter/zoslnctr/v1r7/topic/com.ibm.zcourses.doc/com.ibm.zcourses.jcl.doc/com.ibm.zcourses.introjcl.doc/index.htm?noframes=true
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Aug 05, 2008 1:36 pm
Reply with quote

Post your output

JCL not recognising it is abaout as useful as a chocolate tea pot
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Aug 05, 2008 7:30 pm
Reply with quote

Hello,

It is rather common to use multiple symbolic parameters on the same jcl statement. . .

Code:
//MYSTUFF  DD DSN=MY.&C.STUFF.A&CEN.&RUNYYMM,DISP=OLD
The "trick" is to know when you might need a double-period so that one is the "terminator" for the symbolic and the other is kept in the statement as a dsn node separator.

As was mentioned before - you need to post your jcl and the actual output when the proc expands.
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Issues Converting From ZD to Signed N... DFSORT/ICETOOL 4
No new posts Back Page print direction (Duplex Pri... JCL & VSAM 3
No new posts Proc print in Mainframe All Other Mainframe Topics 4
No new posts trying to set return code in PROC JCL & VSAM 15
No new posts Execute DSNTEP2 in REXX which is call... CLIST & REXX 4
Search our Forums:

Back to Top