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

Use data of one step to dataset of next step


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

New User


Joined: 06 Jun 2007
Posts: 5
Location: chennai

PostPosted: Thu Jun 07, 2007 12:14 pm
Reply with quote

Hi,

My sortout file contains one dataset name as data. I want to use this dataset into input dataset of next step. Please help me regarding this.
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Thu Jun 07, 2007 12:17 pm
Reply with quote

Whatever you named your dataset in sortout, then allocate the same name to the appropriate DD in the following step.
Back to top
View user's profile Send private message
skkp2006

New User


Joined: 14 Jul 2006
Posts: 93
Location: Chennai,India

PostPosted: Thu Jun 07, 2007 12:18 pm
Reply with quote

Sekumar,

Why dont you ask any of ur peers over there.Forums are the last line of defence :-)

Syam
Back to top
View user's profile Send private message
Devzee

Active Member


Joined: 20 Jan 2007
Posts: 684
Location: Hollywood

PostPosted: Thu Jun 07, 2007 12:30 pm
Reply with quote

Quote:
My sortout file contains one dataset name as data. I want to use this dataset into input dataset of next step

Let me try to understand your question:
In step#1 you have SORT step, and generates sort output file.
In this sort output file there is a record/data which is a dataset name , and you want to use this datase name in the next subsequent steps.

Is this what you are trying to do?
Back to top
View user's profile Send private message
sekumar

New User


Joined: 06 Jun 2007
Posts: 5
Location: chennai

PostPosted: Thu Jun 07, 2007 12:39 pm
Reply with quote

Devzee,

For example My sortoutput file contains following information

A.XXXXX.SORTOUT.D070706.

I just want to use this data as input dataset of next step

//STEP2 EXEC PGM=SORT
//SORTIN DD DSN=A.XXXXX.SORTOUT.D070706.
// DISP=SHR
//SORTOUT DD DSN=A.XXXXX..SORTOUT,
// DISP=(,CATLG,DELETE),
// SPACE=(CYL,(3000,125),RLSE),
// DCB=(RECFM=FB,LRECL=1000)
//SYSIN DD *
SORT FIELDS=COPY
/*
//SYSOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=A


Thanks
Sekumar
Back to top
View user's profile Send private message
bansal

New User


Joined: 03 Jan 2007
Posts: 27
Location: Hyderabad

PostPosted: Thu Jun 07, 2007 12:40 pm
Reply with quote

i agree with syam, this simple stuff u can ask from your peers. U dont need to post this in the forums.

But Since u have asked this, Whatever Expat said is correct


Like Sortout dd dsn=xxx.data1, disp =(new, catlg, catlg)

next step

Sortin dd dsn= xxx.data1,disp=shr
Back to top
View user's profile Send private message
sekumar

New User


Joined: 06 Jun 2007
Posts: 5
Location: chennai

PostPosted: Thu Jun 07, 2007 12:46 pm
Reply with quote

Hi Guys,

I dont mean that the output dataset of previous step to input of next step. My question is, the given dataset is stored as data in SORTOUT of previous step. I just want to that data as input dataset of next step.


Thanks
Sekumar
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Thu Jun 07, 2007 1:28 pm
Reply with quote

You can not dynamically alter the JCL once it has been interpreted by the JES subsystem.

You will either need to use that information to create and submit a new JCL stream, or use a program that can read the file and then use SVC 99 to perform a dynamic allocation.

It looks to me as though the input has a date embedded in it, surely a scheduler software would handle this much more efficiently.
Back to top
View user's profile Send private message
sekumar

New User


Joined: 06 Jun 2007
Posts: 5
Location: chennai

PostPosted: Thu Jun 07, 2007 1:36 pm
Reply with quote

Expat,

Thanks.. As per concern standard, we cannt use dynamic allocation in my JCLs. Please let me know if you have anyother ways to resove it.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Thu Jun 07, 2007 2:13 pm
Reply with quote

sekumar wrote:
As per concern standard, we cannt use dynamic allocation in my JCLs. Please let me know if you have anyother ways to resove it.
Another arbitrary standards/requirements question..... icon_rolleyes.gif
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Thu Jun 07, 2007 2:49 pm
Reply with quote

As previously stated
Quote:
You will either need to use that information to create and submit a new JCL stream, or .............................
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1050
Location: Richmond, Virginia

PostPosted: Thu Jun 07, 2007 6:09 pm
Reply with quote

Your original question was fairly well worded, but not well read by the responders.

If the 2nd step can be in a separate job, then see this link for how to use a JCL INCLUDE card with a SET statement. In job1 you'll need to create the SET statement from the record containing the dsname of interest:

http://www.ibmmainframes.com/viewtopic.php?t=20692&highlight=include+set
Back to top
View user's profile Send private message
Devzee

Active Member


Joined: 20 Jan 2007
Posts: 684
Location: Hollywood

PostPosted: Thu Jun 07, 2007 6:47 pm
Reply with quote

sekumar Try this it should work:
1. Create new step or change your SORT to create dataset name as:
REPRO IDS(A.XXXXX.SORTOUT.D070706) OFILE(OUTD)

2. Create new IDCAMS step - REPRO
//OFILE DD DSN=A.XXX.ACTUAL.DATA
// . ... .
//SSYIN DD DSN=Here specify the control card generated from above step.

3. Use A.XXX.ACTUAL.DATA in subsequent steps.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Thu Jun 07, 2007 8:20 pm
Reply with quote

Hello,

How did the dataset name get into the sortout file?
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Thu Jun 07, 2007 8:22 pm
Reply with quote

Devzee,

Nice one ............. I have used that once before, and it dang slipped the remaining brain cell icon_eek.gif
Back to top
View user's profile Send private message
sekumar

New User


Joined: 06 Jun 2007
Posts: 5
Location: chennai

PostPosted: Mon Jun 11, 2007 5:50 pm
Reply with quote

Devzee,

How should I receive the dataset name...?


Thanks
Sekumar
Back to top
View user's profile Send private message
Devzee

Active Member


Joined: 20 Jan 2007
Posts: 684
Location: Hollywood

PostPosted: Mon Jun 11, 2007 8:12 pm
Reply with quote

Quote:
How should I receive the dataset name...?

I dont understand what you are asking now?
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 db2 vs static data COBOL Programming 1
No new posts batch SFTP job using AOPBATCH unable ... All Other Mainframe Topics 7
No new posts External data queue (changes?) CLIST & REXX 0
No new posts Pull data using date difference betwe... DB2 6
No new posts fast data scrambling PL/I & Assembler 10
Search our Forums:

Back to Top