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 INVALID FIELD OR CONSTANT IN SORTOF ?? Ron Klop DFSORT/ICETOOL 8 Wed Jan 11, 2017 3:44 pm
No new posts Performing arithmetic on input field zh_lad DFSORT/ICETOOL 31 Tue Dec 06, 2016 8:04 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Convert +9999999999999.99 to S9(12)V9(3) vnktrrd DFSORT/ICETOOL 8 Thu Nov 17, 2016 8:15 pm


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