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

DFSORT Error: ICE005A, Missing Blank?


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

Active User


Joined: 02 May 2005
Posts: 128
Location: UK

PostPosted: Tue Apr 27, 2010 7:36 pm
Reply with quote

Hello All ,

I have two fixed block input files .
FILE 1 = FB 40 byte
FILE 2 = FB 24 byte

output file
FILE3 = FB 24 byte

Here are the rules

1) if File 1 is empty no processing . Simple copy FILE2 to FILE3
2) if File 1 field starting from 7 column(Length 2 BYTE) is equal to FILE 2 FIELD STARTING FROM 23 BYTE(LENGTH 2 BYTE) .Then File 2 (23rd to 25 th byte should be replaced with File 1 (10 to 11 byte) and written to a new output file(file3) same attribute as of file 2
3) IF other case record from file 2 should be written to (file3)

here is the example
FILE 1
Code:

=COLS> ----+----1----+----2----+----3----+----4
****** ***************************** Top of Dat
000001 111111XXYY                             
000001 111111ZZAA                             
****** **************************** Bottom of D


FILE2

Code:

=COLS> ----+----1----+----2----
****** ************************
000001 00000000            00XX
000002 11111111            99ZZ
000003 22222222            88M3


output should be (file3)

Code:

=COLS> ----+----1----+----2----
****** *************************
000001 00000000            00YY
000002 11111111            99AA
000003 22222222            88M3


Regards
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Tue Apr 27, 2010 8:03 pm
Reply with quote

Can file1 or file2 have duplicates for 2byte field shown?
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: Tue Apr 27, 2010 10:30 pm
Reply with quote

shr_amar,

Here's a DFSORT JOINKEYS job that will do what I think you're asking for. You'll need the Nov, 2009 PTF to use JOINKEYS. If you don't have that PTF, ask your System Programmer to install it.

Code:

//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//IN1 DD DSN=...  input file (FB/40)
//IN2 DD DSN=...  input file (FB/24)
//SORTOUT DD DSN=...  output file (FB/24)
//SYSIN DD *
  JOINKEYS F1=IN1,FIELDS=(7,2,A)
  JOINKEYS F2=IN2,FIELDS=(23,2,A)
  JOIN UNPAIRED,F2
  REFORMAT FIELDS=(F2:1,24,F1:9,2,?)
  SORT FIELDS=(1,8,CH,A)
  OUTFIL IFOUTLEN=24,
    IFTHEN=(WHEN=(27,1,CH,EQ,C'B'),
      OVERLAY=(23:25,2))
/*
Back to top
View user's profile Send private message
shr_amar
Warnings : 2

Active User


Joined: 02 May 2005
Posts: 128
Location: UK

PostPosted: Wed Apr 28, 2010 12:58 am
Reply with quote

Hello Sambhaji

It cannot be duplicate .
Back to top
View user's profile Send private message
shr_amar
Warnings : 2

Active User


Joined: 02 May 2005
Posts: 128
Location: UK

PostPosted: Wed Apr 28, 2010 1:01 am
Reply with quote

Hello Frank,

I m not sure whether Nov, 2009 PTF to use JOINKEYS is present in my shop. i will check . But do we have any other way .Secondly the code which you have given me will work if FILE 1 is empty.

Regds
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: Wed Apr 28, 2010 1:10 am
Reply with quote

First, check to see if you have the Nov, 2009 PTF. If not, we can discuss the possibility of another way (I'd have to spend time thinking about it and I'd rather not if you can use JOINKEYS).

The DFSORT job will copy all of the records in input file2 to the output file if input file1 is empty.
Back to top
View user's profile Send private message
shr_amar
Warnings : 2

Active User


Joined: 02 May 2005
Posts: 128
Location: UK

PostPosted: Wed Apr 28, 2010 2:06 pm
Reply with quote

Hello Frank ,

I am getting the below error :-

Code:


ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R10 - 09:34
          JOINKEYS F1=IN1,FIELDS=(7,2,A)                               
                   £                                                   
ICE005A 0 BLANK NEEDED IN COLUMN 1 OR OPERATION NOT DEFINED CORRECTLY 
          JOINKEYS F2=IN2,FIELDS=(23,2,A)                             
                   £                                                   
ICE005A 0 BLANK NEEDED IN COLUMN 1 OR OPERATION NOT DEFINED CORRECTLY 
          JOIN UNPAIRED,F2                                             
               £                                                       
ICE005A 0 BLANK NEEDED IN COLUMN 1 OR OPERATION NOT DEFINED CORRECTLY 
          REFORMAT FIELDS=(F2:1,24,F1:9,2,?)                           
                   £                                                   
ICE005A 0 BLANK NEEDED IN COLUMN 1 OR OPERATION NOT DEFINED CORRECTLY 
          SORT FIELDS=(1,8,CH,A)                                       
               £                                                       
ICE005A 0 BLANK NEEDED IN COLUMN 1 OR OPERATION NOT DEFINED CORRECTLY 
          OUTFIL IFOUTLEN=24,                                         
                 £                                                     
ICE005A 0 BLANK NEEDED IN COLUMN 1 OR OPERATION NOT DEFINED CORRECTLY 
             IFTHEN=(WHEN=(27,1,CH,EQ,C'B'),                           
             IFTHEN=(WHEN=(27,1,CH,EQ,C'B'),                         
             £                                                       
ICE005A 0 BLANK NEEDED IN COLUMN 1 OR OPERATION NOT DEFINED CORRECTLY
               OVERLAY=(23:25,2))                                   
               £                                                     
ICE005A 0 BLANK NEEDED IN COLUMN 1 OR OPERATION NOT DEFINED CORRECTLY
ICE010A 0 NO SORT OR MERGE CONTROL STATEMENT                         
ICE751I 0 C5-K48846 C6-K90014 E7-K48846                             
ICE052I 3 END OF DFSORT   
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Wed Apr 28, 2010 8:10 pm
Reply with quote

shr_amar,

If you were to take a wild guess what this message means, what would your guess be and how would you correct it?

Quote:

ICE005A 0 BLANK NEEDED IN COLUMN 1 OR OPERATION NOT DEFINED CORRECTLY
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: Wed Apr 28, 2010 10:41 pm
Reply with quote

shr_amar,

If you go back to the job I posted, you'll see that I have blanks at the start of each line in //SYSIN. You don't. That's what the message
BLANK NEEDED IN COLUMN 1 is telling you.

However, C6-K90014 tells me that you don't have the Nov, 2009 PTF so you can't use JOINKEYS. Ask your System Programmer to install that PTF (it's free). For more information on the PTF, see:

www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000174
Back to top
View user's profile Send private message
shr_amar
Warnings : 2

Active User


Joined: 02 May 2005
Posts: 128
Location: UK

PostPosted: Thu Apr 29, 2010 4:05 pm
Reply with quote

Many Thanks FRANK ,

See i have used the same way you have sugessted . Seems that this is due to PTF .

As it will time to take approval to install PTF . As this is urgent can we have some other way to acheive this ?

Code:

000010 //SYSIN   DD *                                         
000012   JOINKEYS FILES=F1,FIELDS=(7,2,A)     
000013   JOINKEYS FILES=F2,FIELDS=(23,2,A)     
000014   JOIN UNPAIRED,F2                     
000015   REFORMAT FIELDS=(F2:1,24,F1:9,2,?)   
000016   SORT FIELDS=(1,8,CH,A)               
000017   OUTFIL IFOUTLEN=24,                   
000018     IFTHEN=(WHEN=(27,1,CH,EQ,C'B'),     
000019       OVERLAY=(23:25,2))               
000020 /*                                         
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Thu Apr 29, 2010 11:43 pm
Reply with quote

shr_amar,

The following DFSORT/ICETOOL JCL will give you the desired results

Code:

//STEP0100 EXEC PGM=ICETOOL                                         
//TOOLMSG  DD SYSOUT=*                                               
//DFSMSG   DD SYSOUT=*                                               
//IN40     DD DSN=Your 40 byte unq file,DISP=SHR
//IN24     DD DSN=Your 24 byte unq file,DISP=SHR
//T1       DD DSN=&&T1,DISP=(MOD,PASS),SPACE=(CYL,(X,Y),RLSE)       
//T2       DD DSN=&&T2,DISP=(,PASS),SPACE=(CYL,(X,Y),RLSE)           
//OUT      DD SYSOUT=*                                               
//TOOLIN   DD *                                                     
  COPY FROM(IN40) USING(CTL1)                                       
  COPY FROM(IN24) USING(CTL2)                                       
  SORT FROM(T1)   USING(CTL3)                                       
  SORT FROM(T2)   USING(CTL4)                                       
//*                                                                 
//CTL1CNTL DD *                                                     
  OUTFIL FNAMES=T1,BUILD=(21:9,2,7,2,C'1')                           
//*                                                                 
//CTL2CNTL DD *                                                     
  OUTFIL FNAMES=T1,OVERLAY=(25:C'2')                                 
//*                                                                 
//CTL3CNTL DD *                                                     
  SORT FIELDS=(23,2,CH,A),EQUALS                                     
  OUTREC IFTHEN=(WHEN=INIT,OVERLAY=(27:SEQNUM,1,ZD,RESTART=(23,2))),
  IFTHEN=(WHEN=GROUP,BEGIN=(27,1,ZD,EQ,1),PUSH=(26:25,1,28:21,2))   
  OUTFIL FNAMES=T2,IFOUTLEN=24,INCLUDE=(25,2,ZD,GE,21),                     
  IFTHEN=(WHEN=(25,2,ZD,EQ,21),OVERLAY=(23:28,2))                   
//*                                                                 
//CTL4CNTL DD *                                                     
  SORT FIELDS=(1,8,CH,A),EQUALS                                     
  OUTFIL FNAMES=OUT                                                 
//*
Back to top
View user's profile Send private message
shr_amar
Warnings : 2

Active User


Joined: 02 May 2005
Posts: 128
Location: UK

PostPosted: Sat May 08, 2010 6:01 pm
Reply with quote

Thanks Kolusu .. This is working
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 Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
Search our Forums:

Back to Top