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

Variable Length file sort to cut the data


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kedianirmal

New User


Joined: 08 Feb 2008
Posts: 82
Location: Bangalore, India

PostPosted: Tue Aug 18, 2009 12:25 am
Reply with quote

Hi,

I have a variable block file of lenght 8264, which contains three three type of records:
Header length 48
Trailer Lenght 28
Data record lenght 8264.

The detail record is divided in four parts:
Length: 153 3500 3500 1100 7 (8260 + 4(VB file))
Record Data1 Array1 Array2 Array3 Data

I have to cut the file as follows:
Length: 153 2000 2000 1100 7 (5260 + 4(VB file))
Record Data1 Array1 Array2 Array3 Data

The array3 is not fully filled and hence can have any lenght of data the array variable is Pic X(11) .

Can somebody help how can i achieve this.

Thanks,
Nirmal
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Tue Aug 18, 2009 1:16 am
Reply with quote

You can use a DFSORT job like the following to do what you asked for:

Code:

//S1    EXEC  PGM=SORT
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file (VB/8264)
//SORTOUT DD LRECL=5264,DSN=...  output file (VB/5264)
//SYSIN    DD    *
  OPTION COPY
   INREC IFTHEN=(WHEN=(1,2,BI,GT,48),
      BUILD=(1,4,5,153,158,2000,3658,2000,7158))
/*
Back to top
View user's profile Send private message
kedianirmal

New User


Joined: 08 Feb 2008
Posts: 82
Location: Bangalore, India

PostPosted: Thu Aug 20, 2009 12:24 am
Reply with quote

Thanks Frank,
The sort is working fine....
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Store the data for fixed length COBOL Programming 1
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top