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
 

 

Variable Length file sort to cut the data

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Variable Length file sort to cut the data
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 Moderator


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

PostPosted: Tue Aug 18, 2009 1:16 am    Post subject:
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    Post subject:
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    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 Split file based on comparsion to 2 f... Div Grad DFSORT/ICETOOL 1 Thu Jul 27, 2017 9:16 pm
No new posts Paasing symbolic parameter to instrea... Anirudh Anand JCL & VSAM 1 Thu Jul 27, 2017 1:22 pm
No new posts Passing data from REXX to C programme... chong.zhou CLIST & REXX 3 Wed Jul 26, 2017 9:11 pm
No new posts Passing data from REXX to C programme... chong.zhou All Other Mainframe Topics 0 Wed Jul 26, 2017 4:55 pm
No new posts Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm


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