Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref

Author Message
jzhardy

New User

Joined: 31 Oct 2006
Posts: 31
Location: brisbane

 Posted: Thu Nov 02, 2006 11:06 am    Post subject: Add a value to a symbolic constant where it defines a offset two questions (looked thru the tutorial guides, but could not find any helpful examples) - 1. Is it possible to add a value to a symbolic constant where it defines an offset eg, instead of OVERLAY=(49:f1_c_w) ... I would prefer (for readability) something that achieves : OVERLAY=((f2_c+5):f1_c_w) ... 2. Suppose I have a file with a column for year (say at 10,4) defined as type char (YYYY). I want to add a constant to the year value where the record matches some criteria, but leave the result as CHAR. how can this be done within an OVERLAY ? eg - .... IFTHEN=(WHEN=(44,1,CH,EQ,C'Z'), OVERLAY= ???

Frank Yaeger

DFSORT Moderator

Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

Posted: Thu Nov 02, 2006 9:16 pm    Post subject:

1. I'm not sure I understand what you're trying to do, but here's an example of using f2_c_p5 as a symbolic constant representing the position of f2_c + 5. Note that + is not allowed in symbols, so I used p5 (for plus 5) instead.

 Code: //S1    EXEC  PGM=ICEMAN //SYSOUT    DD  SYSOUT=* //SYMNAMES DD * f1_c_w,5,8 f2_c,44 POSITION,f2_c SKIP,5 f2_c_p5,* /* //SYMNOUT DD SYSOUT=* //SORTIN DD DSN=...  input file //SORTOUT DD DSN=...  output file //SYSIN    DD    *   OPTION COPY   INREC OVERLAY=(f2_c_p5:f1_c_w) /*

The INREC statement will be translated to:

 Code: INREC OVERLAY=(49:5,8)

2. Just treat the 4-byte YYYY value as ZD.

where +n is the constant (you must use +n and not n).
 All times are GMT + 6 Hours
 Page 1 of 1

Search our Forum:

 Topic Author Forum Replies Posted Similar Topics PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am Paasing symbolic parameter to instrea... Robert Sample JCL & VSAM 2 Thu Jul 27, 2017 1:22 pm LISTCAT on a dataset with symbolic pa... shreya19 JCL & VSAM 5 Fri Apr 07, 2017 5:43 pm Count Trailing Spaces in variable str... Virendra Shambharkar SYNCSORT 10 Thu Feb 02, 2017 12:23 pm INVALID FIELD OR CONSTANT IN SORTOF ?? Ron Klop DFSORT/ICETOOL 8 Wed Jan 11, 2017 3:44 pm

 © 2003-2017 IBM MAINFRAME Software Support Division
 Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us