Joined: 02 Dec 2002 Posts: 100 Topics: 2 Location: Pasadena, California, USA
Posted: Fri Mar 21, 2003 5:35 pm Post subject:
The answers given would depend on your level of experience. Little experience would dictate detailed answers, lots of experience dictates very brief answers.
Please indicate your experience level so we may taylor answers accordingly.
Ps: Please avoid typing everyting in CAPS. It sends out a message that you are yelling. I took the liberty of editing the post to remove all caps post.As captbill said please tell us your level of expertise
DEAR SIR, I AM A MAINFRAME PROGRAMMER HAVING ONE YEAR EXPERIENCE.
I HAVE THE FOLLOWING DOUBTS FOR A LONG TIME. MY COMPANY DOESN\'T ALLOW TO CHECK THIS IN MY TERMINAL.
PLEASE CHECK THIS IN VS COBOL II AND ANSWER THE FOLLOWING - PLEASE!
Last edited by mcmillan on Tue Jun 03, 2003 1:44 pm; edited 1 time in total
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
Posted: Sun Mar 23, 2003 7:56 am Post subject:
mcmillan,
Even though OS/VS COBOL & VS COBOL II are withdrawn from service many shops still have those compilers and still code programs even though it is not supported by IBM now. If you see the link I gave in the first post you will see that Enterprise COBOL is the latest version in cobol. As per the differences between the old and newer versions there are many and now the latest version of cobol is equipped to handle XML also and there are many intrinsic functions available which makes the life of the programmer easy.Check the link for the differences between the older and new version of cobol
if i delete a vsam file(cobol seq,rel or indexed) is it actually work or not?
I dont quite understand the question.But if your question is the record physically deleted from the vsam files then the record is not physically deleted in ESDS, it is just flagged as delete and you cannot claim the deleted space. For RRDS and KSDS the record is deleted physically.
As for comp/comp-3 items accepted via sysin then put the comp/comp-3 value in a dataset and assign it to the sysin dd and you can read the file in the program.And you can initialize comp/comp-3 items
Hope this helps...
cheers
kolusu
PS: Please stop typing with your caps lock on.I already mentioned it once.
Joined: 07 Feb 2003 Posts: 266 Topics: 1 Location: Edison, NJ USA
Posted: Sun Mar 23, 2003 10:58 am Post subject:
Hi Mcmillan,
If you want to input comp-3/comp fields to your pgm from JCL, you can try one of the following:
1) Use a key (or combination of keys) that would produce the bit configuration you desire for the field. I'm not sure that you can construct key combinations to provide ALL 255 bit combinations possible in a byte of data. You can check an EBCDIC conversion chart.
For example, if you want to input a comp-3 positive 13, you have to enter 2 keyboard key combinations (or a single key) representing '01' and '3C' into the input line. To enter a binary value convert it from decimal and then input the binary value as described above.
2) The alternative, much easier, BTW, is to input the "display data type" version of the field and then "read" it into a "display" field and move it to its comp/comp-3 counterpart in the pgm code.
These alternatives apply to both SYSIN and PARM inputs.
01 A PIC S9(5) COMP VALUE 25..
ACCEPT A. // Now can I give an INPUT for this through JCL\'s SYSIN statement
2. WHILE DELETING A VSAM/RELATIVE OR VSAM/IDEXED FILE\'s RECORD THROUGH VS COBOL II (using DELETE INVALID KEY IS THE RECORD ACTUALLY DELETED? (not through CICS)
3. CAN I MOVE A COMP/COMP-3 ITEM TO ANOTHER ITEM(such as USAGE DISPLAY) IN VS COBOL II?
4. WHAT IS THE OUTPUT?
01 A PIC X(6) VALUE LOW-VALUES.
01 B PIC X(6) VALUE HIGH-VALUES.
DISPLAY A.
please don\'t tell as X\'00000\' , I need the SDSF \'s SYSOUT cotents
DISPLAY B.
5. HOW MANY ALTERNATIVE INDEXES CAN I SPECIFIED FOR AN INDEXED FILE UNDER VS COBOL II?
6. HOW MANY INDEXED CAN I SPECIFIED FOR A TABLE IN VS CBOL II?
7. CAN I USE INSPECT VERB IN CICS+ VS COBOL II PROGRAM?
8. CAN YOU PLEASE GIVE ME AN REXX EXEC EXAMPLE THAT CONTAINS AN EMBEDDED JCL (TO RUN A COBOL PROGRAM)?
Thank you
Last edited by mcmillan on Tue Jun 03, 2003 1:00 pm; edited 1 time in total
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
Posted: Fri Mar 28, 2003 11:06 am Post subject:
Mcmillan,
I have already mentioned twice to you not to post in caps, as it means you are yelling. I have edited your first post to be in small letters.And once again you still keep posting in caps.If you really keep up this up no one is going to answer your queries in future.
Quote:
1. Is it work in vs cobol ii?
01 a pic s9(5) comp value 25..
accept a. // now can i give an input for this through jcl's sysin statement
Answer: NO.The Item you are accepting can be any group item, or an elementary alphabetic, alphanumeric,alphanumeric-edited, numeric-edited or external decimal item.
Quote:
2. while deleting a vsam/relative or vsam/idexed file's record through vs cobol ii (using delete <rec> invalid key <---> verb>,is the record actually deleted? (not through cics)
Answer: Yes. The record is physically deleted from the KSDS/RRDS Clusters
Quote:
3. can i move a comp/comp-3 item to another item(such as usage display)
in vs cobol ii?
Answer: Yes.
Quote:
4. what is the output?
01 a pic x(6) value low-values.
01 b pic x(6) value high-values.
display a. //please don't tell as x'00000' , i need the sdsf 's sysout
cotents
display b.
Answer: If you are that specific about SDSF output then all you will see is spaces for both A and B.
Quote:
5. how many alternative indexes can i specified for an indexed file
under vs cobol ii?
Answer: 253
Quote:
6. how many indexed can i specified for a table in vs cbol ii?
ANswer: It depends on the dimension of the table.check this code. It has 3 indexes for a 3 dimension table.
Code:
01 TABLE-1.
05 TABLE-ENTRY1 OCCURS 10 TIMES
INDEXED BY TE1-INDEX.
10 TABLE-ENTRY2 OCCURS 10 TIMES
INDEXED BY TE2-INDEX.
15 TABLE-ENTRY3 OCCURS 5 TIMES
ASCENDING KEY IS KEY1
INDEXED BY TE3-INDEX.
20 KEY1 PIC X(5).
20 KEY2 PIC X(10).
Quote:
7. can i use inspect verb in cics+ vs cobol ii program?
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
Posted: Sun Mar 30, 2003 1:38 pm Post subject:
mcmillan,
Do you read the posts clearly ? I warned thrice not to post in CAPS and I also mentioned that no is one going to answer your queries if you keep doing that. Still you keep on doing that.
can't you post your queries in small letters? ALso please avoid posting the same question in more than one forum.I deleted the same question posted in the JCL forum.
Until you change your attitude I am not going to answer any of your queries
Can you please explain, What is LIB, MAP, OFFSET? What is the functions & need of them? Where Can I specify AMODE, SSRANGE, FLAG,RENT,RESIDENT etc compiler options? Can I specify with them (with LIB,APOST---) or with my actual compile procedure (IGYWCL)?
2. What is Language Environment? What's the use of it? Is it available with VS COBOL II Under s/390?
3. Sir, What is Spanned file(S like V,F,FB,VB & U)? Can I use this file with VS cobol II? What is the JCL equivalent Recording format for that? Can I specify RECORDING MODE clause in COBOL for VSAM files (my compiler ignores that)?
4. Can I use EXTEND Mode with VSAM/RRDS & KSDS Files Under SEQUENTIAL Access? Can I use SORT/MERGE With RELATIVE & INDEXED File under DYNAMIC Mode?
5. What is USAGE IS POINTER? Can I use PIC clause with this? Can I Move a value & Accept & Display the Pointer contents? (please give an example)
6. Can I pass a VALUE (literal) to subprogram while call by content? (Ex: CALL "PGM01" BY CONTENT 4, BY REFERENCE A.)
7. What is the mean for VS in VS COBOL II? (VISUAL or VIRTUAL)
8. What's COMP-4 & COMP-5 in VS COBOL II? How much storage occupied by each COMP-4/-5 Char? Is COMP-6 available in Mainframes?
9. Can I use COMP-1 & COMP-2 in my program? Can I initialize & accept it from console (yes, without PIC)? Please give me an example?
Can I use Floating points like: 01 AA PIC 9(18 ) VALUE IS 0.656E+02 . If not, how can I use floating points?
10. Can I use the variable in my pgm, which is declare as EXTERNAL in any batch program(not nested) running under the same TSO?
Can I access the GLOBAL Data declared in main program in my sub program(not passed via linkage section)?
Waiting for your reply,
Thanks a lot in Advance Mcmillan
Last edited by mcmillan on Tue Jun 03, 2003 1:07 pm; edited 1 time in total
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
Posted: Thu Apr 03, 2003 11:24 am Post subject:
Mcmillan,
I am glad that you finally paid attention to my posting. Posting in caps means you are shouting or yelling. That is the reason why I wanted you to post in Lower case.
oh Boy you have many questions. But I guess these are are all part of interview questions. can you clarify that?? I am answering the questions,but most of the questions can be easily answered by looking up the manual. If you are not aware this site hosts the manuals also. GO to www.mvsforums.com and you can find all the manuals
For you I would recommend you to go thru the following manuals
1. Sir, This is a part of my VS Cobol II R1 Compile JCL.
000002 //STEP1 EXEC IGYWCL,
000003 // PARM.COBOL='LIB,APOST,XREF,MAP,OFFSET'
Can you please explain, What is LIB, MAP & OFFSET? What is the functions & need of them? Where Can I specify AMODE, SSRANGE, FLAG,RENT,RESIDENT etc compiler options? Can I specify with them (with LIB,APOST---) or with my actual compile procedure (IGYWCL)?
Answer:LIB,APOST,XREF... are basically compiler options.check this link which explains each compiler option in detail.
For second part of the question as to where to specify these options, you can code them on the PARM statement or alternatively code in the program as follows.These should be the first lines (before the Identification division)
Code:
CBL SSRANGE,...
check this link for a detailed explanation of the CBL statement
2. What is Language Environment? What's the use of it? Is it available with VS COBOL II Under s/390?
Language Environment, an element of both OS/390 and VM/ESA operating systems creates a single run-time environment for multiple high level languages including:
C/C++ ,COBOL ,PL/I and Fortran as well as Language Environment enabled assembler programs.
With a single run-time environment, incompatibilities between language specific run-time environments are eliminated. This means that your company's COBOL and C applications, for example, could communicate efficiently and easily together. In addition, your programmers, with various language skills, could work together to build applications with component programs written in a variety of languages. The end result is code that runs faster, is less prone to errors, and is easier to maintain.
Language Environment also combines essential run-times services, such as mathematical functions,storage management ,consistent condition handling and
date and time services ,all of these services are available through a set of interfaces that are consistent across programming platforms.
And since the library and callable interface are common, your applications behave consistently and predictably.
Quote:
3. Sir, What is Spanned file(S like V,F,FB,VB & U)? Can I use this file with VS cobol II? What is the JCL equivalent Recording format for that?
Can I specify RECORDING MODE clause in COBOL for VSAM files (my compiler ignores that)?
Answer: V,F,FB,VB & U are basically record formats.They are not spanned.Spanned records are in format S. A spanned record is a QSAM logical record that can be contained in one or more physical blocks. You can specify RECORDING MODE S for spanned records in QSAM files assigned to magnetic tape or to direct-access devices.
V - variable file
F - Fixed
FB - Fixed block file
VB - variable block file
U - Undefined file format
Check the following links for detailed explanation of the various recfm
NO You don't have to specify the RECORDING mode for VSAM FILES
Quote:
4. Can I use EXTEND Mode with VSAM/RRDS & KSDS Files Under SEQUENTIAL Access?
Can I use SORT/MERGE With RELATIVE & INDEXED File under DYNAMIC Mode?
Answer:Yes you can use EXTEND mode with RRDS & KSDS files under sequential access .For an ESDS or RRDS file opened EXTEND, the added records are placed after the last existing records in the file.For a KSDS file opened EXTEND, each record you add must have a record key higher than the highest record in the file.
Quote:
5.What is USAGE IS POINTER? Can I use PIC clause with this? Can I Move a value & Accept & Display the Pointer contents? (please give an example)
Answer:Pointer data items can contain virtual storage addresses. You define them explicitly with the USAGE IS POINTER clause in the Data Division or implicitly as ADDRESS OF special registers.NO you cannot use a PIC clause with them.You cannot move a value to a pointer. But you can use a SET statement.
Check this link for detailed explanation of pointer
7. What is the mean for VS in VS COBOL II? (VISUAL or VIRTUAL)
Answer: I beleive it is VIRTUAL but not sure
Quote:
8.What's COMP-4 & COMP-5 in VS COBOL II? How much storage occupied by each COMP-4/-5 Char? Is COMP-6 available in Mainframes?
Comp-4 is nothing but an equivalent of BINARY.It occupies the same storage as that of a comp item.Comp-5 and comp-6 are not available in VS COBOL II
If the pic clause conatains 1 through 4 digits then the stogatage occupied is 2 bytes (halfword)
If the pic clause conatains 5 through 9 digits then the stogatage occupied is 4 bytes (fullword)
If the pic clause conatains 10 through 18 digits then the stogatage occupied is 8 bytes (doubleword)
Quote:
9. Can I use COMP-1 & COMP-2 in my program? Can I initialize & accept it from console (yes, without PIC)? Please give me an example?
Can I use Floating points like: 01 AA PIC 9(1 VALUE IS 0.656E+02 . If not, how can I use floating points?
Answer:COMPUTATIONAL-1 and COMPUTATIONAL-2 items (internal floating-point) cannot have PICTURE strings.YOu can use a move statement to populate the values
Quote:
10. Can I use the variable in my pgm, which is declare as EXTERNAL in any batch program(not nested) running under the same TSO?
Can I access the GLOBAL Data declared in main program in my sub program(not passed via linkage section)?
Answer:The EXTERNAL clause specifies that the storage associated with a data item is associated with the run unit rather than with any particular program within the run unit. An external data itemcan be referenced by any program in the run unit that describes the data item.References to an external data item from different programs using separate descriptions of the data item are always to the same data item. In a run unit, there is only one representative of an external data item.
Yes you can access the GLOBAL Data declared in main program in my sub program(not passed via linkage section)?
Sir, Thank you somuch for your excellent help. Sir. I already have the books you specified. Please clarify my doubts.. please.
1. I Need a cobol SPECIAL-NAMES paragraph to change 'L' as Low-value & 'H' as high value. (DISPLAY HIGH-VALUES should print 'HHHHHH' )
2. I know about QSAM & VSAM Files. What is SAM File?
3. I NEED to assign a VSAM/ESDS file for cobol seq organization. Let my jcl dd name is MAC.
Is it 'ASSIGN TO AS-MAC' or 'ASSIGN TO SEQUENTIAL-AS-MAC' in SELECT clause? Can I use any Label instead of SEQUENIAL? Is label must? What is the meaning of this AS?
4. Is any possibility of getting an Error code 98 in Cobol (IBM COBOL/ENTERPRISE COBOL)Program?
5. Can I use VS COBOL II in TPF? (and also in z/0S or z/OS.e)
6. I Can pass a file to suprogram. Where I declare the file data in subprogram (In File section or Linkage section). Can you please give me an exmple.
But I can use an external file in my suprogram. What is the difference b/w passing afile & using an external file in suprograms?
7. What is the output in mainframe under VS COBOL II? And why?
01 A PIC S9 VALUE -0. //(yes, negative zero)
01 B PIC S9 VALUE +0.
DISPLAY A, B.
Mcmillan
Last edited by mcmillan on Tue Jun 03, 2003 1:11 pm; edited 1 time in total
Joined: 07 Feb 2003 Posts: 266 Topics: 1 Location: Edison, NJ USA
Posted: Sun Apr 06, 2003 2:32 pm Post subject:
Hi Mac,
Kolusu is probably resting now, so I'll give it a try.
Quote:
1. I Need a cobol SPECIAL-NAMES paragraph to change 'L' as Low-value & 'H' as high value. (DISPLAY HIGH-VALUES should print 'HHHHHH' )
Sorry, but you can't do that. You don't say why you want to do that, so I can't give you a work around.
Quote:
2. I know about QSAM & VSAM Files. What is SAM File?
It just means "Sequential Access Method" and is used to reference ALL those kinds of files. E.g. QSAM, BSAM, etc. (no, not VSAM; the S in VSAM is for Storage.)
Quote:
3. I NEED to assign a VSAM/ESDS file for cobol seq organization. Let my jcl dd name is MAC.
Is it 'ASSIGN TO AS-MAC' or 'ASSIGN TO SEQUENTIAL-AS-MAC' in SELECT clause?
Can I use any Label instead of SEQUENIAL? Is label must? What is the meaning of this AS?
What version of COBOL are you using? Hyphenated assign clauses aren't used in later versions. Try using just "MAC". It should be OK.
Quote:
4. Is any possibility of getting an Error code 98 in Cobol (IBM COBOL/ENTERPRISE COBOL)Program?
Not yet. But who knows about the future?
Quote:
5. Can I use VS COBOL II in TPF? (and also in z/0S or z/OS.e)
6. I Can pass a file to suprogram. Where I declare the file data in subprogram (In File section or Linkage section). Can you please give me an exmple.
But I can use an external file in my suprogram. What is the difference b/w passing afile & using an external file in suprograms?
Can't say. I haven't used them.
Quote:
7. What is the output in mainframe under VS COBOL II? And why?
01 A PIC S9 VALUE -0. //(yes, negative zero)
01 B PIC S9 VALUE +0.
DISPLAY A, B.
I haven't done this either, but I do know that zero is a "positive" number. That is, when it's represented in a register, the high order bit of the register is a zero. That bit for negative numbers contains a 0ne.
Try it and let us know if 1) it passes the compiler's snicker test and 2) it will DIPLAY as the zero in "-20" DISPLAYs. BTW, do you have access to a computer? Sounds like you do.
All times are GMT - 5 Hours Goto page 1, 2, 3, 4Next
Page 1 of 4
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum