MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Removing dot from the Input record

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
karthik_1505
Beginner


Joined: 15 Jun 2005
Posts: 12
Topics: 5

PostPosted: Mon Jul 25, 2005 5:44 am    Post subject: Removing dot from the Input record Reply with quote

Hi,

I have the input file like below.

Code:

----+----1----+----2----+----3----+----4----+----5----+----6----
********************************* Top of Data
00276FAIRBANKS             GORDON B          10.00  140.00
05561VASQUEZ               WENDY F           10.00  140.00
14994WELLS                 ROBERT D          7.00   98.00
16300DALTON                JOSEPH W          7.00   98.00


I need to write the Output file, after removing the '.' but still maintain the record length of 80. Also depending on the price field, the '.' may occur any where in the record between coloumn 46 to 60.

my output needs to be

Code:

----+----1----+----2----+----3----+----4----+----5----+----6----
********************************* Top of Data
00276FAIRBANKS             GORDON B          1000  14000
05561VASQUEZ               WENDY F           1000  14000
14994WELLS                 ROBERT D          700   9800
16300DALTON                JOSEPH W          700   9800


Can someone let me know how to do it using OUTREC. Thanks.

Karthik

P.S: I searched in the Posts couldn't find it. Thanks.
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Mon Jul 25, 2005 10:29 am    Post subject: Reply with quote

I've used ubb code tags to make your data more readable, but I'm not sure if that's the way it actually looks. Are the numeric values in the input record actually left aligned (e.g. 7.00b) as shown rather than right aligned (e.g. b7.00)? Do you want the numeric values in the output record left aligned as shown rather than right aligned?

The first numeric value starts in 46. What is its length (7 bytes? 6 bytes? 5 bytes?).
The second numeric values starts in 52. What is its length (7 bytes? 6 bytes? 5 bytes?)
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
karthik_1505
Beginner


Joined: 15 Jun 2005
Posts: 12
Topics: 5

PostPosted: Tue Jul 26, 2005 12:20 am    Post subject: Reply with quote

Frank,

Yes, The values are Left Aligned.

First numeric value starts at 46 of the length 7 bytes.
Second one starts at 53 of length 7 bytes.

Actually, if I can get the left aligned value 10.00 as '0001000' (with leading zeros) starting col 46, that ll be good. Same case with the value starts at 53 as well.

Thanks,
Back to top
View user's profile Send private message
Cogito-Ergo-Sum
Advanced


Joined: 15 Dec 2002
Posts: 637
Topics: 43
Location: Bengaluru, INDIA

PostPosted: Tue Jul 26, 2005 12:33 am    Post subject: Reply with quote

karthik,
Here is a DFSORT step that will do. Note that, it requires z/OS DFSORT PTF UQ95214 or DFSORT R14 PTF UQ95213 (Dec, 2004).
Code:

//STEP1    EXEC PGM=SORT                                   
//SYSIN    DD *                                             
 OPTION COPY                                               
 OUTREC FIELDS=(1,45,46,7,UFF,TO=ZD,53,7,UFF,TO=ZD)         
/*                                                         
//SORTIN   DD *                                             
00276FAIRBANKS             GORDON B          10.00  140.00 
05561VASQUEZ               WENDY F           10.00  140.00 
14994WELLS                 ROBERT D          7.00   98.00   
16300DALTON                JOSEPH W          7.00   98.00   
/*                                                         
//SORTOUT  DD SYSOUT=*                                     
//SYSOUT   DD SYSOUT=*                                     


Output:
Code:

00276FAIRBANKS             GORDON B          00010000014000
05561VASQUEZ               WENDY F           00010000014000
14994WELLS                 ROBERT D          00007000009800
16300DALTON                JOSEPH W          00007000009800

_________________
ALL opinions are welcome.

Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes.
Back to top
View user's profile Send private message
karthik_1505
Beginner


Joined: 15 Jun 2005
Posts: 12
Topics: 5

PostPosted: Tue Jul 26, 2005 12:55 am    Post subject: Reply with quote

Cogito,

Below is the step I'm running,

//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=JEP.FO480.DOE843.DATA,DISP=SHR
//SORTOUT DD DSN=JEP.FO480.DOE843.DATA.OUT,DISP=SHR
//SYSIN DD *
OPTION COPY
OUTREC FIELDS=(1,45,46,7,UFF,TO=ZD,53,7,UFF,TO=ZD)
/*


Error : WER268A OUTREC STATEMENT : SYNTAX ERROR

As I understand Syncsort is not available in Z/oS (in our shop). Is there any other way to do it?

Thanks,
Back to top
View user's profile Send private message
Cogito-Ergo-Sum
Advanced


Joined: 15 Dec 2002
Posts: 637
Topics: 43
Location: Bengaluru, INDIA

PostPosted: Tue Jul 26, 2005 1:19 am    Post subject: Reply with quote

I coded a DFSORT step above as I am a DFSORT user. I am sorry, I could not be of help to you with Syncsort.
_________________
ALL opinions are welcome.

Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes.
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Tue Jul 26, 2005 10:37 am    Post subject: Reply with quote

Karthik,

DFSORT supports the UFF format. Syncsort does not support the UFF format.
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Tue Jul 26, 2005 10:41 am    Post subject: Reply with quote

Cogito,

You can use OVERLAY to simplify your DFSORT job further:

Code:

//STEP1    EXEC PGM=SORT   
//SYSOUT   DD SYSOUT=*
//SORTIN   DD *                                             
00276FAIRBANKS             GORDON B          10.00  140.00 
05561VASQUEZ               WENDY F           10.00  140.00 
14994WELLS                 ROBERT D          7.00   98.00   
16300DALTON                JOSEPH W          7.00   98.00   
/*                                                         
//SORTOUT  DD SYSOUT=*           
//SYSIN    DD *                                             
  OPTION COPY                                               
  INREC OVERLAY=(46:46,7,UFF,TO=ZD,53,7,UFF,TO=ZD)         
/*                                       

_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
karthik_1505
Beginner


Joined: 15 Jun 2005
Posts: 12
Topics: 5

PostPosted: Wed Jul 27, 2005 4:21 am    Post subject: Reply with quote

Cogito/Frank,

Thanks for the inputs.

Karthik
Back to top
View user's profile Send private message
Cogito-Ergo-Sum
Advanced


Joined: 15 Dec 2002
Posts: 637
Topics: 43
Location: Bengaluru, INDIA

PostPosted: Wed Jul 27, 2005 5:25 am    Post subject: Reply with quote

You are welcome, Karthik.
_________________
ALL opinions are welcome.

Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group