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 the input file and need to retrive only some fields

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
latheef

New User


Joined: 25 Sep 2009
Posts: 13
Location: chennai

PostPosted: Tue Oct 27, 2009 11:25 am    Post subject: Sort the input file and need to retrive only some fields
Reply with quote

Hi,

I have a requirement. I have an input file length is 630 bytes.
I want to retrieve the following fields CURR-CARD-NO starting position is 546 length is X(19), BILL-CYCLE-DT starting position is 572 length is X(10) and SOLD-TO-AECB-IN starting position is 618 length is X(1) .

I need to create one output file having length 80 bytes. I want to retrieve the above three fields from input file and the remaining 50 bytes will be spaces in the out put record.

I need to do it through JCL only using SORT utility.

Thanks in advance.
Back to top
View user's profile Send private message

karthikr44

Active User


Joined: 25 Aug 2007
Posts: 235
Location: Chennai

PostPosted: Tue Oct 27, 2009 11:40 am    Post subject: Reply to: Sort the input file and need to retrive only some
Reply with quote

Hi,

SORT FIELDS=COPY
OUTREC FIELDS=(546,19,572,10,618,1,49X)

Regards
R KARTHIK
Back to top
View user's profile Send private message
latheef

New User


Joined: 25 Sep 2009
Posts: 13
Location: chennai

PostPosted: Tue Oct 27, 2009 11:44 am    Post subject:
Reply with quote

Thanks KARTHIK.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Tue Oct 27, 2009 1:53 pm    Post subject:
Reply with quote

Hi,

just being picky, shouldn't this
Code:
OUTREC FIELDS=(546,19,572,10,618,1,49X)
be
Code:
OUTREC FIELDS=(546,19,572,10,618,1,50X)


Gerry
Back to top
View user's profile Send private message
latheef

New User


Joined: 25 Sep 2009
Posts: 13
Location: chennai

PostPosted: Tue Oct 27, 2009 2:14 pm    Post subject:
Reply with quote

Yes. Thanks for the reply.
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SYNCSORT SEQNUM and FI fields. nartcr SYNCSORT 5 Sat Jan 21, 2017 4:02 am
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Performing arithmetic on input field zh_lad DFSORT/ICETOOL 31 Tue Dec 06, 2016 8:04 pm


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