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

Pass different values thru a variable


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
archer_denny

New User


Joined: 11 Jun 2009
Posts: 8
Location: Atlanta, GA

PostPosted: Thu Aug 12, 2010 6:09 pm
Reply with quote

Is it possible to pass different values thru a variable from multiple JCLs to the Sort Card present in common proc?

Denny

Let me know if you need an example!
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Thu Aug 12, 2010 6:31 pm
Reply with quote

Does using the SYMNAMES DD statement give you what you're looking for?
Back to top
View user's profile Send private message
archer_denny

New User


Joined: 11 Jun 2009
Posts: 8
Location: Atlanta, GA

PostPosted: Thu Aug 12, 2010 6:45 pm
Reply with quote

Using SYMNAMES DD statement not worked for this criteria

Thanks in advance
Denny

Used SYMNAMES DD st to pass Jobname present in JCLs
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Thu Aug 12, 2010 6:53 pm
Reply with quote

Quote:
Let me know if you need an example!


An example of what you're trying would probably be useful....

Garry.
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Thu Aug 12, 2010 6:59 pm
Reply with quote

The only way I know of to pass data, to be used by a specific program, if that program is not designed to use input parameters from a PARM= statement, from jobs into a common PROC, is to include them in a dataset that the program can access and read.
Back to top
View user's profile Send private message
archer_denny

New User


Joined: 11 Jun 2009
Posts: 8
Location: Atlanta, GA

PostPosted: Thu Aug 12, 2010 7:07 pm
Reply with quote

thanks for imm replies....

My scenario...

JCL's

JCL1 - AAJOB

SET INP-VAR1 = 'ADAY1'
INP-VAR2 = 'AAJOB' (MEANS JOBNAME)

JCL2 - BBJOB

INP-VAR1 = 'BBDY1' (its not typo)
INP-VAR2 = 'BBJOB'

JCL3 - CCJOB

INP-VAR1 = 'CCDY1'
INP-VAR2 = 'CCJOB'

PROC - XXPROC

INPUT FILE - FB/80

DATE JOBNAME
081110 AAAAA
081210 ADAY1
081310 ADAY1
081310 AAJOB
081810 AAJOB
082010 AAJOB
081110 AAAAA
081710 AAJOB
081810 BBJOB
081810 BBDY1
081910 BBDY1
082110 AAAAA
081110 CCDY1
081210 CCDY1
081510 CCDY1
081110 CCCCC
081110 DDDDD
082110 CCJOB
082710 CCJOB

FOR JCL1 - OUTPUT

081210 ADAY1
081310 ADAY1
081310 AAJOB
081810 AAJOB
081810 AAJOB
082010 AAJOB


FOR JCL2 - OUTPUT

081810 BBDY1
081910 BBDY1
081810 BBJOB

FOR JCL3 - OUTPUT

081110 CCDY1
081210 CCDY1
081510 CCDY1
082110 CCJOB
082710 CCJOB

Thanks in advance
Denny
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Thu Aug 12, 2010 7:31 pm
Reply with quote

That looks like a scenario where Kevin's suggestion to use SYMNAMES would be ideal.

Code:

//your-procedure    PROC THISJOB=
//     EXEC DFSORT   
//SYMNAMES DD DISP=SHR,DSN=ctrl.card.dataset(&THISJOB)
//*



and run your jobs as
Code:
//AAJOB JOB  ......
//   EXEC your-procedure,THISJOB=AAJOB


&JOB resolves to AAJOB or BBJOB etc

where, say, AAJOB contains
INP_VAR1,C'ADAY1'
INP_VAR2,C'AAJOB'

Garry.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Thu Oct 28, 2010 2:40 am
Reply with quote

With z/OS DFSORT V1R10 PTF UK90025 or z/OS DFSORT V1R12 PTF UK90026 (Oct, 2010), you can use SET and PROC symbols in DFSORT control statements. For example, if you had SET statements like this:

Code:

// SET INPVAR1='ADAY1'   
// SET INPVAR2='AAJOB'   


or like this

Code:

// SET INPVAR1='BBDY1'
// SET INPVAR2='BBJOB'


or any other values for INPVAR1 and INPVAR2, you could use them in an INCLUDE statement for a DFSORT job like this:

Code:

//S1 EXEC PGM=SORT,
//  PARM='JP1"&INPVAR1",JP2"&INPVAR2"'
//SYSOUT DD SYSOUT=*
//SYMNOUT DD SYSOUT=*
//SORTIN DD DSN=...  input file
//SORTOUT DD DSN=...  output file
//SYSIN DD *
  OPTION COPY
  INCLUDE COND=(8,5,CH,EQ,JP1,OR,8,5,CH,EQ,JP2)
/*


For complete details on the new DFSORT and ICETOOL functions available with the Oct, 2010 PTF, see:

www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000242
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts How to pass the PARM value to my targ... COBOL Programming 8
No new posts Dynamically pass table name to a sele... DB2 2
Search our Forums:

Back to Top