Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 IDCAMS RENAMING VSAM FILE ALONG WITH ... upendrasri JCL & VSAM 11 Tue Apr 17, 2018 10:42 pm
No new posts 3270 Data stream error Benchwarmer CICS 6 Tue Apr 17, 2018 12:06 am
No new posts How to list data set names with diffe... murali.andaluri CLIST & REXX 8 Thu Apr 12, 2018 11:33 pm
No new posts VSAM file NOT Found error while proce... SumaReva CICS 5 Wed Apr 11, 2018 9:54 pm
No new posts converting a mainframe file with ASA ... Lynne Schuler All Other Mainframe Topics 5 Wed Apr 04, 2018 9:44 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us