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

Convert VB DATASET to FB DATASET using IEBGENER or IDCAMS


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

Moderator Emeritus


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

PostPosted: Fri Jun 06, 2008 2:39 am
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: 1702
Location: Australia

PostPosted: Fri Jun 06, 2008 7:29 am
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: 8796
Location: Welsh Wales

PostPosted: Fri Jun 06, 2008 11:24 am
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: 1702
Location: Australia

PostPosted: Fri Jun 06, 2008 11:29 am
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
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: 8796
Location: Welsh Wales

PostPosted: Fri Jun 06, 2008 12:08 pm
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
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: 8796
Location: Welsh Wales

PostPosted: Fri Jun 06, 2008 12:17 pm
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

Moderator Emeritus


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

PostPosted: Fri Jun 06, 2008 7:10 pm
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: 206
Location: Bangalore

PostPosted: Fri Jun 06, 2008 9:47 pm
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: 1702
Location: Australia

PostPosted: Sat Jun 07, 2008 6:34 am
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: 206
Location: Bangalore

PostPosted: Mon Jun 09, 2008 7:51 pm
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

Moderator Emeritus


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

PostPosted: Mon Jun 09, 2008 9:13 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts batch SFTP job using AOPBATCH unable ... All Other Mainframe Topics 7
No new posts CONVERT a given date from UTC TO BST CICS 0
No new posts Reading Empty Dataset DFSORT/ICETOOL 5
No new posts Mainframe Dataset Binary or ASCII Mainframe Interview Questions 4
No new posts SPOOL to Mainframe dataset in batch mode JCL & VSAM 7
Search our Forums:

Back to Top