| IBM MAINFRAME HELP & SUPPORT FORUMS Technical Forums for IBM Mainframe Applications like COBOL, JCL, CICS, DB2, FileAid, DFSORT, Endevor, Xpediter, CoolGen, CA-7&11, AbendAid, IMS, IDMS, PL/I, MqSeries, SyncSort, Assembler, ChangeMan, Easytrieve, InterTest, REXX, CLIST etc...
|
| View previous topic :: View next topic |
| Author |
Message |
hazard84414
Joined: 20 May 2006
Posts: 4
|
| Posted: Sun May 21, 2006 7:38 pm Post subject: Could you give me a sample which declare a array and how to |
|
|
Hi, everyone:
Could you give me a sample which declare a array and how to use it ? |
|
| Back to top |
|
banu
Joined: 09 Aug 2005
Posts: 8
Location: Chennai
|
| Posted: Tue May 23, 2006 3:41 pm Post subject: Re: Could you give me a sample which declare a array and how |
|
|
DCL
NAME(3) CHAR(1) INIT(' ');
/* NAME -> Array */
Get List (Name); /* Get the Input */
Do I = 1 to Hbound(Name,1); /* Hbound -> Highest limit of the array */
Put list (Name(i)); /* Display the Output */
End;
-- I Hope this is what you required... |
|
| Back to top |
|
banu
Joined: 09 Aug 2005
Posts: 8
Location: Chennai
|
| Posted: Tue May 23, 2006 3:52 pm Post subject: Re: Could you give me a sample which declare a array and how |
|
|
| In my previous example, I forgot to give declaration for the variable 'I'. |
|
| Back to top |
|
| |
THIS IS AN ARCIVE FORUM IN READ ONLY MODE. IF YOU WANT TO ASK YOUR DOUBTS USE THE ACTUAL FORUM
|