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

sort card required


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

New User


Joined: 20 Nov 2008
Posts: 9
Location: Delhi

PostPosted: Mon Oct 31, 2011 7:30 pm
Reply with quote

I have a flat file with record lenght 1200. I want to extract records based on column numbers. out put records should contains data as
col 3-6 blank space col 26-74 blank splace col 77-end of records.




Thanks!
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Oct 31, 2011 7:36 pm
Reply with quote

What is the Sort product you are using?

What have you tried, where does it go wrong?

Can you provide same input/expected output (in Code tags, please)?

Indicate what you mean by "column".

What is the Recfm?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Oct 31, 2011 7:44 pm
Reply with quote

what happened when You searched the forums with the include/omit keywords...
I am certain that before asking You tried something Yourself, didn' t You ? icon_cool.gif
Back to top
View user's profile Send private message
rajkumarprajapati

New User


Joined: 20 Nov 2008
Posts: 9
Location: Delhi

PostPosted: Mon Oct 31, 2011 7:48 pm
Reply with quote

I am using DFSORT to extarct output records in desire format.
RECFB- FB
Code:

INPUT rec:
CND001 071602   <#DBCD788V01-CONTRACT IDENTIFICATION .....V01-CONTRACT IDENTIFICATION

OUTPUT rec:

COL   
3   6  26                                                74 77
D001 V01-CONTRACT IDENTIFICATION......  v01-TILL END OF RECORDS
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Oct 31, 2011 7:56 pm
Reply with quote

what happened when you tried something yourself
apart sitting doing nothing, waiting for somebody to do the job You are getting paid for ??? icon_evil.gif

the issue is not that difficult that You could not solve it Yourself with a bit of searching ... and lurking in the jcl and dfsort forums
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Oct 31, 2011 8:42 pm
Reply with quote

There is a forum here for DFSORT topics. Next time post in there.

Your requirement is really simple. Have a search for BUILD, for instance.
Back to top
View user's profile Send private message
sqlcode1

Active Member


Joined: 08 Apr 2010
Posts: 577
Location: USA

PostPosted: Tue Nov 01, 2011 11:45 pm
Reply with quote

rajkumarprajapati,
What is the LRECL for the input file?

Quote:
out put records should contains data as
col 3-6 blank space col 26-74 blank splace col 77-end of records.

Did you mean to extract data from 26th position through 74th position and then 77th position through end of record?

If that is the case, your sample input doesn't match expected output shown. 26th through 74th position has below data but that is not what you are showing in the expected output.
Code:
V01-CONTRACT IDENTIFICATION .....V01-CONTRACT IDE


Thanks,
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Nov 01, 2011 11:50 pm
Reply with quote

You were already given a reply for a similar requirement here
www.ibmmainframes.com/viewtopic.php?t=49018&highlight=
why not try something Yourself ?
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: Wed Nov 02, 2011 3:16 am
Reply with quote

rajkumar,

Here's a DFSORT job that will do what I think you're asking for:

Code:

//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=...  input file (FB/1200)
//SORTOUT DD DSN=...  output file (FB/1179)
//SYSIN DD *
  OPTION COPY
  INREC BUILD=(3,4,X,26,49,X,77,1124)
/*
Back to top
View user's profile Send private message
rajkumarprajapati

New User


Joined: 20 Nov 2008
Posts: 9
Location: Delhi

PostPosted: Wed Nov 02, 2011 3:24 pm
Reply with quote

Thank you for help. I got exact solution with following SORT card.

Code:

//SYSIN    DD *                         
  SORT FIELDS=COPY                       
  OUTREC BUILD=(1:3,4,6:26,49,56:77,1260)
/*
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