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
 

 

File handling using cobol

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Ramanujamsolaimalai

New User


Joined: 20 Sep 2011
Posts: 7
Location: India

PostPosted: Sun Dec 04, 2011 7:26 pm    Post subject: File handling using cobol
Reply with quote

Hi!

I have a 20 record in VSAM file from coloumn 1 to 30 take. I need to copy all the records only in coloum 8 to 15 to another vsam file. How can i do that? Does inrec and outrec field help me?
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Sun Dec 04, 2011 7:33 pm    Post subject:
Reply with quote

Yes, which sort product is installed at your site.
Back to top
View user's profile Send private message
Ramanujamsolaimalai

New User


Joined: 20 Sep 2011
Posts: 7
Location: India

PostPosted: Sun Dec 04, 2011 7:36 pm    Post subject:
Reply with quote

Could you give me exact syntax for that operation?
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Sun Dec 04, 2011 7:43 pm    Post subject:
Reply with quote

Ramanujamsolaimalai wrote:
Could you give me exact syntax for that operation?

Not until you tell us what sort product is installed at your site.

(Hint: despite the title of this thread, it's not COBOL.)
Back to top
View user's profile Send private message
Ramanujamsolaimalai

New User


Joined: 20 Sep 2011
Posts: 7
Location: India

PostPosted: Sun Dec 04, 2011 7:46 pm    Post subject:
Reply with quote

Oh! I didn't notice exactly your question last time. Actually I have no idea about sort product installed in our system. I'm working in ibm mainframe with z/os. I just use normal syntax of inrec and outrec fields in jcl. Actually what you mean by sort product, may i know?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7904
Location: Bellevue, IA

PostPosted: Sun Dec 04, 2011 8:07 pm    Post subject:
Reply with quote

When you use a job that has EXEC PGM=SORT, there are multiple possible programs being used, depending upon the site -- SYNCSORT and DFSORT (IBM's product) being the most common. The way to tell is to look at the output of a SORT step -- it'll tell you which product; or, you can look at the messages coming out -- if they start WER then it is SYNCSORT.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1218
Location: Israel

PostPosted: Sun Dec 04, 2011 8:35 pm    Post subject: Reply to: File handling using cobol
Reply with quote

1. Read expat answer in this thread and learn which SORT product you are using.
2. You should ask your colleagues / support for the location of the SORT documentation.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1712
Location: UK

PostPosted: Sun Dec 04, 2011 11:58 pm    Post subject:
Reply with quote

You do not use INREC and OUTREC fields in JCL - look at the JCL Language Reference manual and try and find them. These arte specific to some program that your JCL tells the OS you want to run.
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Mon Dec 05, 2011 11:21 am    Post subject:
Reply with quote

Hello,

Quote:
I'm working in ibm mainframe with z/os.
This is tru of almost everyone here. . .

Quote:
I just use normal syntax of inrec and outrec fields in jcl.
Find whoever told you this and explain that they should not provide information. . . This is completely wrong and causes much confusion and wasted time.

Worth repeating several times each new batch of "developers". JCL is NOT utility or sort control statements. JCL is that which executes programs and/or PROCedures.
Back to top
View user's profile Send private message
rakesha.hg

Active User


Joined: 21 Mar 2008
Posts: 161
Location: bangalore

PostPosted: Tue Dec 06, 2011 6:13 pm    Post subject: Reply to: File handling using cobol
Reply with quote

Quote:
JCL is NOT utility or sort control statements. JCL is that which executes programs and/or PROCedures.


this always reminds me of my friend .... who didnt get through an interview for telling JCL is an Utility icon_eek.gif
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Wed Dec 07, 2011 10:44 am    Post subject:
Reply with quote

Hello,

Quote:
this always reminds me of my friend .... who didnt get through an interview for telling JCL is an Utility
Yes, and this happens rather frequently. . .

I do not understand why teachers/mentors give this misinformation to so many. Of course, they will not be held responsible.

I've worked with several organizations where i was asked to participate in new-hire interviews and have seen several interviews cut short because the candidate had no foundation at all.
Back to top
View user's profile Send private message
rakesha.hg

Active User


Joined: 21 Mar 2008
Posts: 161
Location: bangalore

PostPosted: Wed Dec 07, 2011 4:35 pm    Post subject: Reply to: File handling using cobol
Reply with quote

hi D,

Quote:
I do not understand why teschers/mentors give this misinformation to so many. Of course, they will not be held responsible.
good insight about the responsibility .... but i still think as a learner we need to take the responsibility to make our foundation strong. These days IT companies cannot afford to wait for your training time icon_rolleyes.gif
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Wed Dec 07, 2011 4:42 pm    Post subject:
Reply with quote

dick scherrer wrote:
I do not understand why teschers/mentors give this misinformation to so many.

Because we are now several generations (educational, not biological) into the process where ignorant and incompetent instructors pass misinformation on to students, who are then in turn recruited as instructors without showing any ability to do the job icon_mad.gif
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Wed Dec 07, 2011 5:06 pm    Post subject: Re: Reply to: File handling using cobol
Reply with quote

Quote:
These days IT companies cannot afford to wait for your training time


Yet they can only afford not to train while they can find clients to pay for stupid errors. I imagine that with Service Level Agreements and Penalty Clauses, there shouldn't really be that many clients around. Unless you overcharge everybody grossly (compared to wages paid, sensible cost levels, etc) and can yet still be cheaper than the alternative.

Perhaps the future is entire systems written in SORT, taking CSVs from Oracle DBs and distributing them to Excel spreadsheets as new CSVs. JCL will be phased-out in favour of Language of Controlling Jobs, in which you can write everything else you need. Abends will be dealt with by peeling off records from input datasets with SORT (new sort function ABPEEL will at least, by default, record the data excluded - leading to inane questions like "the ABPEEL log is full, what do I do now? Do I increase the primary from 5,000 cylinders, or can I safely delete it?")
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed Dec 07, 2011 5:09 pm    Post subject:
Reply with quote

I also believe that they do not want to afford the correct training as this may well dig into company profits icon_eek.gif
Back to top
View user's profile Send private message
rakesha.hg

Active User


Joined: 21 Mar 2008
Posts: 161
Location: bangalore

PostPosted: Wed Dec 07, 2011 5:12 pm    Post subject: Reply to: File handling using cobol
Reply with quote

Quote:
Abends will be dealt with by peeling off records from input datasets with SORT (new sort function ABPEEL will at least, by default, record the data excluded - leading to inane questions like "the ABPEEL log is full, what do I do now? Do I increase the primary from 5,000 cylinders, or can I safely delete it?"

icon_biggrin.gif
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm
This topic is locked: you cannot edit posts or make replies. RANDOM Function in COBOL swapnil781 COBOL Programming 2 Tue Nov 15, 2016 6:17 pm


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