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
 

 

sort card required

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: sort card required
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Mon Oct 31, 2011 7:36 pm    Post subject: Reply to: sort card required
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Mon Oct 31, 2011 7:44 pm    Post subject: Reply to: sort card required
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Mon Oct 31, 2011 7:56 pm    Post subject: Reply to: sort card required
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Mon Oct 31, 2011 8:42 pm    Post subject: Reply to: sort card required
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: 578
Location: USA

PostPosted: Tue Nov 01, 2011 11:45 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Tue Nov 01, 2011 11:50 pm    Post subject: Reply to: sort card required
Reply with quote

You were already given a reply for a similar requirement here
http://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 Moderator


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

PostPosted: Wed Nov 02, 2011 3:16 am    Post subject:
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    Post subject:
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    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 Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm


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