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
 

 

Conversion from Variable to Fixed

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
praveensn

New User


Joined: 30 Jul 2008
Posts: 32
Location: Pune

PostPosted: Fri Jan 09, 2009 4:22 pm    Post subject: Conversion from Variable to Fixed
Reply with quote

Hi,

I am having 3 files with different record lengths say,
1st file with record length:100
2nd file with record lenght :150
3rd file with record length: 40

All three are of Variable block.

And I want these 3 files to be concatenated/merged in to single file of maximum length which will be a fixed block record.

Could you please provide me the solution for this with the JCL ASAP.

This is bit urgent.

Thanks in advance,
Praveen.N
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 Jan 09, 2009 4:46 pm    Post subject:
Reply with quote

praveensn

Do certain fields from the different files need to be alligned, or is this a straight copy of the data asis with no internal movements.

Concatenated is different from merged. If this is really a merge, on what keys is the merge to be performed.

What have you tried so far, and what results did you get ?

Quote:
This is bit urgent.

It maybe urgent, but only for you. Please remember that forum members do this in their own time.
Back to top
View user's profile Send private message
praveensn

New User


Joined: 30 Jul 2008
Posts: 32
Location: Pune

PostPosted: Fri Jan 09, 2009 5:09 pm    Post subject:
Reply with quote

Hi,

Apoligies for that,


This is a straight copy of the three files in to one output file.

I have tried to copy the 2 input files of different record lengths, where one is of 240 and another is 479 in to an output file of 600 record length through VTOF (Variable to Fixed).

Please find the JCL for this.

Code:

//STEP040   EXEC PGM=SORT                                                         
//SYSOUT    DD SYSOUT=*
//SORTIN    DD DSN=nupyn24.DB2NAT.DISK200,DISP=SHR         
//          DD DSN=nupyn24.DB2NAT.DISk700C,DISP=SHR         
//SORTOUT   DD DSN=nupys45.SORT.OUTPUT1,                   
//             DISP=(,CATLG,DELETE),UNIT=SYSDA,               
//             SPACE=(CYL,(300,100),RLSE)                   
//SYSIN     DD  *                                           
  SORT FIELDS=(5,470,CH,A)                                 
  OUTFIL FNAMES=SORTOUT,VTOF,                               
  OUTREC=(1,600)                                           
/*                                                         


Here nupyn24.DB2NAT.DISK200 is of record length 240 and

nupyn24.DB2NAT.DISk700C is 479 record length.

And i am trying to copy the data of the 2 files in to
nupys45.SORT.OUTPUT1 which is of 600 length but not able to do so.

I am getting the below error.

RECORD TYPE IS V - DATA STARTS IN POSITION 5
END OF SORTOUT FIELD BEYOND MAXIMUM RECORD LENGTH

Thanks,
Praveen.N
Back to top
View user's profile Send private message
praveensn

New User


Joined: 30 Jul 2008
Posts: 32
Location: Pune

PostPosted: Fri Jan 09, 2009 5:11 pm    Post subject:
Reply with quote

Adding to the above both the records are Variable block and I want them to convert it to a fixed block of maximum say 600 record length.

Thanks,
Praveen.N
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Fri Jan 09, 2009 10:34 pm    Post subject:
Reply with quote

Here's a DFSORT job that will do what you asked for. Since you said you wanted to do a COPY, I used OPTION COPY rather than SORT. I assumed you didn't want to keep the RDW of the VB files so I used 5,475. The trick is to specify p,m according to the maximum LRECL and then use 600:X to pad the records out.

Code:

//STEP040   EXEC PGM=SORT
//SYSOUT    DD SYSOUT=*
//SORTIN    DD DSN=nupyn24.DB2NAT.DISK200,DISP=SHR
//          DD DSN=nupyn24.DB2NAT.DISK700C,DISP=SHR
//SORTOUT   DD DSN=nupys45.SORT.OUTPUT1,
//             DISP=(,CATLG,DELETE),UNIT=SYSDA,
//             SPACE=(CYL,(300,100),RLSE)
//SYSIN     DD  *
  OPTION COPY
  OUTFIL VTOF,BUILD=(5,475,600:X)
/*
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 Jan 09, 2009 10:47 pm    Post subject: Reply to: Conversion from Variable to Fixed
Reply with quote

I suppose there was some reason for posting the same question multiple times within such a short time frame icon_sad.gif

The other has been locked. . .

d
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Fri Jan 09, 2009 10:54 pm    Post subject:
Reply with quote

Dick,

I deleted the dup thread after you locked it. No reason to keep it.
Back to top
View user's profile Send private message
praveensn

New User


Joined: 30 Jul 2008
Posts: 32
Location: Pune

PostPosted: Tue Jan 13, 2009 11:16 am    Post subject:
Reply with quote

Frank,


Thanks a lot for the JCL, it is working fine.


Thanks,
Praveen.N
Back to top
View user's profile Send private message
praveensn

New User


Joined: 30 Jul 2008
Posts: 32
Location: Pune

PostPosted: Wed Feb 11, 2009 7:45 pm    Post subject:
Reply with quote

Hi All,

I had one more query,

I am having 3 files with different record lengths say,
1st file with record length:100
2nd file with record lenght :150
3rd file with record length: 40

All three are of Variable block.

And I want these 3 files to be concatenated/merged in to single output file which is also a variable block.


Thanks in advance,
Praveen.N
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7931
Location: Bellevue, IA

PostPosted: Wed Feb 11, 2009 7:52 pm    Post subject:
Reply with quote

Use IDCAMS, SORT, IEBGENER, ... with input as 3 concatenated files and output is one file with LRECL at least as long as longest input file LRECL.
Back to top
View user's profile Send private message
praveensn

New User


Joined: 30 Jul 2008
Posts: 32
Location: Pune

PostPosted: Wed Feb 11, 2009 8:17 pm    Post subject:
Reply with quote

Robert,

Thanks a lot.

Its working fine now.

Regards,
Praveen.N
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts Conversion of a VB file to FB. isssal DFSORT/ICETOOL 1 Mon Oct 31, 2016 10:23 pm
No new posts Format to pipe delimited with variabl... pshongal SYNCSORT 6 Wed Sep 14, 2016 2:48 pm
No new posts EBCDIC to ASCII conversion using OCOPY mistah kurtz All Other Mainframe Topics 5 Tue Sep 06, 2016 2:26 pm
No new posts Comparex utility to Syncsort conversion mistah kurtz SYNCSORT 11 Fri Jul 22, 2016 1:53 pm


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