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
 

 

Insert current date in Binary format

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

New User


Joined: 28 Apr 2005
Posts: 99

PostPosted: Fri Feb 23, 2007 5:28 pm    Post subject: Insert current date in Binary format
Reply with quote

Hi

I had to reformat my dataset by appending 20 bytes in front and then input fields.lrec =120

1------------------2021--[input fields]-------------120

The first 20 bytes should have following information

cnt1- 6 bytes PD
Cnt2- 2 bytes ZD
date(yyyymmdd) 4 bytes BI (binary )
Date2(yyyymmdd) 4 bytes BI
Filler 4 bytes

total 20 bytes

Can you give me the syntax to insert Current date in Binary format ?

Deepa
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Fri Feb 23, 2007 10:25 pm    Post subject:
Reply with quote

What are the values for cnt1, cnt2, date2 and filler?

What does the 4-byte binary yyyymmdd date look like in hex - is it just yyyymmdd converted to binary (for example, 20070223 = X'01323F4F')?
Back to top
View user's profile Send private message
Deepa.m
Warnings : 1

New User


Joined: 28 Apr 2005
Posts: 99

PostPosted: Sun Feb 25, 2007 8:26 pm    Post subject:
Reply with quote

Frank,

The values to hold are

Cnt1 - 6 bytes PD value 0
Cnt2 - 2 bytes ZD value 0
Date1(yyyymmdd) 4 bytes BI (binary ) -Current date
Date2(yyyymmdd) 4 bytes BI - Current date
Filler 4 bytes Value Spaces

Yes it is just the yyyymmdd format converted to binary.

I tried many combinations in outrec like DATE1Z,DATE=(MD4,TO=BI,LENGTH=4) ,date3P is also not helpful. .please give the correct syntax.

Thanks,
Deepa.

Thanks a lot!
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Sun Feb 25, 2007 9:49 pm    Post subject:
Reply with quote

Deepa

Here's a DFSORT job that will do what you asked for:

Code:

/S1    EXEC  PGM=ICEMAN
/SYSOUT    DD  SYSOUT=*
/SORTIN DD DSN=...  input file (FB/100)
/SORTOUT DD DSN=... output file (FB/120)
/SYSIN    DD    *
  OPTION COPY
  INREC BUILD=(DATE1,9:1,100)
  OUTREC BUILD=(X'00000000000C',C'00',
    1,8,ZD,TO=BI,LENGTH=4,1,8,ZD,TO=BI,LENGTH=4,4X,
    9,100)
/*
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 TOT & DATE parameter in ICEMAN hemanthj642 DFSORT/ICETOOL 4 Mon Nov 14, 2016 5:19 am
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm
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
No new posts Low values Results from VARCHAR FORMAT balaji81_k DB2 10 Thu Oct 20, 2016 1:18 am
No new posts output data in CSV Format janmejay COBOL Programming 8 Sat Oct 15, 2016 2:20 pm


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