File 1 ABC(position 5,3) should be replaced in File 2



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

File 1 ABC(position 5,3) should be replaced in File 2

Postby kumarankarthik » Mon Oct 15, 2012 12:56 pm

Requirement File 1 ABC(position 5,3) should be replaced in File 2 (14,3) in header record only(detail and trailer should be as it is ) i want to achieve this thru sort or icetool

Note : there is no key fields in two files (file 1 will have only ABC in all the records no other value)

File 1 FB/LRECL 22
-----------------------

1234ABC
5678ABC
1111ABC

File 2 FB/LRECL 39
-----------------------


0000000000BBBXYZ20121015 =====> header record
1111111111CCC12345678911 =====> detail records
2111111111CCC12345678912 =====> detail records
3111111111CCC12345678911 =====> detail records
4111111111CCC12345678911 =====> detail records
9999999999000000004 =====> trailer record

Output file FB/LRECL 39
-----------------------------


0000000000BBBABC20121015 =====> header record ==('ABC' should be replaced in position(14,3))
1111111111CCC12345678911 =====> detail records
2111111111CCC12345678912 =====> detail records
3111111111CCC12345678911 =====> detail records
4111111111CCC12345678911 =====> detail records
9999999999000000004 =====> trailer record


Any one please do a quick reply would be very much appreciated
kumarankarthik
 
Posts: 3
Joined: Mon Oct 15, 2012 10:10 am
Has thanked: 0 time
Been thanked: 0 time

Re: very urgent

Postby enrico-sorichetti » Mon Oct 15, 2012 1:18 pm

the topic title is VERY INCONSIDERATE

gives no hint on the problem at stake and anywhere else will get You flamed for Your poor manners

Any one please do a quick reply would be very much appreciated


remember that we reply
on our own time
free of charge


if You/Your organization have time constraints it would be wiser to look for a paid consultant
who, for the proper fee, will adapt his schedule to Your need.

no reason for people who do it for free to interrupt what they are doing to satisfy Your urgency ( Your, not our )

to make the most out of the questions You ask it would be wise to read and meditate on
How To Ask Questions The Smart Way
by Eric Steven Raymond

http://catb.org/~esr/faqs/smart-questions.html" onclick="window.open(this.href);return false;

PS.
questions very similar to this one have been asked zillions of time
on this forum
and the companion forum ( for more advanced users )
http://ibmmainframes.com/index.php

searching Yourself will be faster than waiting for a reply
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3003
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: very urgent

Postby BillyBoyo » Mon Oct 15, 2012 1:35 pm

Generate a symbol/SYMNAMES from first record on your ABC file.

Use output from that on SYMNAMES DD in actual step.

IFTHEN=(WHEN=(test for header),OVERLAY and put the symbol in the required place.

Go back to sleep and wait for someone else to do the rest of your work.

Why is a Beginner/Student getting "urgent" work anyway?
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

help needed

Postby kumarankarthik » Mon Oct 15, 2012 3:22 pm

I apologize if my words hurt anyone. i need your help i tried but i am getting error "s013 ABENDWAS ISSUED BY DFSORT, ANOTHER PROGRAM OR AN EXIT (PHASE 0)" pls help me

JESMSGLG

10.25.39 JOB10571 ---- MONDAY,    15 OCT 2012 ----                             
10.25.40 JOB10571  IEF403I TTOIB010 - STARTED - TIME=10.25.40                 
10.25.40 JOB10571  IEC141I 013-20,IGG0191A,TTOIB010,STEP200,SYMNAMES,7760,W0Q10
10.25.40 JOB10571  IEA995I SYMPTOM DUMP OUTPUT  444                           
   444             SYSTEM COMPLETION CODE=013  REASON CODE=00000020           
   444              TIME=10.25.40  SEQ=65444  CPU=0000  ASID=0043             
   444              PSW AT TIME OF ERROR  075C1000   80E06C52  ILC 2  INTC 0D 
   444                NO ACTIVE MODULE FOUND                                   
   444                NAME=UNKNOWN                                             
   444                DATA AT PSW  00E06C4C - 4100302C  0A0D010D  A7E50126     
   444                AR/GR 0: A1A6647A/00E06F10   1: 00000000/A4013000       
   444                      2: 00000000/00010C68   3: 00000000/00E06EE4       
   444                      4: 00000000/009B6388   5: 00000000/009B671C       
   444                      6: 00000000/009B66C4   7: 00000000/009B671C       
   444                      8: 00000000/009B66E4   9: 00000000/009BDFFC       
   444                      A: 00000000/009D19A0   B: 00000000/00000000       
   444                      C: 00000000/00000040   D: 00000000/0000015D       
   444                      E: 00000000/80E064E4   F: 00000000/00000020       
   444              END OF SYMPTOM DUMP                                       
10.25.40 JOB10571  IEF450I TTOIB010 STEP200 - ABEND=S013 U0000 REASON=00000020
   445                     TIME=10.25.40                                       
10.25.40 JOB10571  IEF404I TTOIB010 - ENDED - TIME=10.25.40                   
10.25.40 JOB10571                                                             
10.25.40 JOB10571  ************************************************************
10.25.40 JOB10571  *      JOB         STEP      PROCSTEP      PROG      RETURN
10.25.40 JOB10571  *      NAME        NAME        NAME        NAME       CODE 
10.25.40 JOB10571  *    TTOIB010    STEP100                 SORT         0000 
10.25.40 JOB10571  *    TTOIB010    STEP200                 SORT        *S013 


below is the sort jcl i used

//STEP100  EXEC PGM=SORT                                         
//SYSOUT   DD SYSOUT=*                                           
//SORTIN   DD DSN=FILE1,DISP=SHR                        FB/LRECL 22
//SORTOUT  DD DSN=&&S1,                                           
//             DISP=(,PASS),SPACE=(TRK,(1,0),RLSE)   
//SYSIN    DD *                                                   
 OPTION COPY,STOPAFT=1                                           
 OUTFIL REMOVECC,NODETAIL,HEADER1=('FABC,C''',5,3,C'''',22:X)     ======i am not sure what to give here  please help
/*                                                               
//STEP200  EXEC PGM=SORT                                         
//SYSOUT   DD SYSOUT=*                                           
//SYMNAMES DD DSN=&&S1,DISP=SHR                                   
//SORTIN   DD DSN=FILE2,DISP=SHR                FB/LRECL 39     
//SORTOUT  DD DSN=OUTPUTFILE,                  FB/LRECL 39
//             DISP=(,CATLG,DELETE),SPACE=(TRK,(1,0),RLSE)         
//             LRECL=39,RECFM=FB                                 
//SYSIN    DD *                                                   
   OPTION COPY                                                     
   INREC IFOUTLEN=39,IFTHEN=(WHEN=INIT,OVERLAY=(40:SEQNUM,8,ZD)),   i am not sure what to give here  please help
   IFTHEN=(WHEN=(40,8,ZD,EQ,1),OVERLAY=(14:FABC))                 
/*                                                         


File 1 FB/LRECL 22
-----------------------

1234ABC
5678ABC
1111ABC


File 2 FB/LRECL 39
-----------------------


0000000000BBBXYZ20121015 =====> header record
1111111111CCC12345678911 =====> detail records
2111111111CCC12345678912 =====> detail records
3111111111CCC12345678911 =====> detail records
4111111111CCC12345678911 =====> detail records
9999999999000000004 =====> trailer record

Output file FB/LRECL 39
-----------------------------


0000000000BBBABC20121015 =====> header record ==('ABC' should be replaced in position(14,3))
1111111111CCC12345678911 =====> detail records
2111111111CCC12345678912 =====> detail records
3111111111CCC12345678911 =====> detail records
4111111111CCC12345678911 =====> detail records
9999999999000000004 =====> trailer record


Code'd
kumarankarthik
 
Posts: 3
Joined: Mon Oct 15, 2012 10:10 am
Has thanked: 0 time
Been thanked: 0 time

sort

Postby kumarankarthik » Mon Oct 15, 2012 4:22 pm

thankyou all i tried converting 22 byte input file to 80byte file and changed header1 and overlay it worked. i am not sure why it wasnt working if the input file has lrecl 22 any reason behind. please suggest.

//STEP100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=FILE1,DISP=SHR FB/LRECL 22
//SORTOUT DD DSN=&&S1,
// DISP=(,PASS),SPACE=(TRK,(1,0),RLSE)
//SYSIN DD *
OPTION COPY,STOPAFT=1
OUTFIL REMOVECC,NODETAIL,HEADER1=('KKK,C''',5,3,C'''',80:X)
/*
//STEP200 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SYMNAMES DD DSN=&&S1,DISP=SHR
//SORTIN DD DSN=FILE2,DISP=SHR FB/LRECL 39
//SORTOUT DD DSN=OUTPUTFILE, FB/LRECL 39
// DISP=(,CATLG,DELETE),SPACE=(TRK,(1,0),RLSE)
// LRECL=39,RECFM=FB
//SYSIN DD *
OPTION COPY
INREC IFOUTLEN=39,IFTHEN=(WHEN=INIT,OVERLAY=(40:SEQNUM,8,ZD)),
IFTHEN=(WHEN=(40,8,ZD,EQ,1),OVERLAY=(14:KKK))
/*


Code'd
kumarankarthik
 
Posts: 3
Joined: Mon Oct 15, 2012 10:10 am
Has thanked: 0 time
Been thanked: 0 time

Re: very urgent

Postby BillyBoyo » Mon Oct 15, 2012 4:30 pm

You've got a perfectly good error message out. Did you look it up? Did you look at the DD name mentioned? Specifically the DISP? Try with DISP=(OLD,PASS). SHR means nothing in this case, I've never coded it like that, so don't know if SHR,PASS would work. You need the PASS.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: File 1 ABC(position 5,3) should be replaced in File 2

Postby enrico-sorichetti » Mon Oct 15, 2012 5:44 pm

I apologize if my words hurt anyone.


apologize to Yourself, then.

posting in an improper way, will only hurt Your chances of receive good help.

since <You> did not care to spend time to compose properly Your questions
most of the people who have the skills to answer, feel that helping would be a waste of time
( if <you> did not care, why should <we> ) :mrgreen:
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3003
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: sort

Postby skolusu » Mon Oct 15, 2012 10:21 pm

kumarankarthik wrote:thankyou all i tried converting 22 byte input file to 80byte file and changed header1 and overlay it worked. i am not sure why it wasnt working if the input file has lrecl 22 any reason behind. please suggest.


The symnames Dataset must have the following attributes: RECFM=F or RECFM=FB and LRECL=80. This is documented here

http://publibz.boulder.ibm.com/cgi-bin/ ... e1ca60/8.2
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
skolusu
 
Posts: 586
Joined: Wed Apr 02, 2008 10:38 pm
Has thanked: 0 time
Been thanked: 39 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post