Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups 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
Author Message
nirmal.poikaikumaran

Active User


Joined: 29 Nov 2005
Posts: 50
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
References
PostPosted: Mon May 05, 2008 3:28 pm    Post subject: Re: how to overlay Reply with quote

guptae

Moderator


Joined: 14 Oct 2005
Posts: 990
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

Active User


Joined: 29 Nov 2005
Posts: 50
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: 990
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

Active User


Joined: 29 Nov 2005
Posts: 50
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

Senior Member


Joined: 20 Oct 2006
Posts: 1128
Location: germany

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

Active User


Joined: 29 Nov 2005
Posts: 50
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

Active User


Joined: 29 Nov 2005
Posts: 50
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: 990
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

Active User


Joined: 29 Nov 2005
Posts: 50
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: 1087
Location: At my desk

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: 3952
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
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1