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
 

 

Convert VB DATASET to FB DATASET using IEBGENER or IDCAMS

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

New User


Joined: 14 Apr 2008
Posts: 15
Location: chennai

PostPosted: Thu Jun 05, 2008 9:15 pm    Post subject: Convert VB DATASET to FB DATASET using IEBGENER or IDCAMS
Reply with quote

Help me to copy from a VB dataset to an FB dataset using IEBGENER or IDCAMS without using SORT.
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Jun 06, 2008 2:39 am    Post subject:
Reply with quote

Hello surya and welcome to the forums,

Who comes up with these "requirements". . .? Surely this is no business requirement. . . . Please tell whoever came up with the "without using SORT" rule that they have excluded the best way to copy a file (if there is any concern for performance).

I don't recall being able to do this with IEBGENER (without writing an exit), but if it can be done, someone will reply.

Over the years, i've completely gotten away from IDCAMS for anything execpt catalog and vsam things. It performs poorly.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Fri Jun 06, 2008 7:29 am    Post subject:
Reply with quote

Hi,
here is a piece of code using IEBGENER

Code:
//COPY     EXEC PGM=IEBGENER                                           
//SYSPRINT DD SYSOUT=*                                                 
//SYSIN    DD *                                                         
  GENERATE MAXFLDS=1                                                   
  RECORD FIELD=(129,1,,1)                                               
//SYSUT1   DD DSN=INPUT FILE VB=133                 ,                   
//            DISP=SHR                                                 
//SYSUT2   DD DSN=OUTPUT FILE,                                         
//            DISP=(,CATLG,DELETE),                                     
//            UNIT=SYSDA,                                               
//            SPACE=(TRK,(600,10),RLSE),                               
//            DCB=(RECFM=FB,LRECL=129)                                 


Short records will be padded out with binary zeroes.


Gerry
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri Jun 06, 2008 11:24 am    Post subject:
Reply with quote

Well, I'm with Dick on this one. You just can not beat SORT !!!
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Fri Jun 06, 2008 11:29 am    Post subject:
Reply with quote

Hi Expat,

I agree with you but they did say no SORT.


Gerry
Back to top
View user's profile Send private message
sdurvasu

New User


Joined: 14 Apr 2008
Posts: 15
Location: chennai

PostPosted: Fri Jun 06, 2008 12:02 pm    Post subject: Hi all,
Reply with quote

Can't we do that IEBCOPY also? i just want to know all the possibilities thats'it ..
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri Jun 06, 2008 12:08 pm    Post subject:
Reply with quote

No, IEBCOPY is a PDS utility.

So why is there a restriction on using the fastest and easiest tool available.

Just a thought though, if you can not use SORT why not try ICETOOL icon_biggrin.gif
Back to top
View user's profile Send private message
sdurvasu

New User


Joined: 14 Apr 2008
Posts: 15
Location: chennai

PostPosted: Fri Jun 06, 2008 12:15 pm    Post subject:
Reply with quote

we are using one tool that will write jcl based on requirements ,now we have to add one more step at the bottom,
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri Jun 06, 2008 12:17 pm    Post subject:
Reply with quote

sdurvasu wrote:
we are using one tool that will write jcl based on requirements ,now we have to add one more step at the bottom,


Yes, but what has this to do with converting a VB dataset to FB ?

ICETOOL code - may need changing as this extracts from a 2044 VB record into an 80 FB record.

Code:

//ICETOOL  EXEC PGM=ICETOOL                                     
//TOOLMSG  DD SYSOUT=*                                         
//DFSMSG   DD SYSOUT=*                                         
//INFILE   DD DSN=INPUT DATASET,DISP=SHR                       
//OUFILE   DD DSN=OUTPUT DATASET,                               
//            DISP=(,CATLG,DELETE),                             
//            SPACE=(CYL,(10,10),RLSE),RECFM=FB,LRECL=80       
//TOOLIN   DD *                                                 
  COPY FROM(INFILE)  TO(OUFILE)  USING(COPY)                   
/*                                                             
//COPYCNTL DD *                                                 
* LRECL DEFAULTS TO LENGTH OF SELECTED FIELDS + SPACES         
* 80:X SETS LRECL TO 80 WITH C' ' FILLER FROM DATA END TO POS 80
 OPTION  VLLONG                                                 
 INCLUDE COND=(9,1,EQ,C'M'),FORMAT=CH                           
 OUTFIL  FNAMES=OUFILE,CONVERT,OUTREC=(29,44,80:X),VLFILL=C' ' 
/*                                                             
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Jun 06, 2008 7:10 pm    Post subject:
Reply with quote

Hello,

Quote:
we are using one tool that will write jcl based on requirements ,now we have to add one more step at the bottom,
I believe we all understand that a new step is being added. What we do not understand is why this new step should not be the sort product icon_confused.gif
Back to top
View user's profile Send private message
Ajay Baghel

Active User


Joined: 25 Apr 2007
Posts: 205
Location: Bangalore

PostPosted: Fri Jun 06, 2008 9:47 pm    Post subject: Reply to: Convert VB DATASET to FB DATASET using IEBGENER or
Reply with quote

Hi gcicchet,

Should not the statement RECORD FIELD=(129,1,,1) actually be:
RECORD FIELD=(129,5,,1) because data in input VB file actually starts from column 5?

//COPY EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
GENERATE MAXFLDS=1
Quote:
RECORD FIELD=(129,1,,1)

//SYSUT1 DD DSN=INPUT FILE VB=133 ,
// DISP=SHR
//SYSUT2 DD DSN=OUTPUT FILE,
// DISP=(,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(TRK,(600,10),RLSE),
// DCB=(RECFM=FB,LRECL=129)

Thanks,
Ajay
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Sat Jun 07, 2008 6:34 am    Post subject:
Reply with quote

Hi Ajay,

I tested my code, did you ?

Some programs work different to others, they allow for the 4 bytes.



Gerry
Back to top
View user's profile Send private message
Ajay Baghel

Active User


Joined: 25 Apr 2007
Posts: 205
Location: Bangalore

PostPosted: Mon Jun 09, 2008 7:51 pm    Post subject:
Reply with quote

Hi gcicchet,

You are right . I tested it and it is working your way. But still:

RECORD FIELD=(Lengthofinputfield,position_in_input,,position_in_output)

I don't understand why IEBGENER is ignoring the fact that there is a RDW in the col1 instead of data in the input file.

-Ajay
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Jun 09, 2008 9:13 pm    Post subject:
Reply with quote

Hello,

Different utilities - different "rules".

Maybe think of it as the difference between logical and physical position_in_input.
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 How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Convert +9999999999999.99 to S9(12)V9(3) vnktrrd DFSORT/ICETOOL 8 Thu Nov 17, 2016 8:15 pm
This topic is locked: you cannot edit posts or make replies. Db2 SQL query to convert rows into co... subratarec DB2 5 Thu Nov 17, 2016 4:51 pm
No new posts FTP - JCL failed while passing FTP co... Suneetha1612 JCL & VSAM 12 Wed Nov 16, 2016 7:33 pm
No new posts convert PD to ZD ram_vizag DFSORT/ICETOOL 5 Sat Nov 05, 2016 3:06 am


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