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

Creating a sort card with multiconditions


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

New User


Joined: 16 Oct 2007
Posts: 7
Location: pune

PostPosted: Wed Nov 23, 2011 9:24 pm
Reply with quote

Hi ,

I want to create a sort card which executes multiple conditions like the below.

I have a input file of 285 length which has a header starting with T . Need to split this file into three.

first file having 1:568 ( possible by coding outrec)
second file ( backup of inp without header, possible by including all records without first char 'T')

the third file which is having data from length 1:14 and 580 to 685 of input file. I need to append a header for this file and should format it to make it a Tab delimited file.

Thanks and regards,
Nithya
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Thu Nov 24, 2011 12:04 am
Reply with quote

Nithya Usha Mohanan wrote:
Hi ,
I have a input file of 285 length which has a header starting with T . Need to split this file into three.

the third file which is having data from length 1:14 and 580 to 685 of input file. I need to append a header for this file and should format it to make it a Tab delimited file.

Thanks and regards,
Nithya


Nithya,

If your input file is only 285 bytes , how do you plan to create the 3rd with data from bytes 580? for a length of 106 bytes? was that a typo? is it meant to be 280 to 285? Assuming that it is a typo , use the following DFSORT JCL which will give you the desired results.

Code:

//STEP0100 EXEC PGM=SORT   
//SYSOUT   DD SYSOUT=*     
//SORTIN   DD DSN=your input FB 285 byte file,DISP=SHR
//OUT1     DD SYSOUT=*     
//OUT2     DD SYSOUT=*     
//OUT3     DD SYSOUT=*     
//SYSIN    DD *           
  SORT FIELDS=COPY                                   
  OUTFIL FNAMES=OUT1,OVERLAY=(568:X)                 
  OUTFIL FNAMES=OUT2,OMIT=(1,1,CH,EQ,C'T')           
  OUTFIL FNAMES=OUT3,
  IFTHEN=(WHEN=(1,1,CH,EQ,C'T'),                     
  BUILD=(C'COLUMN HEADER1',X'05',C'HEAD2')),         
  IFTHEN=(WHEN=NONE,BUILD=(1,14,X'05',280,6))       
//*
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 Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
Search our Forums:

Back to Top