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 

Copy Variable blocked File to Fixed block file.

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
John Corbin
Beginner


Joined: 23 Jan 2004
Posts: 38
Topics: 21

PostPosted: Thu Jan 04, 2007 9:26 am    Post subject: Copy Variable blocked File to Fixed block file. Reply with quote

I have a file in VB format that I want to copy to FB file format. in addition I need to drop the first 2 characters so that the file starts in position 3 when opened.

Can anyone offer a way... ?
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Thu Jan 04, 2007 9:31 am    Post subject: Reply with quote

John Corbin,

Please SEARCH before posting. check this link

http://www.mvsforums.com/helpboards/viewtopic.php?t=5336

Just use OUTREC FIELDS to get the desired fields

Hope this helps...

Cheers

Kolusu
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
John Corbin
Beginner


Joined: 23 Jan 2004
Posts: 38
Topics: 21

PostPosted: Fri Jan 05, 2007 1:43 pm    Post subject: Reply with quote

Tried searching but I gues my search criteria was not clear..

Got it solved using PROCS

Thank you
Back to top
View user's profile Send private message
John Corbin
Beginner


Joined: 23 Jan 2004
Posts: 38
Topics: 21

PostPosted: Fri Jan 05, 2007 2:50 pm    Post subject: Reply with quote

My solution.. note that the source dataset was on tape. The source dataset was DB2 unload of a database table. Each record has the DB2 table ID as part of the record along with the VB blocking factor ( 7 chars in all at the start of each record ).

The main JCL UIW1EHAA
Code:

//UIW1EHAA JOB 85500,'UIW1EHAA',                                       
//         CLASS=T,                                                     
//         MSGCLASS=H,USER=JCORBIN                                     
/*JOBPARM  ROOM=FD02,L=300,TIME=1                                       
//*                                                                     
//*--------------------------------------------------------------------*
//*  UIW1EHAA - REFORMAT RPS DATABASE TABLE INFORMATION                 
//*--------------------------------------------------------------------*
//*                                                                     
//*                                                                     
//PROCS    JCLLIB ORDER=(SYSP.HOST.UA.JCLLIB,                           
//         IW.JCORBIN.ADW.PROCLIB,                                     
//         IW.UIW1.PROCLIB,                                             
//         IW.JCORBIN.ADW.CNTLCARD,                                     
//         CNTRL.HOLD.JCL,                                             
//         PROD0.SYSALL.GLOBAL.PROCLIB)                                 
//JOBLIB   INCLUDE MEMBER=SYJOB00   * JOBLIB                           
//         INCLUDE MEMBER=SYNDVRB0  * ENDEVOR                           
//         INCLUDE MEMBER=AIW1C0C   * ADW RUN INDICATORS               
//*                                                                     
//  EXEC UIW1EH10                                                       
//*                                                                     
//*------------------------END OF JOB UIW1EHAA -------------------------
//*                                                                     

[u][b]Calls PROC UIW1EH10[/b][/u]

//*---------------- SORTOUT FILE --------------------------------------*
//*                                                                     
//SORTOUT  DD DSN=IW.UIW1EH.EXTRACT.TSIC,                               
//            DISP=(NEW,CATLG,DELETE),                                 
//            SPACE=(CYL,(500,50),RLSE),                               
//            UNIT=(SYSDA,10)                                           
//*                                                                     
//*---------------- UNLOADED FILE LAYOUT ----------------------------- 
//*                                                                     
//SYSIN DD DISP=SHR,DSN=IW.JCORBIN.ADW.CNTLCARD(UIW1EHXC)               
//*                                                                     
//*------------------------END OF PROC UIW1EH10-------------------------
//*                                                                     


The PROC references a CNTCARD UIW1EHXC

The original file length was 205 chars long. to convert to FB format I had to drop the first 7 chars of each record.
Code:


  SORT   FIELDS=COPY,DYNALLOC=SYSDA                         
  OUTFIL OUTREC=(7,198),CONVERT                             


In case you are wondering why it was done this way ( I agree it is rather convoluted ), the group I am in supports a production environment that has me doing plenty of on call work. a lot of the JCL we support is written using PROCS and I had no real knowledge of it.

A good learning experience.
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 -> Job Control Language(JCL) 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