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
 

 

TOT & DATE parameter in ICEMAN

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: TOT & DATE parameter in ICEMAN
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

Senior Member


Joined: 21 Sep 2010
Posts: 1610
Location: NY,USA

PostPosted: Mon Nov 14, 2016 8:57 am    Post subject:
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: 2164
Location: @my desk

PostPosted: Mon Nov 14, 2016 8:58 am    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7234

PostPosted: Mon Nov 14, 2016 1:46 pm    Post subject: Reply to: TOT & DATE parameter in ICEMAN
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: 2164
Location: @my desk

PostPosted: Mon Nov 14, 2016 6:36 pm    Post subject:
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    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. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm
This topic is locked: you cannot edit posts or make replies. Get correct date and time when curren... balaji81_k DB2 24 Fri Oct 14, 2016 10:40 pm
No new posts How to display value of an exit param... lind sh CICS 2 Sun Oct 09, 2016 12:28 pm
No new posts Change date (DD/MM/YY) in 2nd record ... uday kiran DFSORT/ICETOOL 12 Wed Sep 07, 2016 10:57 pm
No new posts Add system date inside of a PS file a... pramitdas DFSORT/ICETOOL 5 Sun Aug 28, 2016 12:06 am


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