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
 
how to overlay

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

New User


Joined: 29 Nov 2005
Posts: 66
Location: Bangalore

PostPosted: Mon May 05, 2008 3:28 pm    Post subject: how to overlay
Reply with quote

I have a file in packed decimal format (comp3)

My condition is to check the input file for a

accttype =200 and sub account = 20

if i find one , the out file should have the new acc number 300 instead of 200.

File length si 18 bytes.

how do accomplish this?
Back to top
View user's profile Send private message

guptae

Moderator


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

PostPosted: Mon May 05, 2008 3:34 pm    Post subject:
Reply with quote

Hi Nirmal,


Would you please provide sample i/p & o/p as well as fields definations?
Back to top
View user's profile Send private message
nirmal.poikaikumaran

New User


Joined: 29 Nov 2005
Posts: 66
Location: Bangalore

PostPosted: Mon May 05, 2008 3:41 pm    Post subject:
Reply with quote

i/p

00120020 11111111111111111111111
00220120 11111111111111111111111
00320018 11111111111111111111111


o/p

00130020 11111111111111111111111
Back to top
View user's profile Send private message
guptae

Moderator


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

PostPosted: Mon May 05, 2008 3:47 pm    Post subject:
Reply with quote

Hello Nirmal,

You can use below sort card to acheive this.
Code:

OPTION COPY                         
INCLUDE COND=(4,5,CH,EQ,C'20020')   
OUTREC FIELDS=(1,3,C'300',7:7,73)   
Back to top
View user's profile Send private message
nirmal.poikaikumaran

New User


Joined: 29 Nov 2005
Posts: 66
Location: Bangalore

PostPosted: Mon May 05, 2008 3:51 pm    Post subject:
Reply with quote

hey thanks that was fine

but i mentioned the mas packed decimal. for your understanding i gave sample i ncharacter form
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Mon May 05, 2008 4:30 pm    Post subject:
Reply with quote

Quote:

but i mentioned the mas packed decimal. for your understanding i gave sample i ncharacter form


so what?

so all you have to do is change guptae's include parm to look for your packed-decimal. the sort manuals go into painful detail about this and what the syntax is.

so, now for you homework assignment, RTFM!
Back to top
View user's profile Send private message
nirmal.poikaikumaran

New User


Joined: 29 Nov 2005
Posts: 66
Location: Bangalore

PostPosted: Mon May 05, 2008 4:36 pm    Post subject:
Reply with quote

Well Mister

Itried that tooo..... Either i get syntax error or data illegal error.....

i believ its not the correct syntax
Back to top
View user's profile Send private message
nirmal.poikaikumaran

New User


Joined: 29 Nov 2005
Posts: 66
Location: Bangalore

PostPosted: Mon May 05, 2008 4:38 pm    Post subject:
Reply with quote

..ð&%...@.&....îØ.
..ð.<...@.&....îØ.
..ð&%.ð.@.&....c-.
..ðØ....@.&....c-.


is the data format inside file 1
Back to top
View user's profile Send private message
guptae

Moderator


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

PostPosted: Mon May 05, 2008 4:46 pm    Post subject:
Reply with quote

Hello Nirmal,

Would you please provide field defination & starting positions?
Back to top
View user's profile Send private message
nirmal.poikaikumaran

New User


Joined: 29 Nov 2005
Posts: 66
Location: Bangalore

PostPosted: Mon May 05, 2008 5:44 pm    Post subject:
Reply with quote

01 TESTFILE.
05 TEST-IN PIC S9(5) COMP-3.
05 TEST-ACCT-NO.
10 TEST-ACC PIC S9(3) COMP-3.
10 TEST-SACC PIC S9(3) COMP-3.
05 POST-CD PIC S9(3) COMP-3.
05 TRANS-DT PIC S9(5) COMP-3.
05 AMT PIC S9(9)V9(2) COMP-3.


Thats the copy book and the data looks like

..ð&%...@.&....îØ.
..ð.<...@.&....îØ.
..ð&%.ð.@.&....c-.
..ðØ....@.&....c-.


I need to chec kfor TEST-ACC = 200 & TEST-SACC = 20.. if both matches i need to write the data into a different file with TEST-ACC as 300

thanks in advance Guptae
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Mon May 05, 2008 7:43 pm    Post subject:
Reply with quote

nirmal.poikaikumaran wrote:
Itried that tooo..... Either i get syntax error or data illegal error.....
i believ its not the correct syntax
Quit making us guess and post your jcl and all your sysouts.
nirmal.poikaikumaran wrote:
Code:
01  TESTFILE.                               
    05  TEST-IN         PIC S9(5)       COMP-3.
    05  TEST-ACCT-NO.                           
        10  TEST-ACC    PIC S9(3)       COMP-3.
        10  TEST-SACC   PIC S9(3)       COMP-3.
    05  POST-CD         PIC S9(3)       COMP-3.
    05  TRANS-DT        PIC S9(5)       COMP-3.
    05  AMT             PIC S9(9)V9(2)  COMP-3.

nirmal.poikaikumaran wrote:
..ð&%...@.&....îØ.
..ð.<...@.&....îØ.
..ð&%.ð.@.&....c-.
..ðØ....@.&....c-.
Since you can display the data, try it with hex on and repost it.....
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: Mon May 05, 2008 9:17 pm    Post subject:
Reply with quote

Nirmal,

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                               
//SORTOUT DD DSN=...  output file   
//SYSIN    DD    *                                                 
  OPTION COPY                                                     
  INCLUDE COND=(4,2,PD,EQ,+200,AND,6,2,PD,EQ,+20)                 
  OUTREC OVERLAY=(4:+300,TO=PD,LENGTH=2)                           
/*
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 Overlay the system date Danielle.Filteau SYNCSORT 4 Fri Mar 03, 2017 1:16 am
No new posts Overlay with right shift Bill Woodger DFSORT/ICETOOL 3 Thu Jan 28, 2016 7:49 pm
No new posts Overlay with WHEN=Group not working krsenthil85 DFSORT/ICETOOL 7 Wed Oct 21, 2015 4:00 am
No new posts Merge two files with some replace/ove... dheeraj.ramchandani DFSORT/ICETOOL 10 Thu Sep 03, 2015 7:59 pm
No new posts OVERLAY several fields if non-blank autobox DFSORT/ICETOOL 5 Fri Jul 10, 2015 12:42 pm

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