MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Putting header in a VSAM file

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
crazyanand
Beginner


Joined: 29 Apr 2004
Posts: 1
Topics: 1

PostPosted: Sat May 08, 2004 4:06 am    Post subject: Putting header in a VSAM file Reply with quote

I need to put a header record (all zeroes) in a VSAM file (Fixed length; LRECL=41)...I tried EXEC PGM=IEBDG but found that its only for sequential files..How to achieve this? I am wondering if we can use SORT utility for this??
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Sat May 08, 2004 10:26 am    Post subject: Reply with quote

Here's one way to do this with DFSORT's ICETOOL:

Code:

//S1    EXEC  PGM=ICETOOL
//TOOLMSG   DD  SYSOUT=*
//DFSMSG    DD  SYSOUT=*
//IN DD DSN=... VSAM file
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(,PASS)
//T2 DD DSN=&&T2,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(,PASS)
//CON DD DSN=*.T1,VOL=REF=*.T1,DISP=(OLD,PASS)
//    DD DSN=*.T2,VOL=REF=*.T2,DISP=(OLD,PASS)
//OUT DD DSN=... VSAM file
//TOOLIN DD *
* IN->T1: Create a header record with 41 zeros in seq file T1
* IN->T2: Copy the VSAM records to seq file T2
  COPY FROM(IN) USING(CTL1)
* T1/T2 -> OUT:  Copy the header record and original records
* from the seq files to the VSAM file
  COPY FROM(CON) TO(OUT)
/*
//CTL1CNTL DD *
  OUTFIL FNAMES=T1,ENDREC=1,OUTREC=(41Z)
  OUTFIL FNAMES=T2
/*

_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group