BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Santha
Pyrite | Level 9

Posting this question in a new thread. 

I have a constraint below that gives syntax error. 

 

con DC_LSP_Direct_Link1{p in Ports, t in Transit,c in lsp, d in DC: d not in {'SAV','LAX'}}:
ContainersfromPortstoLSPtoDC[p,t,c,d in DC: d not in {'SAV','LAX'}] <= BigM * IsLSPDC[c,d in DC: d not in {'SAV','LAX'}];

 

This is the error

ERROR 22-322: Syntax error, expecting one of the following: !, !!, &, (, *, **, +, ',', -, .., /, <, <=, <>, =, >, ><, >=, AND, BY,
CROSS, DIFF, ELSE, IN, INTER, NOT, OR, SYMDIFF, TO, UNION, WITHIN, [, ], ^, ^=, |, ||, ~, ~=.
ERROR 76-322: Syntax error, statement will be ignored.
1 ACCEPTED SOLUTION

Accepted Solutions
RobPratt
SAS Super FREQ

Correct syntax is:

con DC_LSP_Direct_Link1{p in Ports, t in Transit, c in lsp, d in DC: d not in {'SAV','LAX'}}:
   ContainersfromPortstoLSPtoDC[p,t,c,d] <= BigM * IsLSPDC[c,d];

View solution in original post

2 REPLIES 2
RobPratt
SAS Super FREQ

Correct syntax is:

con DC_LSP_Direct_Link1{p in Ports, t in Transit, c in lsp, d in DC: d not in {'SAV','LAX'}}:
   ContainersfromPortstoLSPtoDC[p,t,c,d] <= BigM * IsLSPDC[c,d];
Santha
Pyrite | Level 9

Thanks Rob as always

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

Discussion stats
  • 2 replies
  • 897 views
  • 0 likes
  • 2 in conversation