IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

TOT & DATE parameter in ICEMAN


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

New User


Joined: 14 Sep 2005
Posts: 21

PostPosted: Mon Nov 14, 2016 5:19 am
Reply with quote

Hi,

Can you please help me with the below:

The input file is VB

My requirement is based on the key in position 5 and of length 6 characters. I need to generate the count of records and also the total amount for each key value. Then populate the output file as mentioned below:

1. Previous Days Date in CCYYMMDD format
2. Key value 6 characters in length
3. Count in ZD format and length is 15
4. Amount value in 956 position in PD format (13,2) and the output in the format PD.

I'm unable to get the date and also the amount is in ZD format.

Can this requirement be achieved in one step.
------------------------------------------------------------
Code:

//S1 EXEC PGM=ICEMAN                                 
//SYSOUT   DD SYSOUT=*                               
//SYSPRINT DD SYSOUT=*                               
//DFSMSG   DD SYSOUT=*                               
//*                                                   
//SORTIN  DD DSN=Input File….,DISP=SHR - VB and LRECL= 4100
//OUT1    DD DSN=Output file,     
//           DISP=(NEW,CATLG,DELETE),                 
//           DCB=(RECFM=FB,LRECL=120,BLKSIZE=0),     
//           SPACE=(CYL,(10,10),RLSE)                 
//*                                                   
//SYSIN   DD *                                       
  SORT FIELDS=(9,6,CH,A)                             
  OUTFIL FNAMES=OUT1,VTOF,                           
  NODETAIL,REMOVECC,BUILD=(120X),                     
  SECTIONS=(9,6,                                     
  TRAILER3=(1:DATE=(MD4/),9:9,6,15:C'APPROVED',       
            23:COUNT=(M11,LENGTH=15),                 
            38:TOT=(960,7,PD,LENGTH=8)))             
/*                                                   
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 2567
Location: NYC,USA

PostPosted: Mon Nov 14, 2016 8:57 am
Reply with quote

Quote:
I'm unable to get the date and also the amount is in ZD format

You will have to tell clearly what the exact issue that you are facing, like sample input, expected output should do.
You need to use EDIT to get in ZD in TRAILER3 for TOT. are you sure you need date for every trailer or once as header?
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Mon Nov 14, 2016 8:58 am
Reply with quote

From what you have described above, you can do this in one step and you are almost there.

Does the input PD amount start at position-956? But the card above shows 960. What does this indicate : PD format (13,2)? Can you post the equivalent COBOL field definition?

And for the previous date, you might need to use DATE1-1 in the INREC and use that field in your TRAILER3.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7311
Location: Inside the Matrix

PostPosted: Mon Nov 14, 2016 1:46 pm
Reply with quote

hemanthj642,

For your packed-decimal total, you need to "convert" the result to packed-decimal, by specifying TO=PD.

960,7,PD gives its output as a ZD (with a documented default length).

I despair of the dates. What if your step runs on the "wrong" day? Like a re-run, or in testing of any type? Or the step simply running late.?

If your site is so fantastic that you never do a re-run, you don't need testing, and the batch is always complete on time, then by all means use the system dates.

Arun,

The change in position is due to the variable-length input records. The 13,2 has two decimal-digits as part of the total of 13 digits.

Rohit,

You don't need an EDIT to get ZD, and also TS/OP doesn't even want a ZD.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Mon Nov 14, 2016 6:36 pm
Reply with quote

Quote:
The 13,2 has two decimal-digits as part of the total of 13 digits
I was thinking if it could also mean 9(13)V9(2). Then the length of 7 would make sense only if it is 9(11)V9(2), else yes it would have been 8.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Date conversion using SORT SYNCSORT 4
No new posts Date Conversion Y2T to Y2W SYNCSORT 8
No new posts Date format conversion DFSORT/ICETOOL 4
No new posts Hex Value - vb file replace old date ... DFSORT/ICETOOL 14
No new posts Required Date Format in Include Sort ... DFSORT/ICETOOL 6
Search our Forums:

Back to Top