Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Change a position

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

New User


Joined: 03 Jan 2007
Posts: 14
Location: Sweden

PostPosted: Thu Jan 04, 2007 2:17 pm    Post subject: Change a position
Reply with quote

Hi again

This time I have a question about replacing one position. The position can contain hexvalues C0-C9 or D0-D9. If it's C0 or D0 I want it to be F0 and so on C9/D9 to F9

File is VB lrecl 133
Back to top
View user's profile Send private message

William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Thu Jan 04, 2007 2:19 pm    Post subject:
Reply with quote

Sort has a translate function, but is sounds like you want to make a zoned decimal number with a sign, unsigned?
Back to top
View user's profile Send private message
Garpen

New User


Joined: 03 Jan 2007
Posts: 14
Location: Sweden

PostPosted: Thu Jan 04, 2007 2:25 pm    Post subject: Re: Change a position
Reply with quote

Your assumption is correct. We receive the file from a customer who have a date stored as a signed field, now they want that data loaded into a DATE-column in DB2 icon_confused.gif
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1191
Location: Bangalore,India

PostPosted: Thu Jan 04, 2007 2:25 pm    Post subject:
Reply with quote

Hi Garpen,

This can be done using change option but you please provide 1 example by giving i/p & op .

Dont forget to tell byte postion of that field
Back to top
View user's profile Send private message
Garpen

New User


Joined: 03 Jan 2007
Posts: 14
Location: Sweden

PostPosted: Thu Jan 04, 2007 2:41 pm    Post subject: Re: Change a position
Reply with quote

Here is a record from the file :

0200000000000050201055232006103A000?00ABEH 001

It's the bold A(hex C1) I want to change, in this case to hex F1
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1191
Location: Bangalore,India

PostPosted: Thu Jan 04, 2007 2:53 pm    Post subject:
Reply with quote

Hi there,


Code:
OPTION COPY                                 
OUTFIL OUTREC=(1:1,35,                       
36:36,1,CHANGE=(1,C'A',C'1'),NOMATCH=(36,1),
37:37,101) 


Here I assumed that Bold A is coming at 36th byte including 4 byte of RDW.
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: Thu Jan 04, 2007 10:28 pm    Post subject:
Reply with quote

Garpen,

Here's a DFSORT job that will do what you asked for for all of the values X'C0'-X'C9' and X'D0'-X'D9'. For negative values (D sign), we multiply the value by -1 to get a positive value and use TO=ZD to get an F sign. For positive values (C sign), we use TO=ZD to get an F sign. I assumed the byte you want to change is at position 36.

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file (VB/133)
//SORTOUT DD DSN=...  output file (VB/133)
//SYSIN    DD    *
  OPTION COPY
  INREC IFTHEN=(WHEN=(36,1,ZD,LT,+0),
           OVERLAY=(36:36,1,ZD,MUL,-1,TO=ZD,LENGTH=1)),
        IFTHEN=(WHEN=NONE,OVERLAY=(36:36,1,ZD,TO=ZD,LENGTH=1))
/*
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 Cannot change DATACLAS on DFSMSdss re... Alan Playford JCL & VSAM 10 Tue May 01, 2018 6:43 pm
No new posts Repeat Sequence Number Until change i... rahulabvp DFSORT/ICETOOL 6 Thu Mar 29, 2018 12:51 pm
No new posts can we hardcode a value in db2 load c... ram_vizag DB2 2 Wed Feb 28, 2018 11:04 pm
No new posts How to change the logon screen info o... sakthikumarT TSO/ISPF 4 Fri Dec 29, 2017 6:44 pm
No new posts Change NULL indicator in UNLOAD utility Khadhar Basha DB2 2 Fri Dec 15, 2017 3:01 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us