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
 

 

Adding $ and , and . in the output file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Adding $ and , and . in the output file
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    Post subject:
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    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
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm


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