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

Hard code a date value in a comp3 column of a file


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

New User


Joined: 09 Jan 2007
Posts: 17
Location: india

PostPosted: Fri Apr 20, 2007 2:38 am
Reply with quote

Hi all,

I need to hard code a date value in a comp3 column of a file.
PIC 9(05) COMP-3

i did a 'hex on' and put the values '04111C' : (for 2004 and day 111)
It is abending with soc7. and i found out that the problem is with this date value i hard coded. i dont know if i have entered correct data in correct format. kindly help.

i file manager it look like below:

Code:
SRV-DT-OF-SERV-L-312(1)
                    #15
                PD 66:3
                 <---+>
                       
                   4111
                    011
                    41C
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Apr 20, 2007 3:01 am
Reply with quote

Hello,

What is abending? The sort or some other program trying to use the file?

Please post the jcl and control statements from the abended run as well as the error output.

Also, please post more of the data record in hex (using the "Code" tab at the top of the reply panel for readability).

This
Quote:

<---+>

4111
011
41C
has me a bit confused. What is the 4111 line - it isn't part of the comp-3 field, right? The 3 bytes of over/under look valid for a 5-digit packed-decimal value.

We're here when you post more info.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Fri Apr 20, 2007 4:32 am
Reply with quote

raj,

It's unclear what you're doing or even what program or language you're using.

If you want to insert a P'04111' value with DFSORT, you can do it in a BUILD parameter in a couple of ways. Examples:

Code:

   INREC BUILD=(...,X'04111C',...)


or

Code:

  INREC BUILD=(...,+4111,TO=PD,LENGTH=3,...)


If that doesn't help, then you need to explain more clearly what you want to do.
Back to top
View user's profile Send private message
prasadvrk

Active User


Joined: 31 May 2006
Posts: 200
Location: Netherlands

PostPosted: Fri Apr 20, 2007 1:59 pm
Reply with quote

It may be abending due to some other reason. First ascertain whether the format of the data you are supplying is correct. Are you sure it expects 04 for year and 111 for the number of the day,
Back to top
View user's profile Send private message
raja1128

New User


Joined: 09 Jan 2007
Posts: 17
Location: india

PostPosted: Fri Apr 20, 2007 11:08 pm
Reply with quote

hi all,

4111
011
41C


First line is just what we see when hex is off.
Actually soc7 was due to a empty file going to next step from the step which takes my file as input. it is not a sort. icon_question.gif
i fixed it.
thank you all for support.

any ways, i am not sure if i had hard coded the s9(5) comp3 value correctly.
is my procedure correct?

regards.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Apr 20, 2007 11:46 pm
Reply with quote

Hello,

Good to hear the problem is fixed icon_smile.gif

Yes, the way you manually created the comp-3 data will work for the field you described.
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 FTP VB File from Mainframe retaining ... JCL & VSAM 3
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top