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

Sort the input file and need to retrive only some fields


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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
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
Reply with quote

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

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Tue Oct 27, 2009 1:53 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
Search our Forums:

Back to Top