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

JCL in loop to read till end of file


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ihatesugar
Warnings : 1

New User


Joined: 22 Oct 2006
Posts: 43

PostPosted: Tue Feb 06, 2007 6:45 pm
Reply with quote

Hi ,

i have the following requirement:-

i have to a Parmfile which contains records of different customers.
i want to pick up on record, go to another flatfile and fetch all the records for that customer and write to a new file.

i want to do this till end of parmfile.

But my requirement is , i cant use any programs, i have to do this using the JCL , control cards only.

Any suggestions will be of great help.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Tue Feb 06, 2007 7:31 pm
Reply with quote

JCL is a control language, not a programmatic one. You can't read files using JCL only.

O.
Back to top
View user's profile Send private message
ihatesugar
Warnings : 1

New User


Joined: 22 Oct 2006
Posts: 43

PostPosted: Tue Feb 06, 2007 7:49 pm
Reply with quote

Cant i do it using some available JCL utilities???
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Tue Feb 06, 2007 9:09 pm
Reply with quote

Hello,

Please explain why you can't use any programs. Is there some business reason or is this meant to be a learning experience or a test of what you know or can find out?

You can do this using sort. Sort both files in customer number order. Match the 2 files placing the records you want in a new output file.
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Tue Feb 06, 2007 10:38 pm
Reply with quote

A lot of IDCAMS might also do the job but I agree with dick: who would want to do this and why icon_rolleyes.gif
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Wed Feb 07, 2007 1:15 am
Reply with quote

ihatesugar wrote:
But my requirement is , i cant use any programs ...


That's funny. I could swear that SORT, IDCAMS, and all of the IBM Utilities are all programs. I guess there's something new to learn everyday! icon_wink.gif
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Wed Feb 07, 2007 1:26 am
Reply with quote

If ya have control cards, it is no longer a program. . . . ?icon_confused.gif
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Wed Feb 07, 2007 1:38 am
Reply with quote

Even the machinecode we used to type at the console in the 6=xties to start the engine of the cardreader or tape-unit were tiny little programs. With machinecode we even composed music; the lighter the calculation the deeper the bass-sound, the heavier the calculation the higher the sound. Even behind this machincode there still was the operating system which at it's own also was a program.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Wed Feb 07, 2007 5:35 am
Reply with quote

Oh you nasty people, crushing that gentle person's soul like a nasty bug, for shame, for shame..... icon_wink.gif
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Wed Feb 07, 2007 7:16 am
Reply with quote

No crush intended (and apologies to TS if it seemed that way) - just trying to provide some assistance and maybe even understand the real requirement.

If this is a test or a training exercise, that's one thing but if mgt makes those kind of directives quite another.

Somewhere between many and most of us who use this forum are "programmers" at some level and if some mgt somewhere provides direction that says code cannot be used by the programmers - it just makes one wonder. . . icon_confused.gif
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Wed Feb 07, 2007 3:47 pm
Reply with quote

Like dick wrote icon_wink.gif
Back to top
View user's profile Send private message
ihatesugar
Warnings : 1

New User


Joined: 22 Oct 2006
Posts: 43

PostPosted: Sat Feb 10, 2007 12:37 pm
Reply with quote

Sorry to be late to get back to thank you all for u .... uhhhhh .. what i say ... soul crushing advices ....

anyways let me make a point clear... i had a limitation of not using a cobol program coz it was an urgent requirement and movement of the code to production stages would was scheduled to happen after a mont h or so... so for this urgent reuirement all i could use was JCL ....

One advice for u people... if you have a solution to the problem stated on forum only then reply... if u dont have a solution , better shut your mouth and wait for someone to come up with a solution.... i know i must not use the Kind of language i;m using , but it was hilarious to read all the crap you people were putting up ... someone explaining the crap about programs and all.....

i'm a novice in Mainframes to advice you all this ... though i would like to say i'm working for one of the best IT comapany in the WORLD...

anways ... hope you people keep this in mind and the moderators too!!!!

anyways i got the solution for the problem....

no offence intended!!!
cheers!!!
Back to top
View user's profile Send private message
IQofaGerbil

Active User


Joined: 05 May 2006
Posts: 183
Location: Scotland

PostPosted: Sat Feb 10, 2007 8:09 pm
Reply with quote

Hey ihatesugar,
maybe you should take some other advice, which would be -
don't upset the contributers to this forum if you want them to assist you in future.

As far as I can tell, the replies to your original query did not supply soulutions as you have demanded because your query was not explicit enough!
As you have conceded belatedly ie
'make a point clear'
'a limitation of not using a COBOL program '
having originally omitted the COBOL bit which makes a big difference!

The rest of the replies were an informal discussion trying to figure out what you were actually asking in the first place.
If we followed your rule, there would be no replies at all because an obvious 'solution' was not possible (based on your scant information.)

Now we all make mistakes and that is understood but until you come back with the correction what are we to do?

Maybe we should fiollow your lead and say .... if you have a query for this forum, make sure you specify it clearly, leave no ambiguity, check that it will be understood.... if you cannot then shut your mouth and don't bother asking for help.

Contributers in the main in this site are trying to be helpful, distribute information and even have a laugh now and again.

This is all done on our own time, we are not forced to do it you know.

Guys like William, Dick, Frank etc spend a lot of time and effort to disseminate their experience thoughout the mainframe community for which they should be thanked and not derided.

Lecture over...

Arrabest!
Back to top
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 459
Location: Belgium

PostPosted: Sat Feb 10, 2007 9:22 pm
Reply with quote

Quote:
i had a limitation of not using a cobol program coz it was an urgent requirement
and movement of the code to production stages would was scheduled to happen after
a mont h or so... so for this urgent reuirement all i could use was JCL ....

You are new to mainframe, and someone ( your manager ) or yourself by personal initiative
wants to modify data in production !!! And moreover quickly. Find the error.

New at the point you don't know difference between program and JCL.
I call that "suicide".
Quote:
One advice for u people
One advice for u guy , I am very proud of my profession, I love it , I am working hard since long time, I am learning every day, I discover always, I also teach some matters and find now very sad that some people just can believe it is "no effort" to work in IT.
No No My work is much much more complex you can just imagine.
It is logic, discipline, stress, huge knowledge, team working, effort, acuteness, obstinacy, and also satisfaction, joy, gratification.

And I am working for one of biggest Bank in the WORLD


So be respectful for people from who you can receive help, and you will receive respect from us too. If ever it is of some interest for you...
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Sat Feb 10, 2007 9:41 pm
Reply with quote

ihatesugar wrote:
anyways i got the solution for the problem....
That is great, what is it, please post it so that next time somebody has a similar requirement, it can be found by search. Think of it as helping another novice in the future. icon_biggrin.gif
Quote:
no offence intended!!!
None taken, we all have been there before, frustrated by events and lack of resources.

Please feel free to continue your education, like we all are, by reading these forums and please do not hesitate to ask next time you have a question.

Incidentally, how did you resolve your "Help Required For Use of HEX Values" problem?

Looking forward to your solution,

Bill

icon_biggrin.gif By the way, why do you hate sugar? icon_confused.gif
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Sat Feb 10, 2007 9:45 pm
Reply with quote

Hello IHSugar,

If your IT organization allows/permits you to update production data on the "fly" with no tracking or controls, i can guarantee you it is NOT
Quote:
"one of the best IT company in the WORLD".


As far as your words - it may be that you're just a frustrated rookie. We'll try to overlook that.

Please be assured that really good IT organizations have a formal Emergency Repair Procedure that provides a vehicle to promote code "in the middle of the night". Taking a month to install an emergency fix while allowing someone to toss in some workaround "code" (which is what you did even though you didn't write cobol) is completely nonsense.

Of course you meant offense. Sometimes we talk/type faster than our brain can consider. Most of us won't take offense because we've been really frustrated and know the feeling. We don't always contain ourselves either. . .

Be well and visit again.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sat Feb 10, 2007 9:47 pm
Reply with quote

Hi ihatesugar,

You didn't tell us what the solution was. I know you don't feel you owe the repliers anything, but the great majority of forum users here may be helped by it just as you hoped to be helped. What say you?

To all,

I hope this thread gets wide readership because it addresses 2 of my 3 pet peeves: 1) the thought that JCL and utils are the same thing, 2) assuming that one sentence will adequately describe a problem (" thanks for your reply but I can't use COBOL in my solution" or I can't do it that way because I'm running it in production) icon_evil.gif

The 3 rd is using "version" when referring to a GDG "generation".

Oops, just thought of a 4th: requestors who disappear w/o a trace after they get their ans. No indication for the other forum members of what worked or how it worked, no thanx, no nothing.
Back to top
View user's profile Send private message
ihatesugar
Warnings : 1

New User


Joined: 22 Oct 2006
Posts: 43

PostPosted: Sun Feb 11, 2007 3:19 pm
Reply with quote

:D

i shall post the solution soon... with the complete process....

and thanks to one and all ... will keep coming back to you people with future problems and sometimes with the soltuion..


for the HEX converison , i used one of the soltions suggested in this forum itself....

Thanks one and all for the valuable advices :)
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Unable to interpret a hex value to De... COBOL Programming 7
No new posts how to eliminate null indicator value... DB2 7
No new posts Format Binary file to EBCDIC JCL & VSAM 4
No new posts Binary File format getting change whi... All Other Mainframe Topics 7
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
Search our Forums:

Back to Top