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

Can I write symbolic parameter in sortout file


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

New User


Joined: 06 Mar 2009
Posts: 8
Location: Pune

PostPosted: Wed Jun 30, 2010 3:17 pm
Reply with quote

Hi,

My requirement is to write symbolic parameter in sortout file. As

Code:
//STEP030  EXEC PGM=SORT                                           
//SYSOUT   DD SYSOUT=*                                             
//SORTIN   DD DSN=ZRP..C&YR.&MTH..C&CYCL.T&CTN..SV&PRCID,
//         DISP=SHR
//SORTOUT  DD DSN=ZRP..C&YR.&MTH..C&CYCL.T&CTN..SV&PRCID..SRTD1,
//     DISP=(,CATLG,DELETE),                                     
//     SPACE=(CYL,(50,50),RLSE)                             
//SYSIN    DD   *


????????

Here &YR = 10, &MTH = 06, &CYCL = 01 and & CTN = 01

means I want in output file. These parameter are not fixed (these are coming from another job).

10 06 01 01 --------(other data)
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Wed Jun 30, 2010 3:38 pm
Reply with quote

You must use a program of your own design that accepts those symbolic variables through a PARM= statement and writes them out to a dataset in whatever manner you need.
Back to top
View user's profile Send private message
shivkumar

New User


Joined: 06 Mar 2009
Posts: 8
Location: Pune

PostPosted: Wed Jun 30, 2010 4:06 pm
Reply with quote

My requirement is thru JCL.

Especially thru SORT
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


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

PostPosted: Wed Jun 30, 2010 6:08 pm
Reply with quote

Your requirement is unclear.

Do you want the symbolics stored as contents of the file or do you want to use the symbolics in the name of the file - or both?

You don't specify the DCB information for either file or give any clue as to content.

Garry.
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: Wed Jun 30, 2010 8:12 pm
Reply with quote

Hello,

How are these parameters getting into "this" job from the other job?

You have a scrap of jcl that references some symbolics, but there is no info as to how these are presented to this run? Is this one step in a PROCedure? Something else?
Back to top
View user's profile Send private message
shivkumar

New User


Joined: 06 Mar 2009
Posts: 8
Location: Pune

PostPosted: Thu Jul 01, 2010 4:33 pm
Reply with quote

Garry & Dick,

I want symbolic content to be in file. All these symbolic parameter will come from different job. So I don't have control on these.

This is a job; which will send symbolic parameter & triggered by another job. e.g.

JOB1 will take up &YR , &MTH, &CYCL and &CTN values and passes to JOB2. And JOB2 will have write step (pls check my first post).

My requirement is to column wise Print these Symbolic parameter into output file and other data.
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 Jul 01, 2010 5:18 pm
Reply with quote

I'm still confused. What are you trying to achieve?

Quote:
JOB1 will take up &YR , &MTH, &CYCL and &CTN values and passes to JOB2.
I don't understand this. How can a job send a symbolic parameter to another job?

How would you propose that a step in a submitted job would access its own JCL in order to see the parameters used?

Garry.
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: Thu Jul 01, 2010 7:06 pm
Reply with quote

Hello,

It is not yet clear what you want/need. I believe you know what you are looking for, but so far, we do not. . .

Why is there a need to put the "symbolic content" into a file? How will this file be used?

You need to take the time to completely explain what you have and precisely what needs to be done with it.

Quote:
My requirement is to column wise Print these Symbolic parameter into output file and other data.
This will be best explained with the "rules" and examples.
Back to top
View user's profile Send private message
shivkumar

New User


Joined: 06 Mar 2009
Posts: 8
Location: Pune

PostPosted: Tue Jul 13, 2010 3:47 pm
Reply with quote

Guys,

Sorry for lot of confusion for my post. Actually my requirement was to write a symbolic parameter content into file.

Example:

//STEP030 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=ZRP..C&YR.&MTH..C&CYCL.T&CTN..SV&PRCID,
// DISP=SHR
//SORTOUT DD DSN=ZRP..C&YR.&MTH..C&CYCL.T&CTN..SV&PRCID..SRTD1,
// DISP=(,CATLG,DELETE),
// SPACE=(CYL,(50,50),RLSE)
//SYSIN DD *

In above JCL ...I used input file as 'ZRP..C&YR.&MTH..C&CYCL.T&CTN..SV&PRCID'

At the time of execution, JCL will pick the symbolic parameter and read the input file as 'ZRP.C1007.C01T01.SVP020' .

My Requirement is to write ..1007 01 01 P020 in output file.
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Tue Jul 13, 2010 3:51 pm
Reply with quote

I still stand by my original answer.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Tue Jul 13, 2010 4:23 pm
Reply with quote

shivkumar wrote:
At the time of execution, JCL will pick the symbolic parameter and read the input file as 'ZRP.C1007.C01T01.SVP020' .
Are these symbolic values gonna be constant? If not, how does it get changed everytime when the job runs?

shivkumar wrote:
My Requirement is to write ..1007 01 01 P020 in output file.
Where and how this file is going to be used down the line?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Tue Jul 13, 2010 4:58 pm
Reply with quote

shivkumar,

symbolic parameters are resolved by jes during initiation of job
but, symbolic parameters contained within a sysin, etc are not resolved.

As SuperK said, you need to write your own to do this.

suggest a google search on CLCCDSNS
Back to top
View user's profile Send private message
Pete Wilson

Active Member


Joined: 31 Dec 2009
Posts: 580
Location: London

PostPosted: Mon Aug 16, 2010 10:55 pm
Reply with quote

could be a following REXX step to list matching files and pull the relevant bits from the list of dsnames returned into a file to pass on....
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 How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Access to non cataloged VSAM file JCL & VSAM 18
Search our Forums:

Back to Top