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

How to Convert Character field to COMP-3 field ?


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

New User


Joined: 19 Jul 2006
Posts: 2

PostPosted: Wed Jul 19, 2006 1:20 pm
Reply with quote

I want to convert the input file of 60 length into file of 45 length using SORT.

1. Conversion of PIC X(9) to S9(9) USAGE COMP-3.
2. Eliminate the spaces(Filler)
3 Convert 10 characters of Date field to 8 Characters, eliminating '-'.


Input File:

field -1 PIC X(09)
FILLER X(01)
field -2 PIC X(09)
FILLER X(01)
field -3 PIC X(10)
FILLER X(01)
field -4 PIC X(07)
FILLER X(01)
field -5 PIC X(10)
FILLER X(01)
field -6 PIC X(10)

Output File:
field -1 PIC S9(9) USAGE COMP-3
field -2 PIC S9(9) USAGE COMP-3
field -3 PIC X(10)
field -4 PIC X(07)
field -5 PIC X(10)
field -6 PIC X(08)
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 Jul 19, 2006 8:33 pm
Reply with quote

Here's a DFSORT job that will do what you asked for:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file (FB/60)
//SORTOUT DD DSN=...  output file (FB/45)
//SYSIN    DD    *
  OPTION COPY
  OUTREC FIELDS=(1,9,ZD,TO=PD,LENGTH=5,
                11,9,ZD,TO=PD,LENGTH=5,
                21,10,
                32,7,
                40,10,
                51,10,UFF,M11,LENGTH=8)
/*
Back to top
View user's profile Send private message
Payal Jain

New User


Joined: 19 Jul 2006
Posts: 2

PostPosted: Thu Jul 20, 2006 9:45 am
Reply with quote

Thanks a lot Frank, It worked.
Last part i.e. UFF,M11 is not working and giving abend with syntax error. But i managed to do it directly.

thanks
Payal. icon_smile.gif
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: Thu Jul 20, 2006 8:36 pm
Reply with quote

In order to use UFF, you need z/OS DFSORT V1R5 PTF UQ95214 or DFSORT R14 PTF UQ95213. This PTF has been available since Dec, 2004.
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 Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts Keep leading zero(s) after convert fl... SYNCSORT 7
No new posts COBOL - Move S9(11)v9(7) COMP-3 to -(... COBOL Programming 5
No new posts Join 2 files according to one key field. JCL & VSAM 3
Search our Forums:

Back to Top