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 Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm
No new posts Convert CLIST to REXX cvnlynn CLIST & REXX 12 Tue Jun 27, 2017 2:06 am
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts Alter &DATENS field in HEADER1 Angad DFSORT/ICETOOL 4 Mon Apr 24, 2017 11:49 am
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm


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