vignesh vignesh
New User
Joined: 28 Dec 2014 Posts: 2 Location: US
|
|
|
|
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 |
|