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
 
Pass different values thru a variable

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Pass different values thru a variable
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

Moderator Team Head


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

PostPosted: Thu Aug 12, 2010 6:31 pm    Post subject: Reply to: Dynamic sort
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    Post subject: Reply to: Dynamic sort
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

Active Member


Joined: 08 May 2006
Posts: 998
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Thu Aug 12, 2010 6:53 pm    Post subject:
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

Moderator Team Head


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

PostPosted: Thu Aug 12, 2010 6:59 pm    Post subject: Reply to: Pass different values thru a variable
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    Post subject: Reply to: Pass different values thru a variable
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

Active Member


Joined: 08 May 2006
Posts: 998
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Thu Aug 12, 2010 7:31 pm    Post subject:
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 Moderator


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

PostPosted: Thu Oct 28, 2010 2:40 am    Post subject:
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:

http://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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Extend the decimal values in DIVISION Balaryan DFSORT/ICETOOL 3 Thu Oct 05, 2017 4:05 pm
No new posts Working with hex values in Filemanage... Emile Straker IBM Tools 0 Tue Sep 12, 2017 1:42 am
No new posts DB2 NULL Values display V S Amarendra Reddy DB2 3 Thu Sep 07, 2017 6:59 pm
No new posts Moving values to a variable of copybo... Vignesh Sid COBOL Programming 6 Wed Sep 06, 2017 1:04 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm

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