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
 

 

alternate method needed

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
rukkunudeen

New User


Joined: 16 Sep 2008
Posts: 4
Location: chennai

PostPosted: Tue Sep 16, 2008 4:32 pm    Post subject: alternate method needed
Reply with quote

moving one array value to an another array value[both has the same name]
problem is : the array is ambigious[ the copybooks i use use the same name for the array]
Back to top
View user's profile Send private message

Cristopher

New User


Joined: 31 Jul 2008
Posts: 53
Location: NY

PostPosted: Tue Sep 16, 2008 4:55 pm    Post subject: Reply to: alternate method needed
Reply with quote

Please provide some more details as your requirement doesnt look very clear. If you can put these arrays under different 01 group level variables thn by using "of" clause u might be able to resolve this problem.

Cris
Back to top
View user's profile Send private message
rukkunudeen

New User


Joined: 16 Sep 2008
Posts: 4
Location: chennai

PostPosted: Tue Sep 16, 2008 5:02 pm    Post subject: Reply to: alternate method needed
Reply with quote

i have two copy books

copy sfm0030
copy sfm0040

both uses same array called s123
01 s123 occurs 8 times indexed by wsub.
05 jobnm
05 date
05 time

01 s123 occurs 8 times indexed by wsub1.
05 jobnm
05 date
05 time
i want to move jobnm of 30 to jobnm of 40

MOVE JOBNM(WSUB) OF SFM0030 TO JOBNM(WSUB1) OF SFM0040. IS NOT WORKING!!!!!!!!
Back to top
View user's profile Send private message
Cristopher

New User


Joined: 31 Jul 2008
Posts: 53
Location: NY

PostPosted: Tue Sep 16, 2008 5:55 pm    Post subject: Reply to: alternate method needed
Reply with quote

rukkunudeen,

Are u sure that "01 s123 occurs 8 times indexed by wsub" was compiled without any error. As we cannot have occurs clause at 01 level variable.

Once this gets clear you can try:

MOVE JOBNM(WSUB) OF S123 OF SFM0030 TO JOBNM(WSUB1) OF S123 OF SFM0040

Cris
Back to top
View user's profile Send private message
Krishna Velamur

New User


Joined: 22 Aug 2008
Posts: 22
Location: Hyderabad

PostPosted: Tue Sep 16, 2008 5:56 pm    Post subject:
Reply with quote

Hi,
Try Move JOBNM OF SFM0030(WSUB) TO JOBNM OF SFM0040(WSUB1). Just a guess. Iam not sure about this.

Or else, Redefine the copybooks and use your working storage array structure. See below.

copy sfm0030
01 W-SFM0030-RED redefines W-SFM0030.
10 FILLER PIC X(100).
10 W-SFM0030-S123 OCCURS 8 TIMES.
15 W-SFM0030-JOBNM PIC X(1).
15 W-SFM0030-DATE PIC X(10).
15 W-SFM0030-TIME PIC X(4).

W-SFM0030 is high level group variable in sfm0030 copybook. This is just an example. Redefine structure will differ based on your copybook structure. Corrections are welcome.
Back to top
View user's profile Send private message
John K

New User


Joined: 27 Aug 2008
Posts: 3
Location: St. Louis, MO

PostPosted: Wed Sep 24, 2008 1:39 am    Post subject:
Reply with quote

Using COPY REPLACING will also allow you to qualify the datanames or you can simply replace all of the datanames you plan to reference.

COPY SFM0030
REPLACING ==S123== BY ==X123==
==jobnm== BY ==x-jobnm==
==date== BY ==x-date==
==time== BY ==x-time==.
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Help Needed with View Direct shailesh_do CA Products 2 Wed Jul 13, 2016 10:39 am
No new posts Several errors during building altern... Andi1982 JCL & VSAM 11 Wed Jul 06, 2016 7:39 pm
No new posts Drop building Alternate Index for a p... bhavin.mehta JCL & VSAM 6 Mon Jul 04, 2016 3:47 pm
No new posts VSAM Alternate Index in CICS jacobdng CICS 2 Fri May 06, 2016 1:41 pm
No new posts Need help with Oracle Dynamic SQL: Me... Anoop Chandran1984 COBOL Programming 1 Sat Feb 13, 2016 7:27 am


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