Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Using refer back in PROC

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Using refer back in PROC
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: 8614
Location: Back in jolly old England

PostPosted: Mon Aug 04, 2008 2:27 pm    Post subject:
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    Post subject:
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: 59
Location: home

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

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

Site Director


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

PostPosted: Mon Aug 04, 2008 7:15 pm    Post subject:
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    Post subject:
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: 269
Location: Mumbai

PostPosted: Tue Aug 05, 2008 12:29 pm    Post subject:
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    Post subject:
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: 6970
Location: porcelain throne

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

here is a link that may help:

http://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: 8614
Location: Back in jolly old England

PostPosted: Tue Aug 05, 2008 1:36 pm    Post subject:
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

Site Director


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

PostPosted: Tue Aug 05, 2008 7:30 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. ISREDIT Macro is not returning back t... nico_neoz CLIST & REXX 21 Sat Nov 18, 2017 7:40 pm
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts LIBDEF not working in called proc packerm CLIST & REXX 0 Fri Sep 15, 2017 7:22 pm
No new posts REXX to view the PGM or PROC jackzhang75 CLIST & REXX 11 Tue Jun 20, 2017 1:20 am
No new posts Jcl pram vs proc parms ashek15 JCL & VSAM 3 Thu Mar 30, 2017 6:50 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us