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
 

 

Converting Datatype while adding the Header thru ICETOOL.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
dsivapradeep

New User


Joined: 06 Jul 2012
Posts: 43
Location: INDIA

PostPosted: Mon Nov 11, 2013 11:17 am    Post subject: Converting Datatype while adding the Header thru ICETOOL.
Reply with quote

Hi,

I want to convert the part of the header from one datatype to another while adding the header itself.
Below is the snippet, but this is not working .
Please suggest on the same.

HEADER1=(1:C'00000000',9:DATENS=(4MD),ZD,TO=PD,LENGTH=5)

The code ZD,TO=PD,LENGTH=5 won't work?
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Mon Nov 11, 2013 1:13 pm    Post subject: Reply to: Converting Datatype while adding the Header thru I
Reply with quote

Perhaps your can post your full code and describe what you are trying to do?

HEADER1 is a reporting function.
Back to top
View user's profile Send private message
dsivapradeep

New User


Joined: 06 Jul 2012
Posts: 43
Location: INDIA

PostPosted: Mon Nov 11, 2013 2:15 pm    Post subject: Converting Datatype while adding the Header thru ICETOOL.
Reply with quote

I want to insert header with first 8 charectors as 0's(this I have taken care) and next 5 charectors should contain date(YYYYMMDD) converted in PD format.

I'm not able to code inserting date part.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Mon Nov 11, 2013 3:19 pm    Post subject: Reply to: Converting Datatype while adding the Header thru I
Reply with quote

HEADER1 is a reporting function. Packed-decimal on a report is useless. So you can't do it.

Since you give no further clues...

If you are desperate for the date to be packed, extend your record, temporarily, in the correct place, depending of fixed- or variable-length records, by adding a sequence number which is long enough to hold a unique count for all your records. In OUTFIL, test the count. If it is your starting number (one by default) use / (slash operator) to output your header before your first data record. Remember to remove the sequence number in OUTFIL with BUILD.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Mon Nov 11, 2013 3:43 pm    Post subject: Reply to: Converting Datatype while adding the Header thru I
Reply with quote

what is the reason to have the sticky flag on a topic of so little interest ? icon_cool.gif
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Mon Nov 11, 2013 3:52 pm    Post subject: Reply to: Converting Datatype while adding the Header thru I
Reply with quote

Good question, enrico. It wasn't earlier. Fixing, but not sure how it got that way. I checked and can't see that I accidently did it with my posts (can't see an option) and I didn't edit the question :-)
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Tue Nov 12, 2013 12:00 am    Post subject:
Reply with quote

You can use DATE1P which produces the current in PD format. However it is not available on the reporting feature such as header1. So you just need to put it at the end of record and then chop it off while writing it out.

Ex: If your input has LRECL = 80 and RECFM = FB you can use the following JCL
Code:

//STEP0100 EXEC PGM=SORT         
//SYSOUT   DD SYSOUT=*           
//SORTIN   DD *                 
A                               
B                               
//SORTOUT  DD SYSOUT=*           
//SYSIN    DD *                 
  OPTION COPY                   
  INREC OVERLAY=(81:DATE1P)     
                                 
  OUTFIL REMOVECC,BUILD=(1,80), 
  HEADER1=(8C'0',81,5)           
//*
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
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm
No new posts ICETOOL/SYNCSORT - SYSPRINT output nartcr DFSORT/ICETOOL 17 Wed Oct 05, 2016 10:46 pm
No new posts Adding records from two files into on... shiitiizz SYNCSORT 4 Mon Sep 19, 2016 8:41 pm
No new posts Icetool or Joinkeys example to compar... ishant chauhan DFSORT/ICETOOL 21 Sat Aug 20, 2016 2:40 am
No new posts Converting multiple VB files to FB fi... Viswanath Reddy JCL & VSAM 6 Mon Aug 08, 2016 11:49 pm


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