IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search Log in to check your private messages Log in
 

Adding $ and , and . in the output file


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

New User


Joined: 28 Dec 2014
Posts: 2
Location: US

PostPosted: Mon Dec 29, 2014 2:41 am
Reply with quote

Hi All,

I'm new to this forum. So, this is my first topic posted here. I have already googled on this but no luck.So, finally i have planned to post it here. Kindly help me on this.

I tried the following code and got the result as i mentioned below. I want to produce $s in ($$$,$$$,$$$,$$9.99) and # in (ZZZ,ZZZ,ZZ9) this format.I want to add , $ and . (Decimal) in the below values.

Code:


//STEP01   EXEC  PGM=ICEMAN,COND=(0,NE)
//SYSPRINT DD SYSOUT=*
//SYSOUT   DD SYSOUT=*
//SORTIN   DD DSN=XYZ,DISP=SHR
//SORTOUT  DD DSN=ABCD,
//             DISP=(NEW,CATLG,DELETE),
//             SPACE=(CYL,(0,1),RLSE),
//             DCB=(RECFM=FB,LRECL=34,BLKSIZE=0)
//SYSIN  DD    *
OPTION COPY
OUTREC IFTHEN=(WHEN=(8,1,CH,EQ,C'$'),
          BUILD=(1,16,17,18,UFF,ADD,51,18,UFF,LENGTH=18)),
        IFTHEN=(WHEN=(8,1,CH,EQ,C'#'),
          BUILD=(1,23,24,11,UFF,ADD,58,11,UFF,LENGTH=11))
/*

Input File:

YYYYYY $:           $77,290,280.37YYYYYY $:            $77,290,280.37
XXXXXX $:           $56,394,919.37XXXXXX $:            $56,394,919.37
YYYYYY #:                  909,956YYYYYY #:                   909,956
XXXXXX #:                  407,035XXXXXX #:                   407,035
YYYYYY $:           $71,026,263.79YYYYYY $:            $71,026,263.79
XXXXXX $:           $57,088,020.56XXXXXX $:            $57,088,020.56
YYYYYY #:                   92,307YYYYYY #:                    92,307
XXXXXX #:                   52,262XXXXXX #:                    52,262


Expected Output:

YYYYYY $:           $15,458,056,0.74
XXXXXX $:           $11,278,983,8.74
YYYYYY #:                  181,991,2
XXXXXX #:                    814,079
YYYYYY $:           $14,205,252,7.58
XXXXXX $:           $11,417,604,1.12
YYYYYY #:                    184,614
XXXXXX #:                    104,524

Actual Report:

YYYYYY $:           15458056074
XXXXXX $:           11278983874
YYYYYY #:               1819912
XXXXXX #:                814079
YYYYYY $:           14205252758
XXXXXX $:           11417604112
YYYYYY #:                184614
XXXXXX #:                104524



I couldn't be able to perform this in DFSORT. So,I tried the above code with with edit mask field.But it's not supported in our shop.So,finally tried the same code with ICETOOL utility but no idea of using edit mask field.I saw that we can implement this in DISPLAY with HEADER for masking. In my case, i'm getting the header value from the input itself. Even if we try to implement this in icetool with header value, i need to put header with respective value.

Kindly help me on this.

Thanks,
vs
Back to top
View user's profile Send private message
vignesh vignesh

New User


Joined: 28 Dec 2014
Posts: 2
Location: US

PostPosted: Mon Dec 29, 2014 4:06 am
Reply with quote

Please forgive me on this.By mistakenly, when i was coding it i missed to place close bracket once the edit mask field added. This is what caused the issue for creating the expected report.

Thanks,
vs
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Forum Replies
No new posts COBOL VS SORT Utility for file format... COBOL Programming 6
No new posts How to find which file contains my se... DFSORT/ICETOOL 6
No new posts IGZ0035S THERE WAS AN UNSUCCESSFUL OP... COBOL Programming 3
No new posts Hex Value - vb file replace old date ... DFSORT/ICETOOL 14
No new posts Related to using a file in comparison JCL & VSAM 7

Back to Top