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
 

 

How to Convert Character field to COMP-3 field ?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: How to Convert Character field to COMP-3 field ?
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 Moderator


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

PostPosted: Wed Jul 19, 2006 8:33 pm    Post subject:
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    Post subject: Thanks
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 Moderator


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

PostPosted: Thu Jul 20, 2006 8:36 pm    Post subject:
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    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 Splitting a report based on a field abdulrafi DFSORT/ICETOOL 6 Thu Mar 23, 2017 6:56 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts outrec field outside range Danielle.Filteau SYNCSORT 10 Sat Mar 04, 2017 2:37 am
No new posts the use of 'B3'x character in a panel Pedro TSO/ISPF 1 Thu Feb 16, 2017 3:09 am


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