Parm limit

In this Mainframe Forum - You can post your queries on JCL, OS/390 JCL, MVS JCL, z/OS JCL, JES2 & JES3

Moderators: Frank Yaeger, DikDude, Moderator Group

Post Reply
archup20
Member
Posts: 31
Joined: Thu Dec 09, 2010 9:53 am

Parm limit

Post by archup20 » Mon Aug 13, 2012 11:56 am

I need to send around 300 different values to the cobol program via parm card. I was thinking of using a file. What is the maximum limit of the Parm? I checked the forum and found that the limit is 100. Will that be applicable to the file also? In my requirement it is specifically mentioned to use parm. Are there any sample JCLs and COBOL codes to show Parm using files? Please help..

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Mon Aug 13, 2012 2:45 pm

PARM has a specifc meaning when you talk about "Passing PARM to COBOL Program". The limit is 100 charachters.

Perhaps, you work by using SYSIN as described in this link apart from many other available on this Forum.
Regards,
Anuj

archup20
Member
Posts: 31
Joined: Thu Dec 09, 2010 9:53 am

Post by archup20 » Mon Aug 13, 2012 3:41 pm

My requirement specifically asks for a file to be passed from JCL to COBOL using PARM. I wanted to know thestructure of Linkage Section for the file if its passed using PARM.

William Collins
Active Member
Posts: 732
Joined: Thu May 24, 2012 4:07 am

Post by William Collins » Mon Aug 13, 2012 6:38 pm

Well, I think you'll have to copy out/paste the bit from your specification.

With PARM, you can pass up to 100 characters to a program specified on the PGM=, as long as that program defines it correctly in the LINKAGE SECITON and on the PROCEDURE DIVISION USING.

Can you pass "a file", no. Can you pass a dataset-name, yes, but then it is up to you to do something to be able to read it.

DikDude
Moderator
Posts: 1001
Joined: Fri Jul 22, 2011 8:39 am
Location: usa

Post by DikDude » Mon Aug 13, 2012 7:07 pm

My requirement specifically asks for a file to be passed from JCL to COBOL using PARM.
It sounds as though your "requirement" is incorrect or maybe it is just misunderstood.

As WC mentioned, you need to post this part of your requirement.

Then we may be able to offer alternative, acceptable suggestions.
Have a good one

NicC
Active Member
Posts: 650
Joined: Sun Jul 24, 2011 5:27 pm
Location: Down on the pig farm

Post by NicC » Tue Aug 14, 2012 8:32 am

Are you being asked to pass a dataset name as a parameter or to pass you parameters in a dataset? If the former then you have to do all sorts of activities for dynamic allocation. If the latter then you just have to add and read a file as normal.
Regards
Nic

archup20
Member
Posts: 31
Joined: Thu Dec 09, 2010 9:53 am

Post by archup20 » Tue Aug 14, 2012 10:58 am

NicC, its the latter option that is I have to pass parameters in a dataset.
In the requirements they had used the word PARM card and file, hence the confusion.
As you have mentioned it is an input file to be read in the program.

Got to know about it today. :)

Just curious on how a dataset name passed works??
how the content of the dataset shoul be?

NicC
Active Member
Posts: 650
Joined: Sun Jul 24, 2011 5:27 pm
Location: Down on the pig farm

Post by NicC » Tue Aug 14, 2012 1:26 pm

I really do not understand your last line! However, to use a dataset that is not specified in the JCL you need dynamic allocation. There should be topics on this in the forum - search on BPXWDYN. Also search on Google for other information on BPXWDYN.
Regards
Nic

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Tue Aug 14, 2012 1:58 pm

If I read through this thread, unfortunately, it's confusing at its best! With a Subject-line as "PARM Limit" now we're talking about "Dynamic allocation of file in COBOL"! :?

And what is this saying asking
I have to pass parameters in a dataset.
Regards,
Anuj

NicC
Active Member
Posts: 650
Joined: Sun Jul 24, 2011 5:27 pm
Location: Down on the pig farm

Post by NicC » Tue Aug 14, 2012 3:29 pm

Anuj,

Notice that I more or less declined to be drawn on the dynamic allocation question!

As to the second point, too many (up to 300) parameters need to be passed, The only real way is to read them in from a dataset. A lot of parms (they probably are not parms in the real sense of the word) but some windoze programs have zillions (ok, quite a few) - just look at their init files - all those things sectioned off by []s
Regards
Nic

DikDude
Moderator
Posts: 1001
Joined: Fri Jul 22, 2011 8:39 am
Location: usa

Post by DikDude » Tue Aug 14, 2012 8:57 pm

It will probably if TS posts a sample (not 300) of these "cards/parms/whatever" and explains how they will be used by the code.
Have a good one

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Wed Aug 15, 2012 2:29 pm

Hi Nic,

Yes, I noticed that. However, the other query should have come in a new thread from OP. We don't have a(n) (active) Moderator for this part of the Forum otherwise it could have been splitted. Possibly we'll get one soon.

I'm stiil bit confused with the request from OP, I'll observe this thread slowly now.
Last edited by Anuj Dhawan on Thu Aug 16, 2012 9:26 am, edited 1 time in total.
Regards,
Anuj

NicC
Active Member
Posts: 650
Joined: Sun Jul 24, 2011 5:27 pm
Location: Down on the pig farm

Post by NicC » Thu Aug 16, 2012 8:25 am

My take was that the enquiry re dynamic allocation came about because I mentioned that it would be needed IF the parameter was a dataset name containing the actual parms and that TS was only asking "I've never heard of dynamic allocation - what can you tell me about it. Just out of interest." However, it would appear that there is, now, no parameter being passed by way of JCL.
Regards
Nic

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others