Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

To modify the record according to our requirements

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

Active User


Joined: 26 Feb 2007
Posts: 126
Location: Chennai

PostPosted: Mon Apr 30, 2007 1:21 pm    Post subject: To modify the record according to our requirements
Reply with quote

plz go thr attachment..where exactly my requirements is explained

Input file


Code:
A100012601FRMT1FAKT    011006FORMATTER 20070326                                 
.......................XXXXXXXXXXXX
E19005165371000100001110800007030000000000   ZB0101000         062007
E49005165371 MM000000000000000            0000000200000000000000
E29005165371000000000000           4001600000003INK   100T-ONLI
E3900516537100000007000000000000000+000000000001783+57014TELEKOM  0000000000
.......................XXXXXXXXXXXX
E19005165372000100001119800009070000000000   ZB0101000          062007
E49005165372 MM000000000000000  0000000100000000000000


Key field is highlighted in RED color.It is the customer-id of individual customer.
First two bytes indicate the record type.

A1 ? Header record
E1 ? main record
E2,E3,E4?are the detail records about the individual customer whose id is mentioned in E1 type record.



Output file

Code:
A100012601FRMT1FAKT    011006FORMATTER 20070326                                 
..KKKKKKKKKKKKSSSSSSSS1.....................XXXXXXXXXXXX
E10800007030000000000219005165371000100001110800007030000000000 ZB0101000 62007
E40800007030000000000319005165371 MM000000000000000  0000000200000000000000                         
E20800007030000000000419005165371000000000000  4001600000003INK   100T-ONLI                         
E3080000703000000000051900516537100000007000000000000000+000000000001783+57014
..KKKKKKKKKKKKSSSSSSSS1.....................XXXXXXXXXXXX
E19800009070000000000619005165372000100001119800009070000000000  ZB010100062007                   
E49800009070000000000719005165372 MM000000000000000 0000000100000000000000



Key field is added from 3 ? 14 position in each of the record according to the respective details records.

Sequence number is added in 15 ? 22 position

And numeric ?1? is added in 23 position in all the record.
This numeric may vary.so at the time executing the JoB we have to give this number as a input.IT may me 1 or 2 or 3 etc?
Back to top
View user's profile Send private message

Devzee

Active Member


Joined: 20 Jan 2007
Posts: 684
Location: Hollywood

PostPosted: Tue May 01, 2007 9:20 am    Post subject:
Reply with quote

I went thru your project requirement and What exactly you want the FORUM to answer.
Back to top
View user's profile Send private message
ibmmainframesyntel

Active User


Joined: 26 Feb 2007
Posts: 126
Location: Chennai

PostPosted: Tue May 01, 2007 1:58 pm    Post subject: Re: To modify the record according to our requirements
Reply with quote

I need a JCL to meet the the below requirements...

Input file and output file is mentioned in the attachment...

plz go thr tht and let me knw....


PLZ GO THR THE RECORD IN INPUT FILE AS WELL AS OUTPUT FILE...

every thing i mentioned clearly in the attachment..


THANK YOU
Back to top
View user's profile Send private message
ibmmainframesyntel

Active User


Joined: 26 Feb 2007
Posts: 126
Location: Chennai

PostPosted: Tue May 01, 2007 2:20 pm    Post subject:
Reply with quote

From the first two position,
E1,E2,E3 etc...are details of the one customer whose customer_id is
in the position 24-35 which is highlited in RED color in E1 type record.
E2,E3 etc are the details of the customer respective of customer_id in E1 type record.

Its nothing but all E1,E2,E3 etc are the information about individual customer.

next set of E1,E2,E3 etc are the information about another customer.



This customer_id is included in the E2,E3 etc record from the position 3-14 of all the record E1,E2,E3 etc...

and sequence number is included in the 15 position for all the record in the file.

and numeric '1' is added in the 16 posiion for all the record.
but this numeric may vary either 1 or 2 or 3 etc.
so it has to be given at the time of excuting the job.

hope u understood...still if u hav any query..plz let me knw..

Thank you
Back to top
View user's profile Send private message
ibmmainframesyntel

Active User


Joined: 26 Feb 2007
Posts: 126
Location: Chennai

PostPosted: Wed May 02, 2007 9:35 am    Post subject: Re: To modify the record according to our requirements
Reply with quote

Hi,
Please any one give a solution...its very urgent.

Frank, where r u?

Expecting your reply.

Thank you
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: Wed May 02, 2007 8:49 pm    Post subject:
Reply with quote

I tend not to look at this kind of complicated situation if it's not in the DFSORT Forum since I do actually have my own work to do.

Do you have DFSORT? If so, why didn't you post in the DFSORT Forum?

And how does this post relate to your other similar post "Need to delete the record according to key field"?
Back to top
View user's profile Send private message
ibmmainframesyntel

Active User


Joined: 26 Feb 2007
Posts: 126
Location: Chennai

PostPosted: Thu May 03, 2007 9:32 am    Post subject: Re: To modify the record according to our requirements
Reply with quote

shall i post once again in DFSORT Forum?

tell me i will post it again.

I think i can't post the same post twice in Forum.

It will become duplicate.
Back to top
View user's profile Send private message
ibmmainframesyntel

Active User


Joined: 26 Feb 2007
Posts: 126
Location: Chennai

PostPosted: Thu May 03, 2007 9:37 am    Post subject:
Reply with quote

We created one tool to compare the customer data using old file and new file.

I got seven requirements to do using JCl.
In that ,five i got a idea to code the JCl and i started coding and almost 4 JCl completed and fifth one is in progress.,except this two which i posted in forum.

Thank you
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: Thu May 03, 2007 10:09 pm    Post subject:
Reply with quote

Quote:
shall i post once again in DFSORT Forum?


I can move your post if appropriate.

But you didn't answer my question about whether you have DFSORT. That makes me suspicious.

I'm a DFSORT developer. DFSORT and Syncsort are competitive products. I'm happy to answer questions on DFSORT and DFSORT's ICETOOL, but I don't answer questions on Syncsort.

Please run the following job and post the SYSOUT messages - that will tell us which sort product you're using (and the PTF level if it's DFSORT):

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD *
123
//SORTOUT DD SYSOUT=*
//SYSIN DD *
   OPTION COPY
   INREC BUILD=(1,8,JFY=(SHIFT=RIGHT))
/*
Back to top
View user's profile Send private message
ibmmainframesyntel

Active User


Joined: 26 Feb 2007
Posts: 126
Location: Chennai

PostPosted: Fri May 04, 2007 9:23 am    Post subject: Re: To modify the record according to our requirements
Reply with quote

Yes...we having DFSORT.
u can give a solution using DFSORT.

Thank you
Back to top
View user's profile Send private message
ibmmainframesyntel

Active User


Joined: 26 Feb 2007
Posts: 126
Location: Chennai

PostPosted: Fri May 04, 2007 5:00 pm    Post subject: Re: To modify the record according to our requirements
Reply with quote

Hi Frank,
As per your reply,am sending the sysout messages through attachment.

Thank you
Code:
1ICE143I 0 BLOCKSET     COPY  TECHNIQUE SELECTED
 ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES AND MORE
 ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R5 - 13:06 ON FRI MAY 04, 2007 -
0            OPTION COPY
             INREC BUILD=(1,8,JFY=(SHIFT=RIGHT))
 ICE201I E RECORD TYPE IS F - DATA STARTS IN POSITION 1
 ICE751I 0 C5-K90007 C6-K90007 C7-K90000 C8-K90007 E9-K90007 C9-BASE   E5-K10929 E7-K90000
 ICE193I 0 ICEAM1 ENVIRONMENT IN EFFECT - ICEAM1 INSTALLATION MODULE SELECTED
 ICE088I 0 X1I5664A.S1      .        , INPUT LRECL = 80, BLKSIZE = 80, TYPE = FB
 ICE093I 0 MAIN STORAGE = (MAX,33554432,33541214)
 ICE156I 0 MAIN STORAGE ABOVE 16MB = (33463918,33463918)
 ICE127I 0 OPTIONS: OVFLO=RC0 ,PAD=RC0 ,TRUNC=RC0 ,SPANINC=RC16,VLSCMP=N,SZERO=Y,RESET=Y,VSAMEMT=Y,DYNSPC=256
 ICE128I 0 OPTIONS: SIZE=33554432,MAXLIM=409600,MINLIM=204800,EQUALS=N,LIST=Y,ERET=RC16 ,MSGDDN=SYSOUT
 ICE129I 0 OPTIONS: VIO=N,RESDNT=ALL ,SMF=FULL ,WRKSEC=Y,OUTSEC=Y,VERIFY=N,CHALT=N,DYNALOC=N             ,ABCODE=MSG
 ICE130I 0 OPTIONS: RESALL=65536,RESINV=0,SVC=109 ,CHECK=Y,WRKREL=Y,OUTREL=Y,CKPT=N,STIMER=Y,COBEXIT=COB2
 ICE131I 0 OPTIONS: TMAXLIM=33554432,ARESALL=0,ARESINV=0,OVERRGN=65536,CINV=Y,CFW=Y,DSA=0
 ICE132I 0 OPTIONS: VLSHRT=N,ZDPRINT=Y,IEXIT=N,TEXIT=N,LISTX=N,EFS=NONE    ,EXITCK=S,PARMDDN=DFSPARM ,FSZEST=N
 ICE133I 0 OPTIONS: HIPRMAX=OPTIMAL,DSPSIZE=MAX ,ODMAXBF=0,SOLRF=Y,VLLONG=N,VSAMIO=N,MOSIZE=MAX
 ICE235I 0 OPTIONS: NULLOUT=RC0
 ICE084I 0 BSAM ACCESS METHOD USED FOR SORTOUT
 ICE084I 0 BSAM ACCESS METHOD USED FOR SORTIN
 ICE751I 1 EF-K10929 F0-Q84357 E8-K90000
 ICE090I 0 OUTPUT LRECL = 8, BLKSIZE = 80, TYPE = FB
 ICE171I 0 SORTOUT LRECL OF 8 IS DIFFERENT FROM SORTIN(NN) LRECL OF 80 - RC=0
 ICE055I 0 INSERT 0, DELETE 0
 ICE054I 0 RECORDS - IN: 1, OUT: 1
 ICE052I 0 END OF DFSORT
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: Fri May 04, 2007 10:08 pm    Post subject:
Reply with quote

Here's a DFSORT/ICETOOL job that will do what you asked for. I assumed your input file has RECFM=80, but the job can be changed appropriately for other attributes. I used a DFSORT symbol (Id) to allow you to set different numeric values for the job.

Code:

//S1    EXEC  PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG  DD SYSOUT=*
//SYMNAMES DD *
Id,'1'
/*
//IN DD DSN=...  input file (FB/80)
//OUT DD DSN=...  output file (FB/101)
//TOOLIN   DD    *
SPLICE FROM(IN) TO(OUT) ON(102,8,ZD) KEEPNODUPS KEEPBASE -
  WITHALL WITH(1,80) WITH(93,9) USING(CTL1)
/*
//CTL1CNTL DD *
  INREC IFTHEN=(WHEN=INIT,
                  OVERLAY=(93:SEQNUM,8,ZD,101:Id,102:SEQNUM,8,ZD)),
        IFTHEN=(WHEN=(1,2,CH,EQ,C'E1'),
                  OVERLAY=(81:24,12,102:SEQNUM,8,ZD)),
        IFTHEN=(WHEN=NONE,
                  OVERLAY=(110:SEQNUM,8,ZD,
                           102:102,8,ZD,SUB,110,8,ZD,M11,LENGTH=8))
  OUTFIL FNAMES=OUT,
    IFOUTLEN=101,
    IFTHEN=(WHEN=(1,2,CH,NE,C'A1'),
      BUILD=(1,2,81,21,3,78)),
    IFTHEN=(WHEN=(1,2,CH,EQ,C'A1'),
      BUILD=(1,80))
/*
Back to top
View user's profile Send private message
ibmmainframesyntel

Active User


Joined: 26 Feb 2007
Posts: 126
Location: Chennai

PostPosted: Sat May 05, 2007 12:03 pm    Post subject: Re: To modify the record according to our requirements
Reply with quote

Ok Frank..

i will use the same JCl.

still i am having some more query in that JCl.
some control card 'OVERLAY' and 'IFOUTLEN' don't know what it will do?
i will work in that JCl.
I will try to learn that by giving diffrent type of input.

IF i didn't get exactly,i will ask you

Thanks
Back to top
View user's profile Send private message
ibmmainframesyntel

Active User


Joined: 26 Feb 2007
Posts: 126
Location: Chennai

PostPosted: Sat May 05, 2007 5:52 pm    Post subject: Re: To modify the record according to our requirements
Reply with quote

Hi frank.

I implemented the same JCl and i got the exact output.

But am having one query.

I mentioned every thing in the attachment.
just for my knowledge purpose i changed the JCl and executed.
attachment containing the JCl as well as my query.

But one thing i got the exact output.

Thanks a lot
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: Sun May 06, 2007 11:20 pm    Post subject:
Reply with quote

Quote:
some control card 'OVERLAY' and 'IFOUTLEN' don't know what it will do?


You can find complete details on DFSORT's IFTHEN, OVERLAY, BUILD and IFOUTLEN operands at:

www.ibm.com/servers/storage/support/software/sort/mvs/pdug/

Quote:
what exactly 'M11' is doing.
And how we getting the above data.


Code:
   102:102,8,ZD,SUB,110,8,ZD,M11,LENGTH=8))


That arithmetic expression is equivalent to groupnum=seq1-seq2 and M11,LENGTH=8 is just used to convert the result to an 8-byte groupnum value with leading zeros.

The manipulation of the sequence numbers by IFTHEN/OVERLAY is the "group number" trick that Alain came up with which is discussed in the "Include or omit groups of records" and "Sort groups of records" Smart DFSORT Tricks at:

http://www.ibm.com/servers/storage/support/software/sort/mvs/tricks/
Back to top
View user's profile Send private message
ibmmainframesyntel

Active User


Joined: 26 Feb 2007
Posts: 126
Location: Chennai

PostPosted: Mon May 07, 2007 10:13 am    Post subject: Re: To modify the record according to our requirements
Reply with quote

HI frank,

I got every thing except the result which i mentioned in the result.

0000000110000000000000001
00000002100000001
0000000310000000100000002
0000000410000000100000003
0000000510000000100000004
00000006100000002
0000000710000000200000005


it giving the sequence number and subtracting with all the record
except second and sixth record.
How?

could you explain only the above query.

Thank you
Back to top
View user's profile Send private message
ibmmainframesyntel

Active User


Joined: 26 Feb 2007
Posts: 126
Location: Chennai

PostPosted: Mon May 07, 2007 12:55 pm    Post subject: Re: To modify the record according to our requirements
Reply with quote

Ok..

i will go through that stuff..

Thank you
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 How to update a portion of text in a ... Bill Woodger DFSORT/ICETOOL 25 Wed Nov 09, 2016 9:41 pm
No new posts sort with previous record anatol DFSORT/ICETOOL 9 Thu Oct 06, 2016 2:36 am
No new posts Get Record count in summary record fo... Atul Banke DFSORT/ICETOOL 21 Fri Sep 23, 2016 4:17 pm
No new posts Change date (DD/MM/YY) in 2nd record ... uday kiran DFSORT/ICETOOL 12 Wed Sep 07, 2016 10:57 pm
No new posts Using 'parm' to vary SORTOUT record v... Sysaron DFSORT/ICETOOL 13 Wed Sep 07, 2016 9:24 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us