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

how to overlay


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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: 1208
Location: Bangalore,India

PostPosted: Mon May 05, 2008 3:34 pm
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
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: 1208
Location: Bangalore,India

PostPosted: Mon May 05, 2008 3:47 pm
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
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: 6966
Location: porcelain throne

PostPosted: Mon May 05, 2008 4:30 pm
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
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
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: 1208
Location: Bangalore,India

PostPosted: Mon May 05, 2008 4:46 pm
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
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: 2146
Location: At my coffee table

PostPosted: Mon May 05, 2008 7:43 pm
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 Developer


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

PostPosted: Mon May 05, 2008 9:17 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Help, trying to use OVERLAY to get a ... DFSORT/ICETOOL 3
No new posts BNDS and Overlay command TSO/ISPF 9
No new posts Issues with outrec overlay while extr... SYNCSORT 7
No new posts HOW TO OVERLAY A Packed decimal VALUE... DFSORT/ICETOOL 5
No new posts Problem with OVERLAY - BI on SMF Record DFSORT/ICETOOL 4
Search our Forums:

Back to Top