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 

Create a new record from VBM file

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


Joined: 12 Jun 2003
Posts: 16
Topics: 8

PostPosted: Tue Aug 12, 2003 3:31 pm    Post subject: Create a new record from VBM file Reply with quote

Hi there,

How do i create a new record to an input file which is VBM format?
I know the contents of the new record, which is constant always. The record is:

Code:


HEADER OF THE FILE



I know how to create a new record if it was a FB file? Used Outrec Statement in Sort. How do I create the same new record if the file is VBM, because i dont know what to code for positions 1 through 5.

I have Syncsort.

Thanks
Back to top
View user's profile Send private message
Cogito-Ergo-Sum
Advanced


Joined: 15 Dec 2002
Posts: 637
Topics: 43
Location: Bengaluru, INDIA

PostPosted: Wed Aug 13, 2003 1:44 am    Post subject: Reply with quote

I do not have access to m/f right now. But, if I am not mistaken, it might be

OUTREC FIELDS=(6:C'HEADER OF THE FILE')

Or, maybe it is,

OUTREC FIELDS=(1,4,6:C'HEADER OF THE FILE')

If you want any specific machine character, then maybe you can code that too at the 5th position.
_________________
ALL opinions are welcome.

Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes.
Back to top
View user's profile Send private message
coolman
Intermediate


Joined: 03 Jan 2003
Posts: 283
Topics: 27
Location: US

PostPosted: Wed Aug 13, 2003 3:02 am    Post subject: Reply with quote

Newuser,
Why not just go into the file and manually type the information? This is out of curiosity as Im not able to appreciate why would you want to use Sort for this.

Cheers,
Coolman.
________
XT500


Last edited by coolman on Sat Feb 05, 2011 1:26 am; edited 1 time in total
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Wed Aug 13, 2003 12:06 pm    Post subject: Reply with quote

newuser,

you can use the report feature HEADER1 to create a header record.try this

Code:

//STEP0100  EXEC  PGM=SORT     
//SYSOUT    DD SYSOUT=*         
//SORTIN    DD DSN=YOUR INPUT FILE,
//             DISP=SHR         
//SORTOUT   DD DSN=YOUR OUTPUT FILE,
//             DISP=(NEW,CATLG,DELETE)
//             UNIT=SYSDA,
//             SPACE=(CYL,(X,Y),RLSE)
//SYSIN     DD *                 
  SORT FIELDS=COPY               
  OUTFIL HEADER1=('MY HARD CODED HEADER')
/*



Hope this helps...

cheers

kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
newuser
Beginner


Joined: 12 Jun 2003
Posts: 16
Topics: 8

PostPosted: Wed Aug 13, 2003 1:11 pm    Post subject: Reply with quote

Kolusu,

My input file is VBM 214 format. I tried coding the Header statement, but it abended saying "Incompatible RECFM"

Code:


//STEP0100 EXEC PGM=SORT                                   
//SYSPRINT  DD SYSOUT=*                                     
//SYSOUT    DD SYSOUT=*                                     
//SORTIN    DD DSN=BJ67FT.TEST,                     
//             DISP=SHR                                     
//SORTOUT   DD DSN=BJ67FT.TEST.OUTPUT,                     
//         DCB=(RECFM=VBM,LRECL=214,BLKSIZE=0),             
//         UNIT=DASD,SPACE=(214,(150,50),RLSE),AVGREC=K,   
//             DISP=(,CATLG),RETPD=20                       
//SYSIN     DD *                                           
  SORT FIELDS=COPY                                         
  OUTFIL HEADER1=('MY HARD CODED HEADER')                   
/*                                                         

Code:

SYNCSORT  3.7DR  TPF3  US PATENTS: 4210961,5117495, OTHER PAT. PEND. (C) 1998 S
                                              z/OS   1.2.0   CPU MODEL 2064   
SYSIN :                                                                       
  SORT FIELDS=COPY                                                             
  OUTFIL HEADER1=('MY HARD CODED HEADER')                                     
WER164B  5,680K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,             
WER164B     0 BYTES RESERVE REQUESTED, 1,180K BYTES USED                       
WER146B  20K BYTES OF EMERGENCY SPACE ALLOCATED                               
WER108I  SORTIN   :  RECFM=VBM  ; LRECL=   214; BLKSIZE= 32760                 
WER107A  SORTOUT  RECFM INCOMPATIBLE WITH REPORT WRITING                       
WER110I  SORTOUT  :  RECFM=VBM  ; LRECL=   214; BLKSIZE= 27998                 


Thanks
Back to top
View user's profile Send private message
newuser
Beginner


Joined: 12 Jun 2003
Posts: 16
Topics: 8

PostPosted: Wed Aug 13, 2003 4:52 pm    Post subject: Reply with quote

As Cogito provided, just coded as,

Code:


//OUTREC=(1,5,C'Header...'




Not sure, but I am getting X'01' for machine control character, which is what I wanted and so.....Don't know, what values are it having for RDW...Works for me and so I am happy Smile

Coolman, this isnot just one record, otherwise I would have manually edited....Its a huge file and I am inserting this record based on condition and hence the JCL solution

Thanks Cogito and Kolusu!
Back to top
View user's profile Send private message
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