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

Converting Datatype while adding the Header thru ICETOOL.


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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

Moderator Emeritus


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

PostPosted: Mon Nov 11, 2013 1:13 pm
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
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

Moderator Emeritus


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

PostPosted: Mon Nov 11, 2013 3:19 pm
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

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Mon Nov 11, 2013 3:43 pm
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

Moderator Emeritus


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

PostPosted: Mon Nov 11, 2013 3:52 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Issues Converting From ZD to Signed N... DFSORT/ICETOOL 4
No new posts Adding QMF and SPUFI to the ISPF menu DB2 20
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts Adding first / last acct numerber to ... DFSORT/ICETOOL 7
No new posts Shift left VB record without x00 endi... DFSORT/ICETOOL 11
Search our Forums:

Back to Top