Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Record size is 70 i want retrive first 50 characters

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
srinivas.u

New User


Joined: 07 Jun 2004
Posts: 20

PostPosted: Sun Jun 20, 2004 11:08 pm    Post subject: Record size is 70 i want retrive first 50 characters
Reply with quote

hi

in cobol file the record size is 70 i want retrive first 50 characters.
Back to top
View user's profile Send private message

imvs

New User


Joined: 12 May 2004
Posts: 33

PostPosted: Sun Jun 20, 2004 11:34 pm    Post subject:
Reply with quote

srinivas.u,
In order to discuss in the same topic you can use POST REPLY instead of
opening a new topic.

Comming to you question, there are couple of ways to do it.

1) 01 ws-rec.
02 ws-reqd-50-data pic x(50).
02 filler pic x(20).
display ws-reqd-50-data.

2) 01 ws-rec pic x(70).
01 ws-reqd-50-data.

move ws-rec(1:50) to ws-reqd-50-data.
display ws-reqd-50-data.
Back to top
View user's profile Send private message
jz1b0c

Active User


Joined: 25 Jan 2004
Posts: 160
Location: Toronto, Canada

PostPosted: Fri Nov 19, 2004 2:06 am    Post subject:
Reply with quote

Srinivas,

Actually you dont need to do any thing like above simply a move statement will solve this.

01 ws-rec-70 pic x(70).

01 ws-rec-50 pic x(50).

MOVE WS-REC-70 TO WS-REC-50.

This will retrieve only first 50 characters and rest will be truncated.
Back to top
View user's profile Send private message
muthukumarapandian

New User


Joined: 08 Oct 2004
Posts: 42
Location: chennai, india

PostPosted: Sun Feb 27, 2005 6:01 pm    Post subject:
Reply with quote

Hi imvs,

reference modifier is possible in cobo 85 and versions after that, simply moving 70 bytes variable to 50 bytes variable will truncate and gives the required result.
Back to top
View user's profile Send private message
ankyhunk

Moderator


Joined: 05 May 2005
Posts: 98
Location: Navi Mumbai, India

PostPosted: Fri May 06, 2005 1:44 pm    Post subject:
Reply with quote

You can also copy a 70 char dataset to 50 char dataset using IEBGENER utility
Back to top
View user's profile Send private message
MainframeHelp4_u

New User


Joined: 15 Aug 2006
Posts: 25

PostPosted: Sat Sep 02, 2006 3:26 pm    Post subject: try sort
Reply with quote

1) Keep o/p file length 50 characters, and with SORTIN is 70 bytes file & SORTOUT is 50 bytes file.. try this option...

2) with the help ofSORT : Copy first/any 50 characters to output DSN..

Cheers
Mainframehelp4_u
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Sun Sep 03, 2006 2:01 am    Post subject:
Reply with quote

Or with REXX: "VAR1 = SUBSTR(VAR2,1,50)"

O.
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 -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts query to fetch record which has only ... maxsubrat DB2 10 Mon Dec 11, 2017 5:03 pm
No new posts Extract record for change in combinat... Trinadh DFSORT/ICETOOL 6 Thu Nov 23, 2017 3:32 pm
No new posts Extract Record using range of Data scorp_rahul23 DFSORT/ICETOOL 3 Wed Nov 15, 2017 11:54 pm
No new posts Squeeze record left so that zeroes ar... Vignesh Sid SYNCSORT 5 Fri Nov 10, 2017 1:40 pm
No new posts Formatting multiple records to a sing... Vignesh Sid SYNCSORT 3 Tue Nov 07, 2017 12:22 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us