Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

create a vsam files, by passing some data to instream data.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
crrindia

Active User


Joined: 02 Jul 2005
Posts: 124
Location: Gurgaon

PostPosted: Fri Nov 11, 2005 3:15 pm    Post subject: create a vsam files, by passing some data to instream data.
Reply with quote

Hi All, I wanted to create 10 vsam files like BAS%%%%..T.STG.BASFENVN. But I wanted to replace some 1234 instead of %%%%. here 1234 is our client ids. like this I wanted to run many clients.
for this could you please let me know how to pass data to this instream data?

for ex. I am giving you some code, please see this and let me know.

Code:
000001 //@58025AB JOB (00000-00521109-001-51-238S),'PRIME MINISTER',         
000002 //         MSGCLASS=S,NOTIFY=&SYSUID,CLASS=F,TIME=6,REGION=8M           
000003 //*        RESTART=STEP002                                               
000004 //*                                                                     
000005 //PROFILE  SET CLIENT=1234             <-- CLIENT NUMBER                 
000006 //*                                                                     
000007 //**********************************************************************
000008 //*                   ALLOCATE TEMP VSAM FILE                          *
000009 //**********************************************************************
000010 //STEP001  EXEC PGM=IDCAMS,                                             
000011 //         COND=(0,LT)                                                   
000012 //SYSPRINT DD SYSOUT=*                                                   
000013 //SYSIN    DD *                                                         
000014    DEFINE CLUSTER                                                      -
000015        (NAME(BAS&CLIENT..T.STAKDUMP.TEMP)                              -
000016        MODEL(BAS&CLIENT..T.STAKDUMP))                                   
000017 //*                                                                     
000018 //**********************************************************************
000019 //*        COPY THE DATA FROM ORG VSAM FILE TO TEMP VSAM FILE          *
000020 //**********************************************************************
000021 //STEP002  EXEC PGM=IDCAMS,                                             
000022 //         COND=(0,LT)                                                   
000023 //SYSPRINT DD SYSOUT=*                                                   
000024 //FILEIN   DD DSN=BAS&CLIENT..T.STAKDUMP,                               
000025 //            DISP=SHR                                                   
000026 //FILEOUT  DD DSN=BAS&CLIENT..T.STAKDUMP.TEMP,                           
000027 //            DISP=OLD                                                   
000028 //SYSIN    DD *                                                         
000029        VERIFY FILE(FILEIN)                                               
000030        IF LASTCC = 0 THEN REPRO INFILE(FILEIN) OUTFILE(FILEOUT)         
000031           ELSE SET MAXCC=0                                               
000032 //*                                                                     
****** **************************** Bottom of Data ****************************
Back to top
View user's profile Send private message

mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Mon Nov 14, 2005 6:15 am    Post subject:
Reply with quote

Check out this link

http://ibmmainframes.com/viewtopic.php?t=921&highlight=submit+jcl

superk (now Kevin) will show you how to write a COBOL pgm that writes JCL to the internal reader.

You can create a file w/the JCL using xxxx for the client where ever it appears in the JCL.

Create an instream file with all the client numbers you want to run a job for. For example:

1234
5678
9012
etc.

Your pgm will read the JCL file for each client found in the in stream file and change the XXXXs to 1234 etc. and write the JCL to the INTRDR file.

You then close and re-open the JCL file and read the next in stream client# rec etc until the in stream file is finished.

This is one way to do it. There may be others.
Back to top
View user's profile Send private message
Kevin

Active User


Joined: 25 Aug 2005
Posts: 234

PostPosted: Mon Nov 14, 2005 9:22 am    Post subject: Re: create a vsam files, by passing some data to instream da
Reply with quote

I'd suggest reading the "z/OS V1R6.0 DFSMS: Using Data Sets" manual, especially Chapter 2.2.3 "Defining a Data Set with JCL", which describes how to define a VSAM dataset using just JCL:

http://publibfp.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/dgt2d430/2.2.3?DT=20040624112123
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
No new posts Fileaid 2 commands instream work. In ... descann Compuware & Other Tools 2 Tue May 16, 2017 3:31 pm
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts Group Data based on a key Arun Raj DFSORT/ICETOOL 7 Thu Apr 27, 2017 11:29 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us