View previous topic :: View next topic
Author
Message
useit Active User Joined: 05 Oct 2006Posts: 152
skolusu,
i tried this jcl and it is working fine:) Once again my personal thanks for helping me out in quick time...
also please tell me how do u decide the position of sequence number and push id.
ex:PUSH=(73:ID=8,82:SEQ=2)
if my input LRECL=205. AND OUTPUT LRECL=99. what would be my push & seq number position)
Back to top
useit Active User Joined: 05 Oct 2006Posts: 152
hi,
one more similar exam i tried to execute it.but it failed with soc7.
input lrecl=205, output lrecl=99
1-39 key data.
my input layout is as below.
01 REC.
07 KEY-DATA PIC X(39).
07 CALC-DATA.
09 EXPIRE PIC S9(5)V99 COMP-3.
09 SOH PIC S9(5)V99 COMP-3.
09 SALES PIC S9(5)V99 COMP-3.
07 FILLER PIC X(154).
please see the below jcl:
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=INPUT.FILE,DISP=SHR
//SORTOUT DD DSN=OUTPUT.FILE,DISP=SHR
//SYSIN DD *
INREC IFTHEN=(WHEN=INIT,BUILD=(1,39,9X'0000000C',40,12,X'1C')),
IFTHEN=(WHEN=GROUP,BEGIN=(39,1,CH,EQ,C'X'),
PUSH=(113:ID=8,122:SEQ=2)),
IFTHEN=(WHEN=(122,2,ZD,EQ,02),OVERLAY=(40:100,12,121:C'A')),
IFTHEN=(WHEN=(122,2,ZD,EQ,03),OVERLAY=(52:100,12,121:C'A')),
IFTHEN=(WHEN=(122,2,ZD,EQ,04),OVERLAY=(64:100,12,121:C'A')),
IFTHEN=(WHEN=(122,2,ZD,EQ,05),OVERLAY=(76:100,12,121:C'A')),
IFTHEN=(WHEN=(122,2,ZD,EQ,06),OVERLAY=(88:100,12,121:C'A')),
IFTHEN=(WHEN=(122,2,ZD,EQ,07),OVERLAY=(39X,100,12,121:C'B')),
IFTHEN=(WHEN=(122,2,ZD,EQ,08),OVERLAY=(39X,52:100,12,121:C'B')),
IFTHEN=(WHEN=(122,2,ZD,EQ,09),OVERLAY=(39X,64:100,12,121:C'B')),
IFTHEN=(WHEN=(122,2,ZD,EQ,10),OVERLAY=(39X,76:100,12,121:C'B')),
IFTHEN=(WHEN=(122,2,ZD,EQ,11),OVERLAY=(39X,88:100,12,121:C'B')),
IFTHEN=(WHEN=(122,2,ZD,EQ,12),OVERLAY=(39X,100,12,121:C'C')),
IFTHEN=(WHEN=(122,2,ZD,EQ,13),OVERLAY=(39X,52:100,12,121:C'C')),
IFTHEN=(WHEN=(122,2,ZD,EQ,14),OVERLAY=(39X,64:100,12,121:C'C')),
IFTHEN=(WHEN=(122,2,ZD,EQ,15),OVERLAY=(39X,76:100,12,121:C'C')),
IFTHEN=(WHEN=(122,2,ZD,EQ,16),OVERLAY=(39X,88:100,12,121:C'C')),
IFTHEN=(WHEN=(122,2,ZD,EQ,17),OVERLAY=(39X,100,12,121:C'D')),
IFTHEN=(WHEN=(122,2,ZD,EQ,18),OVERLAY=(39X,52:100,12,121:C'D')),
IFTHEN=(WHEN=(122,2,ZD,EQ,19),OVERLAY=(39X,64:100,12,121:C'D')),
IFTHEN=(WHEN=(122,2,ZD,EQ,20),OVERLAY=(39X,76:100,12,121:C'D')),
IFTHEN=(WHEN=(122,2,ZD,EQ,21),OVERLAY=(39X,88:100,12,121:C'D')),
IFTHEN=(WHEN=(122,2,ZD,EQ,22),OVERLAY=(39X,100,12,121:C'E')),
IFTHEN=(WHEN=(122,2,ZD,EQ,23),OVERLAY=(39X,52:100,12,121:C'E')),
IFTHEN=(WHEN=(122,2,ZD,EQ,24),OVERLAY=(39X,64:100,12,121:C'E')),
IFTHEN=(WHEN=(122,2,ZD,EQ,25),OVERLAY=(39X,76:100,12,121:C'E')),
IFTHEN=(WHEN=(122,2,ZD,EQ,26),OVERLAY=(39X,88:100,12,121:C'E')),
IFTHEN=(WHEN=(122,2,ZD,EQ,27),OVERLAY=(39X,100,12,121:C'F')),
IFTHEN=(WHEN=(122,2,ZD,EQ,28),OVERLAY=(39X,52:100,12,121:C'F')),
IFTHEN=(WHEN=(122,2,ZD,EQ,29),OVERLAY=(39X,64:100,12,121:C'F')),
IFTHEN=(WHEN=(122,2,ZD,EQ,30),OVERLAY=(39X,76:100,12,121:C'F')),
IFTHEN=(WHEN=(122,2,ZD,EQ,31),OVERLAY=(39X,88:100,12,121:C'F'))
SORT FIELDS=(113,9,CH,A),EQUALS
SUM FIELDS=(40,4,44,4,48,4,52,4,56,4,60,4,
64,4,68,4,72,4,76,4,80,4,84,4,88,4,92,4,
96,4,112,1),FORMAT=PD
OUTREC IFOUTLEN=99,
IFTHEN=(WHEN=(39,1,CH,EQ,C'X'),OVERLAY=(40:60X)),
IFTHEN=(WHEN=(112,1,PD,EQ,1),OVERLAY=(52:48X)),
IFTHEN=(WHEN=(112,1,PD,EQ,2),OVERLAY=(64:36X)),
IFTHEN=(WHEN=(112,1,PD,EQ,3),OVERLAY=(76:24X)),
IFTHEN=(WHEN=(112,1,PD,EQ,4),OVERLAY=(88:12X))
Back to top
useit Active User Joined: 05 Oct 2006Posts: 152
skolusu,
i got the reason:). its working fine now:) thank you so much
Back to top
Skolusu Senior Member Joined: 07 Dec 2007Posts: 2205 Location: San Jose
useit wrote:
hi,
one more similar exam i tried to execute it.but it failed with soc7.
input lrecl=205, output lrecl=99
Woah all these questions are part of an exam and you are getting the answers from here? What happens if the instructor asks you to explain the job?
Back to top
Arun Raj Moderator Joined: 17 Oct 2006Posts: 2481 Location: @my desk
Kolusu,
You're always available for the explanation
Back to top
useit Active User Joined: 05 Oct 2006Posts: 152
skolusu,
one more similar exam i tried to execute it.(it should hold 9 occurences instead of 3)
input lrecl=205, output lrecl=147
1-39 key data.
it is working fine. but in case of overflow value 0 is getting populated instead of spce/low values.
how to handle this condition?
Back to top
useit Active User Joined: 05 Oct 2006Posts: 152
skolusu,
please explain me once how it will append the records.
you have used group id, seq number, and also in 81st position 'A, B, C, D, E". give me a brief overview when you are free
Back to top
PeterHolland Global Moderator Joined: 27 Oct 2009Posts: 2481 Location: Netherlands, Amstelveen
Pushing skolusu?
Maybe he is in a different time zone, and doing his beauty sleep.
Back to top
daveporcelan Active Member Joined: 01 Dec 2006Posts: 792 Location: Pennsylvania
Who keeps the record books on the forum?
This thread is up to 47 replies.
Useit has changed the requirements half a dozen times.
He must be charmed.
I can believe this thread is still alive.
Back to top
PeterHolland Global Moderator Joined: 27 Oct 2009Posts: 2481 Location: Netherlands, Amstelveen
Dave,
useit is one of those people letting do HIS work by other people.
Back to top
daveporcelan Active Member Joined: 01 Dec 2006Posts: 792 Location: Pennsylvania
I know, that is why I say he must be charmed.
He has been able to keep this post going for a long time.
You would think he has learned enough to carry on solo by now.
Back to top
dick scherrer Moderator Emeritus Joined: 23 Nov 2006Posts: 19244 Location: Inside the Matrix
Or understood that there has been more than enough spoon-feeding . . .
Imagine when it is no longer just class exercises (which should be in our Student/Fresher forum) but some employer expects some real work to be done. . . Do we see "urgent" on the horizon. . .
d
Back to top
Skolusu Senior Member Joined: 07 Dec 2007Posts: 2205 Location: San Jose
useit,
I am not going to spoon feed you any more. If all of these exercises are part of an exam, I suggest you study and try to answer them on your own. If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:
Use [URL] BBCode for External Links
Back to top
useit Active User Joined: 05 Oct 2006Posts: 152
skolusu i read dfsort getting started and tried various example. was trying the similar requirement for 15 occurences that time i got 0 instead of low values(for remaining space).so i asked you guys.dont misunderstand me.am seriously working hard on this.we can learn something from everyone.
in the below statement can you tell me (60,12) what value will it store?
OVERLAY=(36:60,12,81:C'A')
and also 72, 1 in below statement.
IFTHEN=(WHEN=(72,1,PD,EQ,1),OVERLAY=(36:24X) .
sorry for bothering you.am very thankful to u.
Back to top
useit Active User Joined: 05 Oct 2006Posts: 152
skolusu,
please answer the above question.will not trouble you now on.
regds,
useit
Back to top
useit Active User Joined: 05 Oct 2006Posts: 152
skolusu,
another example i was trying.i got the results correct but in case of overflow value zero is getting populated instead of space/low values.
input recl=205,output lrecl=219,keydata-1-39
maximum 30 "y" type under each "x" type record.
15 occurences.
below is the jcl i have written.let me know where i have done mistake
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=INPUT.FILE,DISP=SHR
//SORTOUT DD DSN=.OUTPUT.FILE,DISP=SHR
//SYSIN DD *
INREC IFTHEN=(WHEN=INIT,BUILD=(1,39,45X'0000000C',40,12,X'1C')),
IFTHEN=(WHEN=GROUP,BEGIN=(39,1,CH,EQ,C'X'),
PUSH=(233:ID=8,242:SEQ=2)),
IFTHEN=(WHEN=(242,2,ZD,EQ,02),OVERLAY=(40:220,12,241:C'A')),
IFTHEN=(WHEN=(242,2,ZD,EQ,03),OVERLAY=(52:220,12,241:C'A')),
IFTHEN=(WHEN=(242,2,ZD,EQ,04),OVERLAY=(64:220,12,241:C'A')),
IFTHEN=(WHEN=(242,2,ZD,EQ,05),OVERLAY=(76:220,12,241:C'A')),
IFTHEN=(WHEN=(242,2,ZD,EQ,06),OVERLAY=(88:220,12,241:C'A')),
IFTHEN=(WHEN=(242,2,ZD,EQ,07),OVERLAY=(100:220,12,241:C'A')),
IFTHEN=(WHEN=(242,2,ZD,EQ,08),OVERLAY=(112:220,12,241:C'A')),
IFTHEN=(WHEN=(242,2,ZD,EQ,09),OVERLAY=(124:220,12,241:C'A')),
IFTHEN=(WHEN=(242,2,ZD,EQ,10),OVERLAY=(136:220,12,241:C'A')),
IFTHEN=(WHEN=(242,2,ZD,EQ,11),OVERLAY=(148:220,12,241:C'A')),
IFTHEN=(WHEN=(242,2,ZD,EQ,12),OVERLAY=(160:220,12,241:C'A')),
IFTHEN=(WHEN=(242,2,ZD,EQ,13),OVERLAY=(172:220,12,241:C'A')),
IFTHEN=(WHEN=(242,2,ZD,EQ,14),OVERLAY=(184:220,12,241:C'A')),
IFTHEN=(WHEN=(242,2,ZD,EQ,15),OVERLAY=(196:220,12,241:C'A')),
IFTHEN=(WHEN=(242,2,ZD,EQ,16),OVERLAY=(208:220,12,241:C'A')),
IFTHEN=(WHEN=(242,2,ZD,EQ,17),OVERLAY=(39X,220,12,241:C'B')),
IFTHEN=(WHEN=(242,2,ZD,EQ,18),OVERLAY=(39X,52:220,12,241:C'B')),
IFTHEN=(WHEN=(242,2,ZD,EQ,19),OVERLAY=(39X,64:220,12,241:C'B')),
IFTHEN=(WHEN=(242,2,ZD,EQ,20),OVERLAY=(39X,76,12,241:C'B')),
IFTHEN=(WHEN=(242,2,ZD,EQ,21),OVERLAY=(39X,88:220,12,241:C'B')),
IFTHEN=(WHEN=(242,2,ZD,EQ,22),OVERLAY=(39X,100:220,12,241:C'B')),
IFTHEN=(WHEN=(242,2,ZD,EQ,23),OVERLAY=(39X,112,12,241:C'B')),
IFTHEN=(WHEN=(242,2,ZD,EQ,24),OVERLAY=(39X,124:220,12,241:C'B')),
IFTHEN=(WHEN=(242,2,ZD,EQ,25),OVERLAY=(39X,136:220,12,241:C'B')),
IFTHEN=(WHEN=(242,2,ZD,EQ,26),OVERLAY=(39X,148,12,241:C'B')),
IFTHEN=(WHEN=(242,2,ZD,EQ,27),OVERLAY=(39X,160:220,12,241:C'B')),
IFTHEN=(WHEN=(242,2,ZD,EQ,28),OVERLAY=(39X,172:220,12,241:C'B')),
IFTHEN=(WHEN=(242,2,ZD,EQ,29),OVERLAY=(39X,184,12,241:C'B')),
IFTHEN=(WHEN=(242,2,ZD,EQ,30),OVERLAY=(39X,196:220,12,241:C'B')),
IFTHEN=(WHEN=(242,2,ZD,EQ,31),OVERLAY=(39X,208:220,12,241:C'B'))
SORT FIELDS=(233,9,CH,A),EQUALS
SUM FIELDS=(40,4,44,4,48,4,52,4,56,4,60,4,64,4,68,4,72,4,
76,4,80,4,84,4,88,4,92,4,96,4,100,4,104,4,108,4,
112,4,116,4,120,4,124,4,128,4,132,4,136,4,140,4,144,4,
148,4,152,4,156,4,160,4,164,4,168,4,172,4,176,4,180,4,
184,4,188,4,192,4,196,4,200,4,204,4,208,4,212,4,216,4,
231,1),FORMAT=PD
OUTREC IFOUTLEN=219,
IFTHEN=(WHEN=(39,2,CH,EQ,C'X'),OVERLAY=(40:179X)),
IFTHEN=(WHEN=(231,2,PD,EQ,01),OVERLAY=(52:167X)),
IFTHEN=(WHEN=(231,2,PD,EQ,02),OVERLAY=(64:155X)),
IFTHEN=(WHEN=(231,2,PD,EQ,03),OVERLAY=(76:143X)),
IFTHEN=(WHEN=(231,2,PD,EQ,04),OVERLAY=(88:131X)),
IFTHEN=(WHEN=(231,2,PD,EQ,05),OVERLAY=(100:119X)),
IFTHEN=(WHEN=(231,2,PD,EQ,06),OVERLAY=(112:107X)),
IFTHEN=(WHEN=(231,2,PD,EQ,07),OVERLAY=(124:95X)),
IFTHEN=(WHEN=(231,2,PD,EQ,08),OVERLAY=(136:83X)),
IFTHEN=(WHEN=(231,2,PD,EQ,09),OVERLAY=(148:71X)),
IFTHEN=(WHEN=(231,2,PD,EQ,10),OVERLAY=(160:59X)),
IFTHEN=(WHEN=(231,2,PD,EQ,11),OVERLAY=(172:47X)),
IFTHEN=(WHEN=(231,2,PD,EQ,12),OVERLAY=(184:35X)),
IFTHEN=(WHEN=(231,2,PD,EQ,13),OVERLAY=(196:23X)),
IFTHEN=(WHEN=(231,2,PD,EQ,14),OVERLAY=(208:11X))
/*
Back to top
PeterHolland Global Moderator Joined: 27 Oct 2009Posts: 2481 Location: Netherlands, Amstelveen
I think Skolusu got a stalker here.
Back to top
enrico-sorichetti Superior Member Joined: 14 Mar 2007Posts: 10873 Location: italy
I guess the the TS should change is id from useit to useSkolusu
Back to top
PeterHolland Global Moderator Joined: 27 Oct 2009Posts: 2481 Location: Netherlands, Amstelveen
What do you mean by that Enrico?
Back to top
enrico-sorichetti Superior Member Joined: 14 Mar 2007Posts: 10873 Location: italy
Ok Peter,
You should know that I have a warped mind
just a bit of word play
useit ==> use it
well the ts is not using "it" is rather using "Skolusu" thence
useit==> use it ==> Use Skolusu ==> useSkolusu
cheers
enrico
Back to top
dick scherrer Moderator Emeritus Joined: 23 Nov 2006Posts: 19244 Location: Inside the Matrix
Hello,
I suspect "no more spoon feeding" was not understood. . .
Quote:
another example i was trying.i got the results correct but in case of overflow value zero is getting populated instead of space/low values.
Why does someone believe it appropriate to insert non-numeric values in a numeric field. . .
If you need this quickly, suggest you go ahead and write a small program to do the work.
For your future, you should only provide solutions to ypur employer/client that you actually understand. What happens when there is a sudden requirement change for a critical Production run and you have to tell "them" that you didn't write it and don't really understand how it works.
Back to top
Please enable JavaScript!