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
 

 

Creating a sort card with multiconditions

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Creating a sort card with multiconditions
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    Post subject: Re: Creating a sort card with multiconditions
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    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 Innovations in Your Mainframe Sort Arun Raj PC Guides & IT News 4 Wed Mar 15, 2017 10:38 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts SORT requirement sjiraga COBOL Programming 6 Thu Mar 09, 2017 9:11 pm
No new posts SORT to append Month and YEAR in MMYY... tisamf DFSORT/ICETOOL 1 Wed Mar 08, 2017 4:46 pm
No new posts JCL sort Match and NoMatch rakeshsekar1987 SYNCSORT 2 Thu Feb 02, 2017 10:26 pm


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