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

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


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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
Reply with quote

Check out this link

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
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:

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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Store the data for fixed length COBOL Programming 1
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
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
Search our Forums:

Back to Top