Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Subtract the ZD fields to provide neg... Balaryan DFSORT/ICETOOL 4 Wed Oct 11, 2017 10:51 pm
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us