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

File handling using cobol


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 8797
Location: Welsh Wales

PostPosted: Sun Dec 04, 2011 7:33 pm
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
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: 1788
Location: Bloomington, IL

PostPosted: Sun Dec 04, 2011 7:43 pm
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
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Sun Dec 04, 2011 8:07 pm
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: 1353
Location: Israel

PostPosted: Sun Dec 04, 2011 8:35 pm
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: 2455
Location: Hampshire, UK

PostPosted: Sun Dec 04, 2011 11:58 pm
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

Moderator Emeritus


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

PostPosted: Mon Dec 05, 2011 11:21 am
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
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

Moderator Emeritus


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

PostPosted: Wed Dec 07, 2011 10:44 am
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
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: 1788
Location: Bloomington, IL

PostPosted: Wed Dec 07, 2011 4:42 pm
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Dec 07, 2011 5:06 pm
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: 8797
Location: Welsh Wales

PostPosted: Wed Dec 07, 2011 5:09 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top